当前位置: 首页 > 知识库问答 >
问题:

npm安装时的WAR和ERR

姚韬
2023-03-14

平均堆栈应用程序模板创建
我需要通过npm安装应用程序的依赖项:
npm install

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

提前致谢

共有1个答案

凌朗
2023-03-14

看起来用作开发依赖项的npm模块已经过时了。这就是为什么你会收到警告信息。

关于ERR,可能没有2.6.0版本的版本可用于辅助功能-开发人员-工具。将package.json文件中的版本修改为2.10.0(目前的最新版本),看看它是否有效。

更新

 类似资料:
  • 由于Node.js平台是在后端运行JavaScript代码,所以,必须首先在本机安装Node环境。 安装Node.js 目前Node.js的最新版本是7.6.x。首先,从Node.js官网下载对应平台的安装程序,网速慢的童鞋请移步国内镜像。 在Windows上安装时务必选择全部组件,包括勾选Add to Path。 安装完成后,在Windows环境下,请打开命令提示符,然后输入node -v,如果

  • 我是一个初学者,我正在努力学习角,所以我试图安装一个新的项目与角种子。但是当我安装npm时,我得到一个错误,我不知道是从哪里来的。我已经安装了节点。版本是5.5.0。这是我在控制台得到的错误。

  • 我是cypress的新手,我想知道vsI在谷歌上搜索了一下,但没有找到任何答案

  • 我知道这个问题看起来像个愚蠢的问题,但我是使用NodeJS的新手。 在我安装了nodejs之后,我编写了这个命令来检查它

  • 问题内容: 在我的服务器(CentOS 7.2)中,安装依赖项: 但是我得到下面的错误: 在中,信息如下: 我尝试使用: 清理npm,但失败: 问题答案: 最后,我删除了: 并删除, 然后重新安装: 这个对我有用。

  • 我使用npm很长一段时间了(使用Win10)-在防火墙/权限等方面没有改变任何东西,突然间我在尝试安装任何软件包时出现以下错误: C:\udemy-button>npm安装引导程序--保存npm错误!路径C:\udemy-button\node_modules\fsevents\node_modules\aws4\package.json npm err!代码EPERM npm错误!错误-4048