小编Don*_*Don的帖子

错误:找不到模块'commander'

当我运行sails -v,sails lift甚至安装npm我收到此错误请帮助 -

Error: Cannot find module 'commander'
    at Function.Module._resolveFilename (module.js:536:15)
    at Function.Module._load (module.js:466:25)
    at Module.require (module.js:579:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (/usr/local/lib/node_modules/sails/bin/_commander.js:6:15)
    at Module._compile (module.js:635:30)
    at Object.Module._extensions..js (module.js:646:10)
    at Module.load (module.js:554:32)
    at tryModuleLoad (module.js:497:12)
    at Function.Module._load (module.js:489:3)
Run Code Online (Sandbox Code Playgroud)

node.js npm nvm sails.js npm-install

8
推荐指数
3
解决办法
1万
查看次数

如何通过 package.json 下载和安装所有节点模块?

我想通过 maven 调用和下载所有节点模块,在 maven 中我已经定义了插件来安装它但是现在在我的 package.json 中我已经定义了以下 npm install 命令,请告知我如何安装所有节点模块并可以定义它们在 package.json 中

包.json

{
  "name": "MyProject",
  "version": "1.0.0",
   "author": "Saral",
  "scripts":{
  "start":"node gulpfile.js",
   "prebuild": "npm install",
    "build": "gulp"
    },

  "dependencies": {
    "gulp": "*",
    "gulp-ruby-sass": "*",
    "gulp-util": "*",
    "gulp-rename": "*",
    "gulp-concat": "^2.6.0",
    "gulp-concat-vendor": "0.0.4",
    "map-stream": "*",
    "gulp-livereload": "*",
    "gulp-concat": "*",
    "gulp-uglify": "*",
    "gulp-minify-css" : "^1.2.1",
    "gulp-notify":"2.2.0",
    "gulp-inject": "1.5.0",
    "run-sequence": "1.1.4",
    "stream-series": "0.1.1",
    "gulp-gzip": "1.2.0",
    "gulp-clone": "1.0.0",
    "gulp-watch": "*"


  }
}
Run Code Online (Sandbox Code Playgroud)

node.js npm package.json

2
推荐指数
1
解决办法
2万
查看次数

标签 统计

node.js ×2

npm ×2

npm-install ×1

nvm ×1

package.json ×1

sails.js ×1