Javascript nodejs v10.3.0 的 gulp 任务问题:src\node_contextify.cc:629:断言 `args[1]->IsString()' 失败
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/50620673/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
gulp task issue with nodejs v10.3.0 : src\node_contextify.cc:629: Assertion `args[1]->IsString()' failed
提问by M14
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.
我最近将我的 nodejs 版本更新为 10.30.0。一切正常。但是我的 gulp 构建任务不起作用,在旧版本(9.X)上运行良好。这就是我得到的。
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.
有人,请帮助我。
回答by nosensus
Just run command
只需运行命令
npm install natives
回答by jasonflaherty
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:
我在两个不同的工作空间中使用了两种不同的解决方案。更新到节点 10.6.0 后的第一个要求我使用此方法:
$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:
第二个工作区不适用于上述工作,尽管我确实先尝试过,但它要求我重新安装所有 gulp 依赖项,然后运行 npm audit fix。例如:
$npm install --dev gulp gulp-sass gulp-autoprefixer
$npm audit fix
Hope this helps someone.
希望这可以帮助某人。
回答by u8514246
node version compatible problem, try use node version<=9.11.2.
节点版本兼容问题,尝试使用节点版本<=9.11.2。
回答by Constantine
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.
我遇到过同样的问题。删除 node_modules 并重新运行npm install,重新安装 package.json 中列出的模块,对我有用。
回答by Shaji Joseph
npm install natives
This works with Windows 10 64 Bit
npm install natives
这适用于 Windows 10 64 位
回答by riwex
My system:
我的系统:
- Windows 10
- Node 10.15.3
- 视窗 10
- 节点 10.15.3
Steps:
脚步:
- npm update
- npm i natives
- npm i
- npm audit fix
- 更新
- npm 我是本地人
- 我的
- npm 审计修复
The order is required.
订单是必需的。
My packages after when I have updated via command "npm update":
我通过命令“npm update”更新后的包:
{
"name": "your name",
"version": "0.1.0",
"private": true,
"dependencies": {
"autoprefixer": "^7.2.6",
"babel-core": "^6.26.3",
"babel-loader": "^7.1.5",
"babel-plugin-async-to-promises": "^1.0.5",
"babel-preset-es2015": "^6.24.1",
"bootstrap": "v4.0.0-beta",
"chartist-webpack": "^0.9.5-0",
"d3": "^4.13.0",
"d3.js": "^0.0.2-security",
"datalist-polyfill": "^1.23.3",
"dimple-js": "^2.1.4",
"future-tabs": "^1.3.2",
"gridstack": "0.2.6",
"gulp": "^3.9.1",
"gulp-cache-bust": "^1.4.0",
"gulp-clean": "^0.3.2",
"gulp-connect": "^5.7.0",
"gulp-cssmin": "^0.2.0",
"gulp-extname": "^0.2.2",
"gulp-postcss": "^7.0.1",
"gulp-rename": "^1.4.0",
"gulp-sass": "^3.1.0",
"gulp-sequence": "^0.4.6",
"gulp-sourcemaps": "^2.6.5",
"ionicons": "^3.0.0",
"jquery": "^3.3.1",
"jquery-ui": "^1.12.1",
"jquery-ui-touch-punch": "^0.2.3",
"lodash": "^4.17.11",
"md5": "^2.2.1",
"moment": "^2.24.0",
"natives": "^1.1.6",
"postcss-flexbugs-fixes": "^2.0.0",
"promise-polyfill": "6.0.2",
"semaphore-async-await": "^1.5.1",
"url-search-params-polyfill": "^2.0.3",
"vanilla-modal": "^1.6.5",
"webpack": "^3.12.0",
"webpack-stream": "^4.0.3",
"whatwg-fetch": "^2.0.4"
}
}
回答by kaleem
I was facing similar problem too with gulp
我也面临类似的问题 gulp
gulp build[30580]: c:\ws\src\node_contextify.cc:635: Assertion `args[1]->IsString()' failed.
1: 00007FF6F86BC6AA v8::internal::GCIdleTimeHandler::GCIdleTimeHandler+4506
gulp build[30580]: c:\ws\src\node_contextify.cc:635: Assertion `args[1]->IsString()' failed.
1: 00007FF6F86BC6AA v8::internal::GCIdleTimeHandler::GCIdleTimeHandler+4506
npm install nativessolved the problem in windows 64
npm install natives解决了问题 windows 64
回答by Daniel Batista
using node v10.16.0
使用节点v10.16.0
npm install natives
npm install natives
npm audit fix
npm audit fix
回答by Amir
follow this steps resolved problem:
按照以下步骤解决问题:
Simply delete node_modulesdirectory and package-lock.json.
Then run npm install --unsafe-perm=true
只需删除node_modules目录和package-lock.json. 然后运行npm install --unsafe-perm=true

