安装软件包时出现npm install错误

时间:2019-03-13 23:06:26

标签: npm npm-install

我有这个package.json文件:

{
 "author": "Frappe Technologies Pvt. Ltd.",
 "bugs": {
  "url": "https://github.com/frappe/frappe/issues"
 },
 "dependencies": {
  "awesomplete": "^1.1.2",
  "cookie": "^0.3.1",
  "express": "^4.16.2",
  "frappe-datatable": "^1.8.0",
  "frappe-gantt": "^0.1.0",
  "fuse.js": "^3.2.0",
  "highlight.js": "^9.12.0",
  "jsbarcode": "^3.9.0",
  "moment": "^2.20.1",
  "moment-timezone": "^0.5.21",
  "quill": "2.0.0-dev.2",
  "redis": "^2.8.0",
  "showdown": "^1.8.6",
  "socket.io": "^2.0.4",
  "superagent": "^3.8.2",
  "touch": "^3.1.0",
  "vue": "^2.5.17"
 },
 "devDependencies": {
  "babel-runtime": "^6.26.0",
  "chalk": "^2.3.2",
  "less": "^3.0.4",
  "node-sass": "^4.9.0",
  "rollup": "^0.65.0",
  "rollup-plugin-buble": "^0.19.2",
  "rollup-plugin-commonjs": "^8.3.0",
  "rollup-plugin-multi-entry": "^2.0.2",
  "rollup-plugin-node-resolve": "^3.0.2",
  "rollup-plugin-postcss": "^1.4.0",
  "rollup-plugin-uglify": "^3.0.0",
  "rollup-plugin-vue": "^4.3.2",
  "vue-template-compiler": "^2.5.17"
 },
 "homepage": "https://frappe.io",
 "license": "MIT",
 "name": "frappe",
 "repository": {
  "type": "git",
  "url": "git+https://github.com/frappe/frappe.git"
 },
 "scripts": {
  "build": "node rollup/build.js",
"production": "FRAPPE_ENV=production node rollup/build.js",
  "watch": "node rollup/watch.js"
 }
}

然后,我想使用“ npm install”命令来安装所有这些。

之后,这就是整个结果:

