我最近在Angular上开始了一个新项目,并且需要在我的package.json文件中安装这些软件包。 package.json文件是您从新的'中获得的文件。我已经尝试了无数次试图让它工作,但我在我的两台计算机上始终得到相同的结果,我不知道为什么。我已经倾倒了几个小时,但不打算放弃。有没有人有任何想法为什么会这样?我将在下面提供详细信息。
我尝试运行npm install,它执行了一段时间,然后我收到以下错误:
npm ERR! enoent ENOENT:没有这样的文件或目录,重命名' D:\ Project \ FrontEnd \ node_modules \ @ angular-devkit \ build-optimizer \ node_modules \ typescript' - > ' d:\项目\前端\ node_modules \ @角的devkit \集结优化\ node_modules.typescript.DELETE'
我现在非常绝望,因为我不知道我做错了什么。 (我之前已经开始工作!!)任何建议都会有所帮助。任何。再一次,package.json文件是从新的'生成的。命令,但如果需要,我可以在这里发布。 (在任何人问之前,不是因为它在D:/驱动器上,它在C:/驱动器上做同样的事情。)
{
"name": "my-app",
"version": "0.0.0",
"license": "MIT",
"scripts": {
"ng": "ng",
"start": "ng serve",
"build": "ng build --prod",
"test": "ng test",
"lint": "ng lint",
"e2e": "ng e2e"
},
"private": true,
"dependencies": {
"@angular/animations": "^5.2.0",
"@angular/common": "^5.2.0",
"@angular/compiler": "^5.2.0",
"@angular/core": "^5.2.0",
"@angular/forms": "^5.2.0",
"@angular/http": "^5.2.0",
"@angular/platform-browser": "^5.2.0",
"@angular/platform-browser-dynamic": "^5.2.0",
"@angular/router": "^5.2.0",
"core-js": "^2.4.1",
"rxjs": "^5.5.6",
"zone.js": "^0.8.19"
},
"devDependencies": {
"@angular/cli": "~1.7.3",
"@angular/compiler-cli": "^5.2.0",
"@angular/language-service": "^5.2.0",
"@types/jasmine": "~2.8.3",
"@types/jasminewd2": "~2.0.2",
"@types/node": "~6.0.60",
"codelyzer": "^4.0.1",
"jasmine-core": "~2.8.0",
"jasmine-spec-reporter": "~4.2.1",
"karma": "~2.0.0",
"karma-chrome-launcher": "~2.2.0",
"karma-coverage-istanbul-reporter": "^1.2.1",
"karma-jasmine": "~1.1.0",
"karma-jasmine-html-reporter": "^0.2.2",
"protractor": "~5.1.2",
"ts-node": "~4.1.0",
"tslint": "~5.9.1",
"typescript": "~2.5.3"
}
}
答案 0 :(得分:0)