我已经从另一个磁盘复制了我的angular 6应用程序的所有文件和文件夹( node_modules 文件夹除外),现在我正在寻找解决方案以像在节点项目中一样对其进行初始化。
考虑这个(node.js示例):
npm install
,该下载会下载所有引用package.json
的依赖项npm start
更好地启动了节点应用。我正在为 Angular应用尝试相同的操作,做了npm install
,然后是ng serve
,但出现了以下错误:
在以下位置找不到模块“ @ angular-devkit / build-angular” “ E:\ ang \ dragAngTodo”。
package.json
{
"name": "drag-todo",
"version": "0.0.0",
"scripts": {
"ng": "ng",
"start": "ng serve",
"build": "ng build",
"test": "ng test",
"lint": "ng lint",
"e2e": "ng e2e"
},
"private": true,
"dependencies": {
"@angular/animations": "^7.0.1",
"@angular/common": "^7.0.1",
"@angular/compiler": "^7.0.1",
"@angular/core": "^7.0.1",
"@angular/forms": "^7.0.1",
"@angular/http": "^7.0.1",
"@angular/platform-browser": "^7.0.1",
"@angular/platform-browser-dynamic": "^7.0.1",
"@angular/router": "^7.0.1",
"@ng-bootstrap/ng-bootstrap": "^4.0.0",
"core-js": "^2.5.4",
"rxjs": "^6.3.3",
"zone.js": "~0.8.26"
},
"devDependencies": {
"@angular/cli": "~7.0.3",
"@angular/compiler-cli": "^7.0.1",
"@angular/language-service": "^7.0.1",
"@types/jasmine": "~2.8.9",
"@types/jasminewd2": "~2.0.5",
"@types/node": "~10.12.1",
"codelyzer": "~4.5.0",
"jasmine-core": "~3.3.0",
"jasmine-spec-reporter": "~4.2.1",
"karma": "~3.1.1",
"karma-chrome-launcher": "~2.2.0",
"karma-coverage-istanbul-reporter": "~2.0.4",
"karma-jasmine": "~1.1.1",
"karma-jasmine-html-reporter": "^1.4.0",
"protractor": "~5.4.1",
"ts-node": "~7.0.1",
"tslint": "~5.11.0",
"typescript": "~3.1.4"
}
}