frappe@vps [~/frappe-bench]# npm install
npm WARN deprecated browserslist@1.7.7: Browserslist 2 could fail on reading Browserslist >3.0 config used in other tools.
npm ERR! prepareGitDep 1>
npm ERR! prepareGitDep > uws@9.14.0 install /home/frappe/.npm/_cacache/tmp/git-clone-1c74f6c4/node_modules/uws
npm ERR! prepareGitDep > node-gyp rebuild > build_log.txt 2>&1 || exit 0
npm ERR! prepareGitDep
npm ERR! prepareGitDep
npm ERR! prepareGitDep > wd@1.11.1 install /home/frappe/.npm/_cacache/tmp/git-clone-1c74f6c4/node_modules/wd
npm ERR! prepareGitDep > node scripts/build-browser-scripts
npm ERR! prepareGitDep
npm ERR! prepareGitDep
npm ERR! prepareGitDep > sauce-connect-launcher@1.2.4 postinstall /home/frappe/.npm/_cacache/tmp/git-clone-1c74f6c4/node_modules/sauce-connect-launcher
npm ERR! prepareGitDep > node scripts/install.js || nodejs scripts/install.js
npm ERR! prepareGitDep
npm ERR! prepareGitDep
npm ERR! prepareGitDep > parchment@2.0.0-dev prepare /home/frappe/.npm/_cacache/tmp/git-clone-1c74f6c4
npm ERR! prepareGitDep > npm run build
npm ERR! prepareGitDep
npm ERR! prepareGitDep
npm ERR! prepareGitDep > parchment@2.0.0-dev build /home/frappe/.npm/_cacache/tmp/git-clone-1c74f6c4
npm ERR! prepareGitDep > webpack --config webpack.conf.js
npm ERR! prepareGitDep
npm ERR! prepareGitDep
npm ERR! prepareGitDep 2> npm WARN install Usage of the `--dev` option is deprecated. Use `--only=dev` instead.
npm ERR! prepareGitDep npm WARN deprecated istanbul@0.4.5: This module is no longer maintained, try this instead:
npm ERR! prepareGitDep npm WARN deprecated   npm i nyc
npm ERR! prepareGitDep npm WARN deprecated Visit https://istanbul.js.org/integrations for other alternatives.
npm ERR! prepareGitDep npm WARN deprecated circular-json@0.5.9: CircularJSON is in maintenance only, flatted is its successor.
npm ERR! prepareGitDep npm WARN deprecated nodemailer@2.7.2: All versions below 4.0.1 of Nodemailer are deprecated. See https://nodemailer.com/status/
npm ERR! prepareGitDep npm WARN deprecated nomnom@1.8.1: Package no longer supported. Contact support@npmjs.com for more info.
npm ERR! prepareGitDep npm WARN deprecated babel-preset-es2015@6.24.1:   Thanks for using Babel: we recommend using babel-preset-env now: please read babeljs.io/env to update!
npm ERR! prepareGitDep npm WARN deprecated uws@9.14.0: New code is available at github.com/uNetworking/uWebSockets.js
npm ERR! prepareGitDep npm WARN deprecated mailcomposer@4.0.1: This project is unmaintained
npm ERR! prepareGitDep npm WARN deprecated socks@1.1.9: If using 2.x branch, please upgrade to at least 2.1.6 to avoid a serious bug with socket data flow and an import issue introduced in 2.1.0
npm ERR! prepareGitDep npm WARN deprecated node-uuid@1.4.8: Use uuid module instead
npm ERR! prepareGitDep npm WARN deprecated buildmail@4.0.1: This project is unmaintained
npm ERR! prepareGitDep npm WARN deprecated cryptiles@2.0.5: This version is no longer maintained. Please upgrade to the latest version.
npm ERR! prepareGitDep npm WARN deprecated boom@2.10.1: This version is no longer maintained. Please upgrade to the latest version.
npm ERR! prepareGitDep npm WARN deprecated hoek@2.16.3: This version is no longer maintained. Please upgrade to the latest version.
npm ERR! prepareGitDep /home/frappe/.npm/_cacache/tmp/git-clone-1c74f6c4/node_modules/webpack-cli/bin/config-yargs.js:89
npm ERR! prepareGitDep                          describe: optionsSchema.definitions.output.properties.path.description,
npm ERR! prepareGitDep                                                                     ^
npm ERR! prepareGitDep
npm ERR! prepareGitDep TypeError: Cannot read property 'properties' of undefined
npm ERR! prepareGitDep     at module.exports (/home/frappe/.npm/_cacache/tmp/git-clone-1c74f6c4/node_modules/webpack-cli/bin/config-yargs.js:89:48)
npm ERR! prepareGitDep     at /home/frappe/.npm/_cacache/tmp/git-clone-1c74f6c4/node_modules/webpack-cli/bin/webpack.js:60:27
npm ERR! prepareGitDep     at Object.<anonymous> (/home/frappe/.npm/_cacache/tmp/git-clone-1c74f6c4/node_modules/webpack-cli/bin/webpack.js:515:3)
npm ERR! prepareGitDep     at Module._compile (internal/modules/cjs/loader.js:701:30)
npm ERR! prepareGitDep     at Object.Module._extensions..js (internal/modules/cjs/loader.js:712:10)
npm ERR! prepareGitDep     at Module.load (internal/modules/cjs/loader.js:600:32)
npm ERR! prepareGitDep     at tryModuleLoad (internal/modules/cjs/loader.js:539:12)
npm ERR! prepareGitDep     at Function.Module._load (internal/modules/cjs/loader.js:531:3)
npm ERR! prepareGitDep     at Module.require (internal/modules/cjs/loader.js:637:17)
npm ERR! prepareGitDep     at require (internal/modules/cjs/helpers.js:22:18)
npm ERR! prepareGitDep npm ERR! code ELIFECYCLE
npm ERR! prepareGitDep npm ERR! errno 1
npm ERR! prepareGitDep npm ERR! parchment@2.0.0-dev build: `webpack --config webpack.conf.js`
npm ERR! prepareGitDep npm ERR! Exit status 1
npm ERR! prepareGitDep npm ERR!
npm ERR! prepareGitDep npm ERR! Failed at the parchment@2.0.0-dev build script.
npm ERR! prepareGitDep npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! prepareGitDep
npm ERR! prepareGitDep npm ERR! A complete log of this run can be found in:
npm ERR! prepareGitDep npm ERR!     /home/frappe/.npm/_logs/2019-03-13T22_58_30_721Z-debug.log
npm ERR! prepareGitDep npm ERR! code ELIFECYCLE
npm ERR! prepareGitDep npm ERR! errno 1
npm ERR! prepareGitDep npm ERR! parchment@2.0.0-dev prepare: `npm run build`
npm ERR! prepareGitDep npm ERR! Exit status 1
npm ERR! prepareGitDep npm ERR!
npm ERR! prepareGitDep npm ERR! Failed at the parchment@2.0.0-dev prepare script.
npm ERR! prepareGitDep npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! prepareGitDep
npm ERR! prepareGitDep npm ERR! A complete log of this run can be found in:
npm ERR! prepareGitDep npm ERR!     /home/frappe/.npm/_logs/2019-03-13T22_58_30_857Z-debug.log
npm ERR! prepareGitDep
npm ERR! premature close

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/frappe/.npm/_logs/2019-03-13T22_58_31_679Z-debug.log
frappe@vps [~/frappe-bench]#

您能告诉我发生了什么事,我该如何解决?

此过程是名为frappe的软件安装之一,但是我隔离了该错误,最后我发现这是NPM问题。

npm版本是在Centos 7操作系统上运行的6.4.1。

问候 海梅

1 个答案:

答案 0 :(得分:0)

使用npm时,我会遇到相同的问题,但是您可以使用另一个软件包管理器-Yarn。一切对我来说都很顺利。

安装命令:

npm install yarn --g

然后使用以下命令:

yarn install