-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Use of const in strict mode causing failures installing Node 0.12 #2100
Comments
We just hit this too. It looks like it was caused by this update to request: |
Indeed that was it. In our package.json file we just added a hard set of request to version 2.81.0 which is before they set hawk to 6.x and that fixed the build. So long as all your tests pass that is a work around. |
This error message started to appear recently. Is there anything you guys suggest may be ? /node_modules/grunt-sass/node_modules/node-sass/node_modules/request/node_modules/hawk/node_modules/boom/lib/index.js:5 |
got bitten by this too. had to lock request to 2.81.0 |
Looks like preventing this is possible. If you have a working version prior to update go to that installation and use:
then a new file will be created
Check that file and make sure dependencies are created. Normally this file has all the existing dependencies. Put that file in the folder which you run npm install inside. NPM will use the old versions and should work. As an alternative you can remove all unrelated dependencies and keep only node-sass with request dependency.
|
Hi @Bugget - We are facing same issues and we are using node:0.12.7 version of image. Please can you help what changes are required to resolve this issue. |
quick fix: npm install node-sass [email protected] |
Thanks for update. I am already having "npm install" used. Should I remove
this line and use one suggested by you.
I tried using npm install
npm install node-sass [email protected] but still giving error.
On 21-Sep-2017 12:52 am, "Karsten" <[email protected]> wrote:
quick fix: npm install node-sass [email protected]
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#2100 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/Aephblcclmp1fpSohNktz5zGsGDGy5s6ks5skWXdgaJpZM4PdDZz>
.
|
I'm going to leave this unlocked, and not speaking for any of the other maintainers, but 0.12 has been EOL since January 1st. I don't know how much effort will be put into fixing this, but I do appreciate the folks suggesting the workaround by pinning the |
@majidpal to fix versions you'll need prune, shrinkwrap and a correct package.json. In a fresh repo that would look like:
|
Thanks you for response. We are planning to move away with this version but
the for temprary need to fix so that work can continue. I am using below in
my jobs -
./docker run --rm -t \
-v "/data/jenkins/home/jobs/test/workspace/:/src/" \
node:0.12.7 bash -c "git config --global url."https://".insteadOf git://;
\
cd /src; \
npm install; \
npm install -g bower; \
bower install --allow-root --config.interactive=false ;\
npm run build
npm run cache-buster
npm run www-build-index"
in my package.json we have gulp-sass": "^2.1.1"
Please let me know what to change. Appreciate help.
…On Thu, Sep 21, 2017 at 9:49 AM, Karsten ***@***.***> wrote:
@majidpal <https://github.com/majidpal> to fix versions you'll need
prune, shrinkwrap and a correct package.json. In a fresh repo that would
look like:
npm install node-sass ***@***.*** shrinkwrap
npm init # make sure <=2.81.0
npm prune
npm shrinkwrap
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#2100 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/Aephbuj6n9vpD2-VUPtx1yOxytzDs4nGks5skeO8gaJpZM4PdDZz>
.
|
We were able to resolve issue by adding bolded line. This needs to comer before npm install - ./docker run --rm -t Still have an open question - We had tried using latest version of image node:6.3.5 but still it was failing. I hope latest node image should have point to current version of gulp-sass. Can you please let me know which latest stable version we should use so that explicit download of gulp-sass is not required? |
Looks like this is all caused by mozilla/hawk#153 from 2 years ago... |
@nschonni @xzyfer what about making a snapshot release locked to [email protected] and being the last one to support 0.10, 0.12 (and provide binaries for them)? |
We're experiencing this issue with our Travis CI job for the Select2 repo: https://travis-ci.org/select2/select2/jobs/279037851. How does |
package.json generated from my previous comment:
Switch to using package.json and npm-shrinkwrap.json to manage transitive dependencies deterministically. https://github.com/uber/npm-shrinkwrap |
Thanks! I'm pretty green with respect to npm and Node in general (I'm primarily a PHP developer), but I'll bring this up with the project creators! |
Updating npm and nodejs worked for me:
|
We've run into this as well across a few of our environments. Success locally with the temporary fix provided by @kmcminn and are trying to update our deployment scripts now accordingly. |
Below error/issue resolved with this solution:Solution:sed -i '27 a "request":"2.81.0",' /opt/apache-ambari-2.2.2-src/ambari-web/package.json I just added specified "request" version(older version "2.81.0") in "package.json" file below problem resolved. Here is my error:[INFO] /opt/apache-ambari-2.2.2-src/ambari-web/node_modules/ember-precompiler-brunch/node_modules/jsdom/node_modules/request/node_modules/hawk/node_modules/boom/lib/index.js:5 [INFO] ------------------------------------------------------------------------ |
update to ^2.8 solved for me |
Looks like |
We're already locked to a handful of outdate packages that have dropped Node 0.10 support. I'm not sure how long we can continue to do this dance though when any transitive dependency can hurt us like this. We'll be officially dropping support for Node < 6 in node-sass@v5 later this year. In the mean time I suggest we
|
@xzyfer I think adding it to the TROUBLESHOOTING or README might be helpful. When we break in 5, we can make an explicit message too |
Node Sass 4.x continues to support Node < 4. However due to some of our dependencies dropping support older Node versions npm install will fail an error like
This is out of our control. We recommend updating Node to an active LTS or current version 6, 7, or 8 if possible. The next major version of Node Sass will remove support for Node < 6. If you must support Node < 4 you can explicitly install an older version of request for node-sass to use by running the following
|
These will always fails now due to #2100. We manually verify support when building release binaries so there's no value in failing CI. It's scary to contributors.
These will always fails now due to #2100. We manually verify support when building release binaries so there's no value in failing CI. It's scary to contributors.
* Remove Node 0.10 and 0.12 from travis config These will always fails now due to #2100. We manually verify support when building release binaries so there's no value in failing CI. It's scary to contributors. * Remove Node 0.10 and 0.12 from appveyor config These will always fails now due to #2100. We manually verify support when building release binaries so there's no value in failing CI. It's scary to contributors. * Link to the troubleshoot guide for Node < 4 installation issues Help people search for keywords because noone reads the help guides anyway.
@michael - I wanted to move to latest node and i did trued node 6.X version
but it was still failing with same error "SyntaxError: Use of const in
strict mode."
Please let me konw which is the stable latest version available and steps
for them , so that I can put this up to development team and migrate to
that.
Thanks for support.
…On Fri, Oct 6, 2017 at 9:21 AM, Michael Mifsud ***@***.***> wrote:
Closed #2100 <#2100>.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#2100 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AephbjUJpkvcxuxf1YjJfWstJTZRrHNkks5spaPTgaJpZM4PdDZz>
.
|
@xzyfer, thanks for the solution! Curious how this works as it goes against my understanding of how NPM v2 structures its dependencies (which would be the version tied to > node 4) |
The versions of node and npm are old and may be the cause of the CCI build failure as per sass/node-sass#2100.
…t mode', had to lock request to 2.81.0 sass/node-sass#2100
I had this happen using manifoldJS for packaging an edge extension. |
This is resolved in the latest node-sass. Run npm update node-sass
…On 5 Feb. 2018 3:19 am, "Eyal Lewinsohn" ***@***.***> wrote:
I had this happen using manifoldJS for packaging an edge extension.
to fix it I had to update
C:\Users\eyal\AppData\Roaming\npm\node_modules\manifoldjs\
node_modules\manifoldjs-lib\package.json
changing the request dependency to
"request": "<=2.81.0",
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#2100 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAjZWO5wIC_G7ODntoVLRCMtzdr-0Dntks5tRdiUgaJpZM4PdDZz>
.
|
node: '0.12.7',
v8: '3.28.71.19',
uv: '1.6.1',
zlib: '1.2.8',
modules: '14',
openssl: '1.0.1p' }
./ui/node_modules/gulp-sass/node_modules/node-sass/node_modules/request/node_modules/hawk/node_modules/boom/lib/index.js:5
const Hoek = require('hoek');
^^^^^
SyntaxError: Use of const in strict mode.
at exports.runInThisContext (vm.js:73:16)
at Module._compile (module.js:443:25)
at Object.Module._extensions..js (module.js:478:10)
at Module.load (module.js:355:32)
at Function.Module._load (module.js:310:12)
at Module.require (module.js:365:17)
at require (module.js:384:17)
at Object. (/home/tbugge/mocat/ui/node_modules/gulp-sass/node_modules/node-sass/node_modules/request/node_modules/hawk/lib/index.js:5:33)
at Module._compile (module.js:460:26)
at Object.Module._extensions..js (module.js:478:10)
Looks like a dependency changed. I took a quick look at the releases on hawk and boom and didn't see anything recent. This stopped building with this error in the last hour or so.
The text was updated successfully, but these errors were encountered: