我最近将我的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
有人,请帮帮我。
只需运行命令
npm install natives
我有两个不同的解决方案在两个不同的工作区中工作。更新到节点10.6.0后的第一个要求我使用this method:
$rm -rf node_modules
$rm -rf package-lock.json
$npm cache clean
$npm install
第二个工作区不能用于上面的工作,虽然我先尝试过,它要求我重新安装所有gulp依赖项然后运行npm audit fix。例如:
$npm install --dev gulp gulp-sass gulp-autoprefixer
$npm audit fix
希望这有助于某人。
节点版本兼容问题,请尝试使用节点版本<= 9.11.2。
我遇到过同样的问题。删除node_modules并重新运行npm install
,重新安装package.json中列出的模块,对我有用。
我的系统:
脚步:
订单是必需的。
我通过命令“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"
}
}
按照此步骤解决问题:
只需删除node_modules
目录和package-lock.json
。然后运行npm install --unsafe-perm=true
npm install natives
这适用于Windows 10 64位