Git Pull后Angular CLI项目缺少模块错误
我将Angular4与Angular/CLI 1.2.1一起使用。我能够很好地初始化并使用ng serve在本地运行应用程序。然而,在推到一个远程git repo,然后在另一台机器上完成我的工作后,我会出错 重新创建的步骤Git Pull后Angular CLI项目缺少模块错误,angular,angular-cli,Angular,Angular Cli,我将Angular4与Angular/CLI 1.2.1一起使用。我能够很好地初始化并使用ng serve在本地运行应用程序。然而,在推到一个远程git repo,然后在另一台机器上完成我的工作后,我会出错 重新创建的步骤 1.从远程git repo使用Angular CLI创建的Pull项目。 2.NPM安装。 3.发球 错误消息 D:/application/src/app/app.component.ts(1,27)中出错:找不到 模块'@angular/core' D:/applicat
1.从远程git repo使用Angular CLI创建的Pull项目。
2.NPM安装。
3.发球 错误消息 D:/application/src/app/app.component.ts(1,27)中出错:找不到 模块'@angular/core' D:/application/src/app/app.component.ts(8,14)中的错误:实验性 对decorators的支持是一个特性,它可能会在 未来版本。设置“experimentalDecorators”选项以删除此选项 警告 D:/application/src/app/app.module.ts(1,31)中出错:找不到 模块“@角度/平台浏览器” D:/application/src/app/app.module.ts(2,26)中出错:找不到 模块'@angular/core' D:/application/src/app/app.module.ts(16,14)中的错误:实验性 对decorators的支持是一个特性,它可能会在 未来版本。设置“experimentalDecorators”选项以删除此选项 警告 D:/application/src/main.ts(1,32)中出错:找不到模块 “@angular/core” D:/application/src/main.ts(2,40)中出错:找不到模块 “@角度/平台浏览器动态” 中的错误无法解析模块@angular/core D:/application/src/main.ts(1,32)中出错:找不到模块 “@angular/core” D:/application/src/main.ts(2,40)中出错:找不到模块 “@角度/平台浏览器动态” D:/application/src/app/app.module.ts(1,31)中出错:找不到 模块“@角度/平台浏览器” D:/application/src/app/app.module.ts(2,26)中出错:找不到 模块'@angular/core' D:/application/src/app/app.module.ts(16,14)中的错误:实验性 对decorators的支持是一个特性,它可能会在 未来版本。设置“experimentalDecorators”选项以删除此选项 警告 D:/application/src/app/app.component.ts(1,27)中出错:找不到 模块'@angular/core' D:/application/src/app/app.component.ts(8,14)中的错误:实验性 对decorators的支持是一个特性,它可能会在 未来版本。设置“experimentalDecorators”选项以删除此选项 警告 网页包:未能编译 NPM安装输出 npm警告首选全局节点-gyp@3.6.2应与-g一起安装 节点-sass@4.5.3安装D:\application\node\u modules\node sass 节点脚本/install.js 在C:\Users\user\AppData\Roaming\npm cache\node sass\4.5.3\win32-x64-48\u binding.node找到缓存的二进制文件 节点-sass@4.5.3安装后D:\application\node\u modules\node sass 节点脚本/build.js 二进制文件位于D:\application\node\u modules\node sass\vendor\win32-x64-48\binding.node 测试二进制 二进位就可以了
…无错误地继续安装(包括@angular/core和其他软件包)。从angular项目层次结构中删除node_modules文件夹并使用npm install重新安装所有软件包的简便方法。转到终端中的项目文件夹,键入
npm rebuild
如果您的节点\u模块不存在或没有所需的所有依赖项,请删除并运行npm install
请参阅此线程:尝试删除package-lock.json文件,然后安装node_modules npm install错误表明node_modules目录中缺少angular(或node_modules本身缺少)。npm安装的输出是什么?上面添加了npm安装输出。无错误。将您的angular库更新为最新版本,然后尝试运行ng serve