gulp nodejs v10.3.0 的任务问题:src\node_contextify.cc:629:断言 `args[1]->IsString()' 失败

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

我最近将我的 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

有人,请帮助我。

我遇到了同样的问题。删除 node_modules 并重新 运行 npm install,重新安装 package.json 中列出的模块,对我有用。

只需运行命令

npm install natives

节点版本兼容问题,尝试使用节点版本<=9.11.2。

我在两个不同的工作区中使用了两种不同的解决方案。更新到节点 10.6.0 后的第一个要求我使用 this method:

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

第二个工作区不能与上面的工作区一起使用,尽管我确实首先尝试过,它要求我重新安装所有 gulp 依赖项,然后 运行 npm 审计修复。例如:

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

希望这对某人有所帮助。

npm install natives

这适用于 Windows 10 64 位

我的系统:

  1. Windows 10
  2. 节点 10.15.3

步骤:

  1. npm 更新
  2. npm 我是本地人
  3. npm i
  4. npm 审核修复

需要订单。

我通过命令 "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"
  }
}

我在 gulp

也遇到了类似的问题

gulp build[30580]: c:\ws\src\node_contextify.cc:635: Assertion `args[1]->IsString()' failed. 1: 00007FF6F86BC6AA v8::internal::GCIdleTimeHandler::GCIdleTimeHandler+4506

npm install natives 解决了 windows 64

中的问题

使用节点 v10.16.0

npm install natives

npm audit fix

就运行这两个命令。

  1. 删除 node_modules 文件夹

rm -r node_modules

  1. 并且仅安装本机依赖项。

npm install natives

npm(非纱线)解决方案

  1. 更新你的 npm 包
  2. npm rebuild // 安装也可能有效?
  3. 您可能会收到关于 'parallels'
  4. 的新错误
  5. 遵循此指南(不是我的):https://timonweb.com/javascript/how-to-fix-referenceerror-primordials-is-not-defined-error/

为什么? Gulp v3 + Node v12 彼此不兼容。不要为了解决此问题而尝试更新到 Gulp v4,因为存在重大更改(除非您想重写代码)。不要降级 Node,因为它不可扩展,您可能 运行 陷入其他问题。您最终.

必须升级