-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
gulp-order v1.2.0 causes (gulp build) to throw ReferenceError: Invalid left-hand side in assignment #32
Comments
You probably have an outdated Node version that does not support object destructuring. What is your Node version? ( |
We experienced the same problem, and I can confirm that the issue is due to an older Node version. The 1.1.1 version of gulp-order ran fine on Node 5.7, 1.2.0 now seems to require 7 or newer. |
Whats your reason for running the develop versions (odd numbers) of node? |
I think it might have been an accidental oversight on our part (but the codebase is old, so it's hard to say). We upgraded our dependencies to the latest Node (8.12.0), and now things appear to be working fine. Of course, that's just us, not sure if the issue reporter can do this with the same ease. |
@pip25 Did you just made an update from Node 5.5 to 8.12 and update dependencies then it worked or it worked even without updating other dependencies ? |
@brainlulz I simply changed the Node/NPM version (this was a Maven build that automatically installs the required Node and NPM versions into the workspace), ran the build again and it worked. I don't think I even re-ran npm install, and I most certainly did not update any other dependency versions that we had. Of course, that does not mean that no dependencies exist that break using newer Node versions; perhaps I just got lucky. |
I had the same problem, and with the default arguments of module.exports too. So I did that patch : Now it's fine. |
I am getting this error with gulp-order 1.1.1 and node 8.9.1 in one of my projects, but in another on the same machine and same versions, I do not get it. |
The Problem:
At least for my set up, when I try to build my application gulp-order v1.2.0 throws an error as follows:
... ... ... ... .../node_modules/gulp-order/lib/index.js:7
build 10-Oct-2018 17:36:02 [ERROR] ({Minimatch} = require("minimatch"));
build 10-Oct-2018 17:36:02 [ERROR] ^
build 10-Oct-2018 17:36:02 [ERROR]
build 10-Oct-2018 17:36:02 [ERROR] ReferenceError: Invalid left-hand side in assignment
This version of gulp-order ships with a file src/index.coffee with the following lines:
through = require "through"
{ Minimatch } = require "minimatch"
The second line is the one that ends up causing an issue when it is used to generate the following file:
... ... ... ... .../node_modules/gulp-order/lib/index.js which contains the following lines:
// Generated by CoffeeScript 2.3.1
(function() {
var Minimatch, path, sort, through;
through = require("through");
({Minimatch} = require("minimatch"));
Note the last line (line 7) retains the format from the index.coffee file where we have extra brackets. In order to build, it should look like the following line:
Minimatch = require("minimatch").Minimatch;
The cause in my case is the following:
This just occurred yesterday (10/10/18) when I build my code base because:
"sirlantis commented a day ago"
"I've been under a rock for the last few months. I published 1.2.0 to npm."
and
...
"devDependencies": { ....
"gulp-order": "^1.1.1", ....
The solution:
A) Modify the above line as follows:
"gulp-order": "1.1.1", OR
B) Figure out why the following line causes a build exception...
{ Minimatch } = require "minimatch"
I am definitely not an expert, so I may be missing something that will make V1.2.0 work fine. That is part of the reason I tried to give you as much info as I could, and info about my work around.
However, my guess is that I am not going to be the only one who is going to rebuild from scratch and hit this issue.
I could be wrong.... :)
Thank you in advance for your help....
Jeff
The text was updated successfully, but these errors were encountered: