Closed bentoi closed 5 years ago
See https://github.com/nodejs/node/issues/20281 for more info and https://github.com/nodejs/node/issues/20285
so what's the solution ?
@wustzhaohui my workaround was to downgrade in my particular case. 10.3.0 -> 8.11.2 (chose this version because it's what a coworker is using)
I solve this problem by download node of v8.11.3 .
I am also getting the same error after upgrading node version on Mac.
Don't understand why but run npm i natives
solved the problem for me.
@i30 That seems to have fixed the problem for me too, but I can't seem to figure out why either.
@i30 Thanks, i'm having a slightly different error output, but this helped me as well!
Same here, npm i natives fixed it
Same here
npm i natives
did not solve it for me.
After reading the npm natives
readme, it didn't seem like a good idea to use that solution. This fixed it for me:
rm -r node_modules
npm install
@ecker00's Solution worked for me as well.
Experiencing the same error, npm i natives
did the trick.
Don't understand why the issue is closed.
The bug actually exists and is rather annoying.
I've also run in this error and the npm i natives
fixed it! Deleting node_modules manually and reinstall everything, did not fix it!
Update: I've figured out that the given dependencies may occure this behaviour. Indeed, installing the package "natives" works, while reinstalling didn't work...
But when I cleanup the (messy) dependency list, my gulp tasks work like charm, also without installing "natives".
This was my required packages before the cleanup:
"clean": "^4.0.2",
"cssnano": "^4.0.0-rc.2",
"del": "^3.0.0",
"eslint": "^4.19.1",
"eslint-config-standard": "^11.0.0",
"eslint-plugin-import": "^2.11.0",
"eslint-plugin-node": "^6.0.1",
"eslint-plugin-promise": "^3.7.0",
"eslint-plugin-standard": "^3.1.0",
"gulp": "^3.9.1",
"gulp-cli": "^2.0.1",
"gulp-concat": "^2.6.1",
"gulp-imagemin": "^4.1.0",
"gulp-postcss": "^7.0.1",
"gulp-rename": "^1.2.2",
"gulp-sass": "^4.0.1",
"gulp-sourcemaps": "^2.6.4",
"gulp-uglify": "^3.0.0",
"gulp-util": "^3.0.8",
"gulp-watch": "^5.0.0",
"postcss": "^6.0.22",
"postcss-assets": "^5.0.0",
"postcss-inline-svg": "^3.1.1",
"postcss-preset-env": "^5.1.0",
"postcss-pxtorem": "^4.0.1",
"postcss-reporter": "^5.0.0",
"postcss-scss": "^1.0.5",
"postcss-syntax": "^0.28.0",
"postcss-validator": "^0.2.0",
"stylelint": "^9.2.0",
"stylelint-config-recommended-scss": "^3.2.0",
"stylelint-config-standard": "^18.2.0",
"stylelint-scss": "^3.1.0"
And this after the cleanup:
"clean": "^4.0.2",
"cssnano": "^4.0.0-rc.2",
"del": "^3.0.0",
"gulp": "^3.9.1",
"gulp-imagemin": "^4.1.0",
"gulp-postcss": "^7.0.1",
"gulp-rename": "^1.2.2",
"gulp-sass": "^4.0.1",
"gulp-sourcemaps": "^2.6.4",
"postcss-assets": "^5.0.0",
"postcss-inline-svg": "^3.1.1",
"postcss-preset-env": "^5.1.0",
"postcss-pxtorem": "^4.0.1",
"postcss-reporter": "^5.0.0",
"postcss-scss": "^1.0.5",
"postcss-validator": "^0.2.0",
"stylelint": "^9.2.0",
"stylelint-config-recommended-scss": "^2.0.0",
"stylelint-config-standard": "^17.0.0",
"stylelint-scss": "^2.1.0"
Not sure which package was responsible for the issue... But I guess it's about wrong dependency versions which are fetched, because they were defined in packages.json.
@i30 Thanks Mate npm i natives solved the issue for me
Just had this issue on 10.8.0
$ NODE_ENV=dev node server.js
MINGW64:/c/Users/downl/code/work/app[21376]: src\node_contextify.cc:637: Assertion `args[1]->IsString()' failed.
1: 00007FF7E3BE9055
2: 00007FF7E3BC2FE6
3: 00007FF7E3BC30B1
4: 00007FF7E3B98B8A
5: 00007FF7E41DB022
6: 00007FF7E41DC1B8
7: 00007FF7E41DB51D
8: 00007FF7E41DB43B
9: 000000A85D0841C1
npm i natives did not help in my case.
@download13 That looks almost identical to mine. Been trying to fix this for 2 days now, nothing I've found online has worked.
gulp build --env dev
[15:31:44] Failed to load external module @babel/register [15:31:44] Requiring external module babel-register gulp[6048]: src\node_contextify.cc:637: Assertion
args[1]->IsString()' failed. 1: 00007FF69A0E9055 2: 00007FF69A0C2FE6 3: 00007FF69A0C30B1 4: 00007FF69A098B8A 5: 00007FF69A6DB022 6: 00007FF69A6DC1B8 7: 00007FF69A6DB51D 8: 00007FF69A6DB43B 9: 00000239F2B041C1 npm ERR! code ELIFECYCLE npm ERR! errno 134
I ran into this again with another project where reinstalling did not work. When I tried npm upgrade
I got:
WARN babel-loader@7.1.5 requires a peer of webpack@2 || 3 || 4 but none is installed. You must install peer dependencies yourself.
My project does not use Webpack, but I had Babel as a dependency (gulp-babel). So maybe that's the culprit? I no longer had the need for gulp-babel, after I removed all Babel it from my packages.json then gulp worked again after a reinstall.
// Packages I removed to resolve the issue:
"babel-core": "^6.26.3",
"babel-loader": "^7.1.5",
"babel-preset-es2015": "^6.24.1",
"gulp-babel": "^7.0.0",
npm I natives resolved my issues.
delete package-lock.json
& npm i
work for me.
delete
package-lock.json
&npm i
work for me.
Thanks!
Or npm-shrinkwrap.json
. work for me too
Don't understand why but run
npm i natives
solved the problem for me.
Thanks! this worked for me!!
delete
package-lock.json
&npm i
work for me.
This is what worked for me. I first did npm i natives
and it solved the problem, but i felt i didnt need to install another package so the above worked perfectly.
@joyeecheung Why did you reopen? Anything actionable?
@bnoordhuis Probably hit the wrong button...sorry. For posterity see https://github.com/nodejs/node/issues/20325#issuecomment-384534318
delete
package-lock.json
&npm i
work for me.
This fixed the issue for me
Not sure why... but npm i natives
just works.
npm i natives
works,thanks
delete package-lock.json & npm i
Fixed my issue. No need for npm i natives
delete package-lock.json & npm i
Fixed my issue. No need for npm i natives
dcworldwide, you are absolutely right, thank you!!
This steps resolved this problem: Simply delete node_modules dir and package-lock.json. Then run npm install --unsafe-perm=true
After reading the npm
natives
readme, it didn't seem like a good idea to use that solution. This fixed it for me:rm -r node_modules npm install
This is a better solution than installing natives
delete package-lock.json & npm i
Fixed my issue. No need for npm i natives
This fixed my issue
Node: v4.2.3 NPM: 2.14.7
npm i natives
worked for me in the end. The safer looking npm i
did not work, nor did rm -r node_modules; npm install
in my case.
If you're running into this because you're trying to start gulp through supervisor, check to see if you have a different version of node installed at /usr/local/bin/node -v
.
This may be the version gulp is trying to use, despite whatever your nvm ls
output says.
To insure you're running with a specific version, you can run it with a version argument to nvm run
, e.g. nvm run 6.14.4 ./node_modules/gulp/bin/gulp.js dev
.
This fixed the issue for me.
Running npm i natives
solved the problem for me.
Solved the problem for me. rm -rf node_modules rm -rf package-lock.json npm i
Came here because I'm working on getting a Microsoft Teams tab app up and running locally.
This did the trick to generate the manifest file:
cd ~/whateverYourProjectFolderIs
rm -rf node_modules
rm -rf package-lock.json
npm i natives
delete
package-lock.json
&npm i
work for me.
cool~ solve it
Having this issue too
Same here. npm i natives fixed the issue.
Had this issue today but could not resolve it with natives
. I think I was using v10.16. Anyway, had to downgrade to v8, as suggested by others. I was able to use the latest v8: 8.16. Downloaded from here
Please don’t use old versions of gulp anymore. I’ve updated the issue description to reflect that this problem has been solved properly, namely through upgrading to gulp >= 4.0.0.
npm i natives worked for me as well. Dunno if it is the reason of the problem (quite sure it is), but i just installed react on my laptop. https://www.npmjs.com/package/react-native
Had same issue npm i natives
fixed it
delete package-lock.json & npm i
Don't understand why but run
npm i natives
solved the problem for me.
awesome
delete package-lock.json & npm i
Fixed my issue. No need for npm i natives
solved my problem
i got the error as npm[6700]: c:\ws\src\node_contextify.cc:626: Assertion `args[1]->IsString()' failed. then i running
npm i natives
problem solved. note: i checked my node version and it was v10.15.3 . so i think the isssue may be with the node version.
This issue has been solved: Please use a gulp version >= 4.0.0. Thank you.
Trying to build our sources using the latest node, node crashes with the assert below when running gulp.
Step to reproduce:
The stack trace: