node.js - npm install 上的 WAR 和 ERR

标签 node.js mean-stack npm-install

Mean Stack 应用程序模板已创建
我需要通过 NPM 安装应用程序的依赖项:
npm 安装

npm install --dev

npm install --only=dev

Package.json


    {
      "name": "mean",
      "description": "Full-Stack JavaScript with MongoDB, Express, AngularJS, and Node.js",
      "version": "0.4.0",
      "private": false,
      "author": "2",
      "license": "MIT",
      "repository": {
        "type": "git",
        "url": "https://github.com/meanjs/mean.git"
      },
      "engines": {
        "node": ">=0.10.28",
        "npm": ">=1.4.28"
      },
      "scripts": {
        "start": "grunt",
        "test": "grunt test",
        "postinstall": "bower install --config.interactive=false"
      },
      "dependencies": {
        "acl": "~0.4.4",
        "async": "^1.3.0",
        "body-parser": "^1.13.1",
        "bower": "^1.4.1",
        "chalk": "^1.1.0",
        "compression": "^1.5.0",
        "connect-flash": "~0.1.1",
        "connect-mongo": "~0.8.1",
        "consolidate": "~0.13.1",
        "cookie-parser": "^1.3.2",
        "express": "^4.13.1",
        "express-session": "^1.11.3",
        "forever": "~0.14.2",
        "glob": "^5.0.13",
        "grunt": "0.4.5",
        "grunt-cli": "~0.1.13",
        "helmet": "~0.9.1",
        "jasmine-core": "^2.3.4",
        "lodash": "^3.10.1",
        "method-override": "^2.3.3",
        "mocha": "~1.20.0",
        "mongoose": "^4.0.6",
        "morgan": "^1.6.1",
        "multer": "0.1.8",
        "node-pre-gyp": "0.6.4",
        "nodemailer": "^1.4.0",
        "passport": "~0.2.2",
        "passport-facebook": "^2.0.0",
        "passport-github": "~0.1.5",
        "passport-google-oauth": "~0.2.0",
        "passport-linkedin": "~0.1.3",
        "passport-local": "^1.0.0",
        "passport-paypal-openidconnect": "^0.1.1",
        "passport-twitter": "^1.0.2",
        "phantomjs": ">=1.9.0",
        "serve-favicon": "^2.3.0",
        "socket.io": "^1.3.5",
        "swig": "^1.4.2",
        "validator": "^3.41.2"
      },
      "devDependencies": {
        "grunt-concurrent": "^2.0.0",
        "grunt-contrib-copy": "~0.8.0",
        "grunt-contrib-csslint": "~0.4.0",
        "grunt-contrib-cssmin": "~0.12.3",
        "grunt-contrib-jshint": "~0.11.2",
        "grunt-contrib-less": "^1.0.1",
        "grunt-contrib-sass": "~0.9.2",
        "grunt-contrib-uglify": "~0.9.1",
        "grunt-contrib-watch": "~0.6.1",
        "grunt-env": "~0.4.4",
        "grunt-karma": "~0.11.2",
        "grunt-mocha-test": "~0.12.7",
        "grunt-ng-annotate": "^1.0.1",
        "grunt-node-inspector": "~0.2.0",
        "grunt-nodemon": "~0.4.0",
        "grunt-protractor-runner": "^2.0.0",
        "gulp": "^3.9.0",
        "gulp-concat": "^2.6.0",
        "gulp-csslint": "~0.1.5",
        "gulp-cssmin": "~0.1.7",
        "gulp-jshint": "^1.11.2",
        "gulp-karma": "~0.0.4",
        "gulp-less": "^3.0.3",
        "gulp-livereload": "^3.8.0",
        "gulp-load-plugins": "^1.0.0-rc.1",
        "gulp-mocha": "^2.1.2",
        "gulp-ng-annotate": "^1.0.0",
        "gulp-nodemon": "^2.0.3",
        "gulp-protractor": "^1.0.0",
        "gulp-rename": "^1.2.2",
        "gulp-sass": "^2.0.3",
        "gulp-uglify": "^1.2.0",
        "karma": "~0.12.37",
        "karma-chrome-launcher": "~0.2.0",
        "karma-coverage": "~0.4.2",
        "karma-firefox-launcher": "~0.1.6",
        "karma-jasmine": "~0.3.6",
        "karma-ng-html2js-preprocessor": "^0.1.2",
        "karma-phantomjs-launcher": "~0.2.0",
        "load-grunt-tasks": "^3.2.0",
        "run-sequence": "^1.1.1",
        "should": "^7.0.1",
        "supertest": "^1.0.1"
      }
    }

Tried above methods but returns some WAR and ERR


please see the error

提前致谢

最佳答案

看起来用作开发依赖项的 npm 模块已经过时了。这就是您收到警告消息的原因。

关于 ERR,可访问性开发人员工具可能不再有可用的 2.6.0 版本。将 package.json 文件中的版本修改为 2.10.0(目前最新版本)并查看是否有效。

更新

摆弄您提供的 package.json 后,由于不断收到大约 938475938475 错误,我无法使 npm install --only=dev 在我的 Linux 计算机上运行。

我注意到您使用的平均版本是 0.4.0,这是相当旧的。我建议您按照installation steps from the original repository使用当前版本。

当我在克隆的存储库上发出 npm install 并安装了似乎整个 npmjs 生态系统后,该应用程序就开始工作了。

希望这有帮助。

关于node.js - npm install 上的 WAR 和 ERR,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36963527/

相关文章:

angularjs - 在基于 REST 的应用程序中,$resource AngularJS 客户端中的 PUT/更新操作失败( Mongoose 插入/更新问题)。

node.js - 在 v8-debug@0.4.6 安装脚本 'node-pre-gyp install --fallback-to-build 时失败

node.js - npm install 不是首先检查全局版本吗?

node.js - 如何在 ubuntu 中将 npm 安装时间的等待超时从 30000 毫秒增加到 60000 毫秒

node.js - 在 Symfony2 应用程序中包含 Node.JS + Socket.IO

node.js - 使用 mongoose 更新 MongoDB 文档时出现问题

node.js - gulp serve : module. js 471,错误:找不到模块 './build/release/encode.node'

node.js - 测试 findOneAndUpdate upsert 重复预防

javascript - ios-deploy 安装失败

node.js - 如何桥接字节数组和音频流?