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 的 ...
随机推荐
- apache2 + django 路径问题
问题: 在代码中使用sys.path.append(), 添加模块路径后,仍然报错找不到包. 虽然在LD_LIBRARY_PATH中配置了.so文件打路径,仍然报错找不到. 原因: 检查apahce2 ...
- (转)Python 标准库笔记:string模块
String模块包含大量实用常量和类,以及一些过时的遗留功能,并还可用作字符串操作. 原文:http://www.10tiao.com/html/384/201709/2651305041/1.htm ...
- An internal error occurred during: "Initializing Java Tooling". Eclipse启动发生的错误
An internal error occurred during: “Initializing Java Tooling” 错误经常是莫名其妙的出现这种总错误,解决办法: 1.eclipse -&g ...
- springmvc整合mybatis详细教程
需求:整合springmvc和mybatis 整合的目标是:控制层采用springmvc,持久层使用mybatis 整合思想 dao层: 1.SqlMapConfig.xml.空文件即可.但是需要头文 ...
- python日志模块logging学习
介绍 Python本身带有logging模块,其默认支持直接输出到控制台(屏幕),或者通过配置输出到文件中.同时支持TCP.HTTP.GET/POST.SMTP.Socket等协议,将日志信息发送到网 ...
- [转]js和jquery获取窗体高度
JQuery获取浏览器窗口宽高,文档宽高 2010-01-20 08:59<script type="text/javascript">$(document).read ...
- Firebird execute block 批处理
火鸟的批处理,效率好高,使用简单. execute block as declare variable i ; begin ) do begin :i = :i + ; insert into m_u ...
- 理解 Azure 虚拟机的性能监视
随着越来越多的用户将生产应用迁移到云平台,一些传统 IT 的运维功能也相应的需要改变,例如监控,备份等等.我们希望通过这一系列的文章来协助用户更好的理解在 Azure 云平台上实现资源监控的方法. 在 ...
- JVM(一)
Java 环境 Java 运行过程 下面几张图,我们可以了解到 Java 这门语言是如何进行运行的. java文件通过编译器编译成class文件,然后在虚拟机中转化为机器语言运行在机器上. 上图展示了 ...
- 3、springboot之热部署
我用的是idea 一.开启idea自动make功能 1.CTRL + SHIFT + A --> 查找make project automatically --> 选中 2.CTRL + ...