[英]Angular2/4 Module build failed: Error
I'm using Angular2-webpack-starter . 我正在使用Angular2-webpack-starter 。 I need to move all these sources (except the package.json
file) to frontend_src
folder. 我需要将所有这些源( package.json
文件除外)移动到frontend_src
文件夹。 I did it, I replaced all paths within the project but when I'm trying the npm start
command (after npm install
of course) I'm getting this (I replaced path to project with the {{project_path}}
here, the path is correct): 我做到了,我替换了项目中的所有路径但是当我尝试npm start
命令时(当然是在npm install
之后)我得到了这个(我用这里的{{project_path}}
替换了项目的路径,路径是正确的):
ERROR in ./frontend_src/src/main.browser.ts
Module build failed: Error
at new FatalError (D:\{{project_path}}\node_modules\tslint\lib\error.js:31:23)
at Function.findConfiguration (D:\{{project_path}}\node_modules\tslint\lib\configuration.js:55:15)
at parseConfigFile (D:\{{project_path}}\node_modules\tslint-loader\index.js:44:24)
at resolveOptions (D:\{{project_path}}\node_modules\tslint-loader\index.js:35:27)
at Object.module.exports (D:\{{project_path}}\node_modules\tslint-loader\index.js:139:17)
@ multi (webpack)-dev-server/client?http://localhost:3000 ./frontend_src/src/main.browser.ts
ERROR in ./frontend_src/src/polyfills.browser.ts
Module build failed: Error
at new FatalError (D:\{{project_path}}\node_modules\tslint\lib\error.js:31:23)
at Function.findConfiguration (D:\{{project_path}}\node_modules\tslint\lib\configuration.js:55:15)
at parseConfigFile (D:\{{project_path}}\node_modules\tslint-loader\index.js:44:24)
at resolveOptions (D:\{{project_path}}\node_modules\tslint-loader\index.js:35:27)
at Object.module.exports (D:\{{project_path}}\node_modules\tslint-loader\index.js:139:17)
@ multi (webpack)-dev-server/client?http://localhost:3000 ./frontend_src/src/polyfills.browser.ts
How you can see, there is no explanation where is the problem. 你怎么看,没有解释问题在哪里。 I tried to google it but all similar issues have the explanation why compilation was failed. 我试图谷歌它,但所有类似的问题都解释了为什么编译失败。 I tried the clean install and npm cache clean --force
command. 我尝试了clean install和npm cache clean --force
命令。
Can someone tell me where is the problem? 谁能告诉我问题出在哪里?
It is probably because you have also moved tslint.json into your client folder. 这可能是因为您还将tslint.json移动到了客户端文件夹中。 You could move it back to where it was (usually at root of your project work-folder), or create a new mini tslint.json there with 你可以将它移回原来的位置(通常是项目工作文件夹的根目录),或者在那里创建一个新的mini tslint.json
{
"extends": "./node_modules/shared_library/tslint.json"
}
You may also checkout issue here: https://github.com/wbuchwalter/tslint-loader/issues/57 您也可以在此处查看问题: https : //github.com/wbuchwalter/tslint-loader/issues/57
as well as https://github.com/wbuchwalter/tslint-loader/issues/22 以及https://github.com/wbuchwalter/tslint-loader/issues/22
I tried specify configFile
Option in webpack config, but it does not seem working. 我尝试在webpack配置中指定configFile
选项,但它似乎不起作用。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.