" npm install"出错

时间:2018-03-26 20:27:21

标签: node.js npm-install

我收到了 node.js 项目但我无法执行npm install,当我尝试这样做时,它给了我这个错误:

0 info it worked if it ends with ok
1 verbose cli [ 'C:\\Program Files\\nodejs\\node.exe',
1 verbose cli   'C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js',
1 verbose cli   'start' ]
2 info using npm@5.6.0
3 info using node@v8.10.0
4 verbose run-script [ 'prestart', 'start', 'poststart' ]
5 info lifecycle park-administrative-interface@0.1.1~prestart: park-administrative-interface@0.1.1
6 verbose lifecycle park-administrative-interface@0.1.1~prestart: unsafe-perm in lifecycle true
7 verbose lifecycle park-administrative-interface@0.1.1~prestart: PATH: C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin;C:\Users\dba\Downloads\Park\park-administrative-interface\node_modules\.bin;C:\ProgramData\Oracle\Java\javapath;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\nodejs\;C:\Program Files (x86)\Windows Kits\8.1\Windows Performance Toolkit\;C:\Users\dba\.windows-build-tools\python27;C:\Users\dba\.windows-build-tools\python27\Scripts;C:\Program Files (x86)\Bitvise SSH Client;C:\Program Files\PuTTY\;C:\RailsInstaller\Git\cmd;C:\RailsInstaller\Ruby1.9.3\bin;C:\Users\dba\AppData\Roaming\npm
8 verbose lifecycle park-administrative-interface@0.1.1~prestart: CWD: C:\Users\dba\Downloads\Park\park-administrative-interface
9 silly lifecycle park-administrative-interface@0.1.1~prestart: Args: [ '/d /s /c', 'npm install' ]
10 silly lifecycle park-administrative-interface@0.1.1~prestart: Returned: code: 1  signal: null
11 info lifecycle park-administrative-interface@0.1.1~prestart: Failed to exec prestart script
12 verbose stack Error: park-administrative-interface@0.1.1 prestart: `npm install`
12 verbose stack Exit status 1
12 verbose stack     at EventEmitter.<anonymous> (C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\index.js:285:16)
12 verbose stack     at emitTwo (events.js:126:13)
12 verbose stack     at EventEmitter.emit (events.js:214:7)
12 verbose stack     at ChildProcess.<anonymous> (C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\lib\spawn.js:55:14)
12 verbose stack     at emitTwo (events.js:126:13)
12 verbose stack     at ChildProcess.emit (events.js:214:7)
12 verbose stack     at maybeClose (internal/child_process.js:925:16)
12 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:209:5)
13 verbose pkgid park-administrative-interface@0.1.1
14 verbose cwd C:\Users\dba\Downloads\Park\park-administrative-interface
15 verbose Windows_NT 6.1.7601
16 verbose argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "start"
17 verbose node v8.10.0
18 verbose npm  v5.6.0
19 error code ELIFECYCLE
20 error errno 1
21 error park-administrative-interface@0.1.1 prestart: `npm install`
21 error Exit status 1
22 error Failed at the park-administrative-interface@0.1.1 prestart script.
22 error This is probably not a problem with npm. There is likely additional logging output above.
23 verbose exit [ 1, true ]

我是node.js的新手,并且不太了解它。感谢。

----------------------------------------------- -------------------------------

package.json内容:

{
  "author": "Claudinei Callegari",
  "name": "park-administrative-interface",
  "version": "0.1.1",
  "private": true,
  "contributors": [
    {
      "name": "Marcel Araujo",
      "email": "admin@marcelaraujo.me"
    }
  ],
  "bugs": {
    "url": ""
  },
  "license": "MIT",
  "engines": {
    "node": ">= 0.6.x"
  },
  "scripts": {
    "postinstall": "bower install",
    "prestart": "npm install",
    "start": "./node_modules/http-server/bin/http-server build -a 0.0.0.0 -p 8000 -c-1",
    "pretest": "npm install",
    "test": "karma start karma.conf.js",
    "test-single-run": "karma start karma.conf.js  --single-run",
    "protractor": "protractor e2e-tests/protractor.conf.js"
  },
  "devDependencies": {
    "grunt": "^0.4.5",
    "grunt-bower-task": "^0.4.0",
    "grunt-check-gems": "0.0.2",
    "grunt-concurrent": "^1.0.0",
    "grunt-contrib-clean": "^0.6.0",
    "grunt-contrib-concat": "^0.5.0",
    "grunt-contrib-connect": "^0.8.0",
    "grunt-contrib-copy": "^0.6.0",
    "grunt-contrib-cssmin": "^0.10.0",
    "grunt-contrib-jshint": "^0.10.0",
    "grunt-contrib-sass": "^0.8.1",
    "grunt-contrib-uglify": "^0.6.0",
    "grunt-contrib-watch": "^0.6.1",
    "grunt-html-minify": "^0.3.1",
    "grunt-html2js": "^0.2.9",
    "grunt-ng-annotate": "^0.4.0",
    "grunt-nodemon": "^0.3.0",
    "grunt-parallel": "^0.3.1",
    "grunt-s3": "^0.2.0-alpha.3",
    "grunt-shell": "^1.1.1",
    "http-server": "^0.7.3",
    "load-grunt-tasks": "^0.6.0",
    "time-grunt": "^1.0.0"
  }
}

0 个答案:

没有答案