gulp task issue with nodejs v10.3.0 : src\node_contextify.cc:629: Assertion `args[1]->IsString()' failed

36,760

Solution 1

Just run command

npm install natives

Solution 2

I have had two different solutions work in two different workspaces. The first after updating to node 10.6.0 required me to use this method:

$rm -rf node_modules
$rm -rf package-lock.json
$npm cache clean
$npm install

The second workspace wouldn't work with the above, though I did try it first, it required me to reinstall all my gulp dependencies then run npm audit fix. For example:

$npm install --dev gulp gulp-sass gulp-autoprefixer
$npm audit fix

Hope this helps someone.

Solution 3

node version compatible problem, try use node version<=9.11.2.

Solution 4

I had the same issue. Deleting node_modules and re-running npm install, to re-install the modules listed in package.json, did work for me.

Solution 5

Just run these two commands.

  1. remove node_modules folder

rm -r node_modules

  1. And Install only natives dependencies.

npm install natives

Share:
36,760
M14
Author by

M14

Technology explorer

Updated on September 23, 2020

Comments

  • M14
    M14 over 3 years

    I recently updated my nodejs version to 10.30.0. Everything works fine. But my gulp build task not working which was working fine on older version(9.X). This is what I am getting.

     gulp[11376]: src\node_contextify.cc:629: Assertion `args[1]->IsString()' failed.
     1: node::DecodeWrite
     2: node::DecodeWrite
     3: uv_loop_fork
     4: v8::internal::interpreter::BytecodeDecoder::Decode
     5: v8::internal::RegExpImpl::Exec
     6: v8::internal::RegExpImpl::Exec
     7: v8::internal::RegExpImpl::Exec
     8: 00000384E1284281
    

    Somebody, please help me.

  • M14
    M14 almost 6 years
    unfortunately, it is not working for me. I switched back to old version for running build
  • M14
    M14 almost 6 years
    I think they fixed this issue on 10.7.0 It is working now`
  • M14
    M14 almost 6 years
    I think they fixed this issue on 10.7.0 It is working now
  • Ozzy
    Ozzy over 5 years
    This did it for me. I then ran npm install afterwards and all worked. I'm running node 10.9.0.
  • naaman
    naaman over 5 years
    + npm install + npm audit fix was required to get gulp working again.
  • Veysel Ozdemir
    Veysel Ozdemir over 5 years
    You may need to do an additional npm cache clean --force and then npm install and then npm install natives. That was the combination in my case.
  • arviman
    arviman over 5 years
    this is what actually works. switched to 9.4.0 from >= 10.1. "npm install natives" didn't do it.
  • Blieque
    Blieque over 5 years
    Bear in mind that this is far from an ideal solution. Read the warning about the use of this package on it's NPM page: npmjs.com/package/natives The real solution to this is probably to upgrade to current versions of Node and node-sass.
  • dwilli
    dwilli over 5 years
    with later versions of node you have to use $npm cache clean --force to delete the cache, or on Windows, delete the C:\user\AppData\Roaming\npm-cache folder. This fixed the issue for me
  • user3057544
    user3057544 over 5 years
    For me ( node -v => 10.15.1 ) works: npm cache clean --force then npm install, but without npm install natives ( installing natives throwing another error )
  • tmutton
    tmutton about 5 years
    I was receiving this error with a project using Visual Studio 2019 v16.1.0. Running npm install natives as per this answer solved the problem. Thanks.
  • Chris Schaller
    Chris Schaller almost 5 years
    npm install natives didn't immediately solve my problems, but thanks @dwilli manually deleting folders and following this solution's advice worked for me
  • Jigar
    Jigar almost 5 years
    its worked for me .... thank you so much. wasted 2+ hours and finally, just single command solved an issue.
  • Khateeb321
    Khateeb321 over 4 years
    This actually fixed my issue after spending entire day!