运行`npm audit`时,从`rails s中获取'node_contextify'错误-从npm-pipeline-rails中获取'错误请求错误'。

时间:2019-01-12 02:07:16

标签: ruby-on-rails npm gulp

使用npm-pipeline-rails gem,我尝试运行rails以便通过Gulp编译资产:

$ rails s
> gulp watch
gulp[1624]: ../src/node_contextify.cc:635:static void node::contextify::ContextifyScript::New(const FunctionCallbackInfo<v8::Value> &): Assertion `args[1]->IsString()' failed.

每个人都说rm -rf node_modules/rm package-lock.jsonnpm inpm audit fix,但是我明白了:

$ npm audit fix
npm ERR! 400 Bad Request - POST https://registry.npmjs.org/-/npm/v1/security/audits

我的package.json如下:

  "name": "gulp-app",
  "description": "Description",
  "author": "Your Name",
  "version": "0.1.0",
  "scripts": {
    "start": "gulp watch",
    "build": "gulp build"
  },
  "dependencies": {},
  "devDependencies": {
    "breakpoint-sass": "^2.7.0",
    "compass-mixins": "",
    "gulp": "^3.9.1",
    "gulp-cli": "^1.2.1",
    "gulp-concat": "^2.6.0",
    "gulp-notify": "^3.0.0",
    "gulp-run": "^1.7.1",
    "gulp-sass": "^2.3.2",
    "gulp-sourcemaps": "^1.6.0",
    "susy": "^2.2.14"
  }
}

1 个答案:

答案 0 :(得分:0)

这可能是在package.json中没有声明版本的症状

这为我解决了这个问题:
"compass-mixins": "^0.12.6",代替"compass-mixins": "",

然后,您可以简单地rm -rf node_modules/rm package-lock.jsonnpm inpm audit fix ...,然后再次尝试rails s