Questions tagged «angular-cli-v6»

30
找不到模块“ @ angular-devkit / build-angular”
更新到Angular 6.0.1后,出现以下错误ng serve: Could not find module "@angular-devkit/build-angular" from "/home/Projects/myProjectName". Error: Could not find module "@angular-devkit/build-angular" from "/home/Projects/myProjectName". at Object.resolve (/home/Projects/myProjectName/node_modules/@angular-devkit/core/node/resolve.js:141:11) at Observable.rxjs_1.Observable [as _subscribe] (/home/Projects/myProjectName/node_modules/@angular-devkit/architect/src/architect.js:132:40) ng update说一切都井井有条。删除node_modules文件夹和全新npm install安装也无济于事。 我的项目基于ng2-admin(Angular4版本)。这是我的package.json依赖项: "dependencies": { "@angular/animations": "^6.0.1", "@angular/common": "^6.0.1", "@angular/compiler": "^6.0.1", "@angular/core": "^6.0.1", "@angular/forms": "^6.0.1", "@angular/http": "^6.0.1", "@angular/platform-browser": "^6.0.1", "@angular/platform-browser-dynamic": "^6.0.1", "@angular/platform-server": "^6.0.1", …

10
@ types / googlemaps / index.d.ts'不是一个模块
我想在Angular项目中使用Google Maps API,因此我使用了以下两个命令来安装npm软件包: npm install @agm/core --save-dev npm install @types/googlemaps --save-dev 我将此行添加到我的组件中: import {} from "@types/googlemaps"; 但是我在VS Code中看到了这两个错误: [ts] File 'h:/Angular Projects/Breakfast/client/breakfast/node_modules/@types/googlemaps/index.d.ts' is not a module. [ts] Cannot import type declaration files. Consider importing 'googlemaps' instead of '@types/googlemaps'. 我添加了这些行 "types": ["googlemaps"] "moduleResolution": "node" 到tsconfig.json和tsconfig.spec.json,但仍然没有运气。在Chrome开发者工具上,我看到以下错误: Error: Uncaught (in promise): TypeError: Cannot …
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.