cnpm install 之后 Angular2 Build --prod 报错
95% emittingUnhandled rejection Error: ENOENT: no such file or directory, open 'E:\git_0.28\adminTemplate\node_modules\_@angular_animations@4.4.3@@angular\package.json' at Error (native)
at Object.fs.openSync (fs.js:641:18)
at Object.fs.readFileSync (fs.js:509:33)
at LicenseExtractor.readPackageJson (E:\git_0.28\adminTemplate\node_modules\_license-webpack-plugin@1.0.1@license-webpack-plugin\dist\LicenseExtractor.js:121:23)

估计就是这个原因了
解决方案:
1、使用 ng build --prod --no-extract-license 可以正常编译
2、删除node_modules,重新使用npm install来安装(即使翻墙也较慢)
安装cnpm:
npm install -g cnpm --registry=https://registry.npm.taobao.org
cnpm install 之后 Angular2 Build --prod 报错的更多相关文章
- angular2 ng build --prod 报错:Module not found: Error: Can't resolve './$$_gendir/app/app.module.ngfactory'
调试页面 ng serve 正常 ng build 也正常 ng build --prod 异常:Module not found: Error: Can't resolve './$$_gendir ...
- ionic2踩坑之ionic build android报错
自己项目一直跑的好好好好的,build还是run都没问题,今天忽然一个小伙伴build一直报错.\ 错误如下: Error occurred during initialization of VMCo ...
- win 8 pip install 或者 pycharm 安装 paramiko 报错
这是安装时报错的最后几行 creating build\temp.win-amd64-3.5\Release\build creating build\temp.win-amd64-3.5\Relea ...
- 各种”xxx“ native gem required installed build tools 报错
报错情况:(类似毛病 提示native gem require installed builld tools的解决方法是一样的)) 解决方法:http://rubyinstaller.org/down ...
- npm run build:h5 报错
1.报错信息 (1)asset size limit: The following asset(s) exceed the recommended size limit (244 KiB). (2)e ...
- Telegram学习解析系列(三) : Build Telegram报错分析总结
正好通过这次 Telegram 的运行,很想把常见的项目运行的错误好好的总结一下,在前面的博客中,又星星散散的总结过错误和一些警告的消除方法,这次把错误处理一下,还有Telegram项目中有999+的 ...
- Docker build 安装报错, Could not open requirments file: [Errno 2] No such file or directory:'requirements.txt'
docker安装教程 https://docs.docker.com/get-started/part2/#build-the-app 相关帖子 https://stackoverflow.com/q ...
- AndroidStudio build.gradle 报错
Android Studio. I'm getting this kind of error during application run. Error:Execution failed for ta ...
- npm install 安装项目依赖,报错ERR! Unexpected end of JSON input while parsing near的方法汇总
问题描述: npm install 安装项目依赖的时候,有时会出现: ERR! Unexpected end of JSON input while parsing near 错误 原因: npm 的 ...
随机推荐
- JavaScript 刷题一
最近读<JavaScirpt编程精解>,想把里面的三个大的程序实现,现在记录下来. 问题一: 从下面这封信中,emily奶奶每封信的结尾都会用同样的格式注明哪只猫出生了,哪只猫死去了.现要 ...
- (转)python标准库中socket模块详解
python标准库中socket模块详解 socket模块简介 原文:http://www.lybbn.cn/data/datas.php?yw=71 网络上的两个程序通过一个双向的通信连接实现数据的 ...
- 判断文本(text_to_be_present_in_element)
判断文本 在做结果判断的时候,经常想判断某个元素中是否存在指定的文本,如登录后判断页面中是账号是否是该用户的用户名.在前面的登录案例中,写了一个简单的方法,但不是公用的,在 EC 模块有个方法是可以专 ...
- IDEA里运行代码时出现Error:scalac: error while loading JUnit4, Scala signature JUnit4 has wrong version expected: 5.0 found: 4.1 in JUnit4.class错误的解决办法(图文详解)
不多说,直接上干货! 问题详情 当出现这类错误时是由于版本不匹配造成的 Information:// : - Compilation completed with errors and warnin ...
- Git学习系列之为什么选择Git?
为什么选择Git? 流行的软件版本开源管理软件,有CVS.SVN.GIT版本管理工具,Git的优势在哪里呢? Git 和 CVS.SVN不同,是一个分布式的源代码管理工具,它很强,也很快,Linux内 ...
- springboot使用Freemarker继承
最近需要用到Freemarker的继承.但是发现没有关于springboot配置Freemarker的继承的.所以趁现在有时间写个博客. 1. Freemarker继承介绍 Freemarker 通过 ...
- C运算符总结
算术运算符 加减 + - 自左向右 +-同级 乘除取模 * % / 自左向右 高于+ - 自加自减 ++ -- 右结合性 高于基本算术运算符 正负 -+ 自右向左 跟++ --同级 赋值运算符 赋值 ...
- [android] 安卓自定义样式和主题
简单练习自定义样式和主题,样式是加在View上,主题是加在Application或者Activity上 styles.xml <?xml version="1.0" enco ...
- ccf-201712-2 游戏
问题描述 有n个小朋友围成一圈玩游戏,小朋友从1至n编号,2号小朋友坐在1号小朋友的顺时针方向,3号小朋友坐在2号小朋友的顺时针方向,--,1号小朋友坐在n号小朋友的顺时针方向. 游戏开始,从1号小朋 ...
- ntp时钟服务器
NTP服务器时钟校准的基本流程: (1):NTP客户端向NTP服务器发出一个时间请求包(UDP包),其中包含了该包离开客户端时的时间戳. (2):当服务器接收到该包时.填入包到达时的时间戳.包离开时的 ...