我正在尝试将依赖项安装到我的项目中,但是当我运行命令时
npm install
这给我一个错误,这是错误
npm WARN不推荐使用nodemailer@2.7.2:所有版本低于4.0.1 Nodemailer已弃用。请参阅https://nodemailer.com/status/ npm WARN 不推荐使用node-uuid@1.4.8:使用uuid模块代替npm ERR!码 ETARGET npm ERR! notarget找不到匹配的版本 @ agm / core @ ^ 5.0.0-beta.1 npm ERR! notarget在大多数情况下你或者其中一个 您的依赖项请求npm ERR!没有包版本 那不存在。错误的ERR! notarget npm ERR! notarget是的 指定为' cubic-demo'的依赖关系错误的ERR! notarget
我的package.json是下一个:
{
"name": "cubic-demo",
"version": "0.0.0",
"license": "MIT",
"scripts": {
"ng": "ng",
"start": "ng serve",
"build": "ng build",
"test": "ng test",
"lint": "ng lint",
"e2e": "ng e2e"
},
"private": true,
"dependencies": {
"@agm/core": "^5.0.0-beta.1",
"@angular/animations": "^5.2.9",
"@angular/cdk": "^5.2.4",
"@angular/common": "^5.2.9",
"@angular/compiler": "^5.2.9",
"@angular/core": "^5.2.9",
"@angular/forms": "^5.2.9",
"@angular/http": "^5.2.9",
"@angular/material": "^5.2.4",
"@angular/platform-browser": "^5.2.9",
"@angular/platform-browser-dynamic": "^5.2.9",
"@angular/router": "^5.2.9",
"@ng-bootstrap/ng-bootstrap": "^1.0.0-beta.4",
"@swimlane/ngx-datatable": "^11.2.0",
"@types/chartist": "^0.9.35",
"angular-calendar": "^0.23.7",
"angular-draggable-droppable": "^2.0.0",
"angular-io-slimscroll": "^2.3.3",
"angular2-datatable": "^0.6.0",
"angular2-lightbox": "^1.1.5",
"angular2-material-datepicker": "^0.5.0",
"bootstrap": "^4.0.0",
"bootstrap-select": "^1.12.4",
"chartist": "^0.11.0",
"core-js": "^2.4.1",
"css-animator": "^2.1.1",
"jquery": "^3.3.1",
"jquery-sparkline": "^2.4.0",
"materialize-css": "^0.100.1",
"morris.js": "^0.5.0",
"ng-chartist": "^1.1.1",
"ng-click-outside": "^3.2.0",
"ng-loading-spinner": "^1.0.3",
"ng-select": "^1.0.0-beta.6",
"ng2-file-upload": "^1.2.1",
"ng2-opd-popup": "^1.1.21",
"ng2-popup": "^0.4.0",
"ng2-ui-switch": "^1.0.2",
"ng4-loading-spinner": "1.1.3",
"ngx-chips": "^1.5.3",
"ngx-color-picker": "^5.3.8",
"ngx-quill-editor": "^2.2.1",
"peity": "^3.2.1",
"raphael": "^2.2.7",
"rxjs": "^5.4.2",
"zone.js": "^0.8.14",
"nodemailer": "^2.3.2"
},
"devDependencies": {
"@angular/cli": "^1.7.3",
"@angular/compiler-cli": "^5.2.9",
"@angular/language-service": "^5.2.9",
"@types/jasmine": "~2.8.6",
"@types/jasminewd2": "~2.0.2",
"@types/node": "~9.4.7",
"codelyzer": "~4.2.1",
"jasmine-core": "~3.1.0",
"jasmine-spec-reporter": "~4.2.1",
"karma": "~2.0.0",
"karma-chrome-launcher": "~2.2.0",
"karma-cli": "~1.0.1",
"karma-coverage-istanbul-reporter": "^1.2.1",
"karma-jasmine": "~1.1.0",
"karma-jasmine-html-reporter": "^1.0.0",
"protractor": "~5.3.0",
"ts-node": "~5.0.1",
"tslint": "~5.9.1",
"typescript": "~2.7.2"
}
}
答案 0 :(得分:1)
在命令行CD到项目目录中,其中存在package.json文件,执行以下命令
npm update
然后执行以下命令,不应该看到任何输出
npm outdated
如果仍然无效,请执行以下命令
npm install nodemailer@latest
npm install uuid@latest