我将我的Angular 4项目文件夹从auction-life重命名为auction-05-life,并在以下三处替换了旧的项目名称:
- angular-cli.json第4行
- app.e2e-spec.ts第3行
- package.json第2行
然后我运行了ng serve
,结果出现了这个错误信息:
你似乎没有依赖于"@angular/core"。这是一个错误。
编辑:遵循下面评论区的指示,我重新启动了终端窗口,确保我在正确的项目文件夹auction-05-life中,运行了npm install
,然后运行ng serve
,这次得到了不同的异常:
module.js:471
throw err;
^
Error: Cannot find module 'heimdalljs-logger'
at Function.Module._resolveFilename (module.js:469:15)
at Function.Module._load (module.js:417:25)
...
./node_modules/.bin/ng serve
吗? - Rajezng serve
时所在的文件夹是正确的吗?@angular/core
应该已经安装在node_modules
中并且存在于node_modules
文件夹中。 - Lazar Ljubenović