简体   繁体   English

找不到模块:错误:无法解析“/usr/src/app/src”中的“@angular/localize/init”

[英]Module not found: Error: Can't resolve '@angular/localize/init' in '/usr/src/app/src'

I've added the @angular/localize package during an update from Angular 8 to 9. My polyfill.ts has the following import:在从 Angular 8 到 9 的更新期间,我添加了 @angular/localize package。我的 polyfill.ts 具有以下导入:

import '@angular/localize/init';

My app is compiling and spinning up fine on a browser locally but when I run a production build I'm getting the following error:我的应用程序在本地浏览器上编译和运行良好,但是当我运行生产版本时,我收到以下错误:

在此处输入图像描述

Any idea what isn't being resolved here?知道这里没有解决什么吗? I can see the module installed correctly in the node_modules/@angular/localize directory.我可以在 node_modules/@angular/localize 目录中看到正确安装的模块。

Run this command in terminal在终端中运行此命令

npm install @angular/localize --save

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 在Angular 7中获取错误./src/app/app.component.ts找不到模块:错误:无法解析 - Get error in Angular 7 ./src/app/app.component.ts Module not found: Error: Can't resolve 找不到模块:错误:无法解析“D:\\ask\\src\\app\\service”中的“@angular/http” - Module not found: Error: Can't resolve '@angular/http' in 'D:\ask\src\app\service' 未找到模块:错误:无法解析 'D:\Angular\httpErrorHandlingExample\src\app' 中的 'rxjs/add/observable/throw' - Module not found: Error: Can't resolve 'rxjs/add/observable/throw' in 'D:\Angular\httpErrorHandlingExample\src\app' Angular 4错误-./src/main.ts中找不到错误:错误:无法解析'./$$_gendir/app/app.app.module.ngfactory' - Angular 4 error - ERROR in ./src/main.ts Module not found: Error: Can't resolve './$$_gendir/app/app.module.ngfactory' 找不到模块:错误:无法解析“F:\\Angular\\HttpServices\\http-services\\src\\app”中的“rxjs/add/operator/catch” - Module not found: Error: Can't resolve 'rxjs/add/operator/catch' in 'F:\Angular\HttpServices\http-services\src\app' Angular 5:找不到模块:错误:无法解析'@ angular / forms / src / validators' - Angular 5: Module not found: Error: Can't resolve '@angular/forms/src/validators' 在 src/app 之外定义的模块显示错误“找不到模块:错误:无法解析 './' in” - modules defined outside src/app showing error "Module not found: Error: Can't resolve './' in" 找不到模块:错误:无法解析“@angular/core/src/render3”:ViewChildren QueryList - Module not found: Error: Can't resolve '@angular/core/src/render3': ViewChildren QueryList 当广告在我的文件上添加代码,就像在视频上一样时,我得到错误“ ./src/app/app.module.ts找不到模块:错误:无法解析'@ angular / http'” - when ad add code on my file as it is on video i get error “./src/app/app.module.ts Module not found: Error: Can't resolve '@angular/http'” 错误 in./src/app/app.component.ts 找不到模块:错误:无法解析 './app.component.css' - ERROR in ./src/app/app.component.ts Module not found: Error: Can't resolve './app.component.css'
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM