building error
See original GitHub issuewhen i run npm run electron:windows or npm run build:prod
it shows an error and it says that angular 5+ needs cli 1.5 ++
and i have both of them globaly and in the repo
please fix it as soon as possible
Issue Analytics
- State:
- Created 6 years ago
- Reactions:3
- Comments:12 (2 by maintainers)
Top Results From Across the Web
Fix a build error
Fix a build error · Right-click anywhere in the Error List window. · Select Copy List. · Open Microsoft Excel or Word (or...
Read more >Project build errors and warnings (PRJxxxx) - Microsoft Learn
The Visual Studio compilers and build tools can report many kinds of errors and warnings. After an error or warning is found, the...
Read more >Oh dear! Build errors? - LoopDocs - GitHub Pages
This page contains build error help for people updating their Loop app as well as brand new Loop app builders. Review the "obvious"...
Read more >"Error building project: The build hook failed with status code 1".
In the deployment error log, the error message ends with: "Error building project: The build hook failed with status code 1. Aborted build"....
Read more >I am getting this error that " building has encountered an error ...
I simplied started a new project to learn about graphics and a class. immediately I clicked on ok, there was immediately a popup...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I fixed the issue. You can pull the repo (master branch or 2.1.0 tag); Please follow those steps if you want to fix this mannually, :
1/ In
webpack.config.js
, replace AotPlugin to AngularCompilerPluginline 189
2/ In tsconfig.ts , replace value of
AllowJs
fromtrue
tofalse
. There is an issue in aot compilation with Angular 5 (https://github.com/angular/angular/issues/19757)It should fix the problem.
ERROR in ./src/main.ts Module not found: Error: Can’t resolve ‘./$$_gendir/app/app.module.ngfactory’ in ‘C:\Users\User\Documents\MyApps\angular\src’ resolve ‘./$$_gendir/app/app.module.ngfactory’ in ‘C:\Users\User\Documents\MyApp s\angular\src’ using description file: C:\Users\User\Documents\MyApps\angular\package.json (r elative path: ./src) after using description file: C:\Users\User\Documents\MyApps\angular\package.j son (relative path: ./src) using description file: C:\Users\User\Documents\MyApps\angular\package.json (relative path: ./src/$$_gendir/app/app.module.ngfactory) no extension C:\Users\User\Documents\MyApps\angular\src$$_gendir\app\app.module.ngfa ctory doesn’t exist .ts C:\Users\User\Documents\MyApps\angular\src$$_gendir\app\app.module.ngfa ctory.ts doesn’t exist .js C:\Users\User\Documents\MyApps\angular\src$$_gendir\app\app.module.ngfa ctory.js doesn’t exist .scss C:\Users\User\Documents\MyApps\angular\src$$_gendir\app\app.module.ngfa ctory.scss doesn’t exist .json C:\Users\User\Documents\MyApps\angular\src$$_gendir\app\app.module.ngfa ctory.json doesn’t exist as directory C:\Users\User\Documents\MyApps\angular\src$$_gendir\app\app.module.ngfa ctory doesn’t exist [C:\Users\User\Documents\MyApps\angular\src$$_gendir\app\app.module.ngfactory] [C:\Users\User\Documents\MyApps\angular\src$$_gendir\app\app.module.ngfactory.t s] [C:\Users\User\Documents\MyApps\angular\src$$_gendir\app\app.module.ngfactory.j s] [C:\Users\User\Documents\MyApps\angular\src$$_gendir\app\app.module.ngfactory.s css] [C:\Users\User\Documents\MyApps\angular\src$$_gendir\app\app.module.ngfactory.j son] [C:\Users\User\Documents\MyApps\angular\src$$_gendir\app\app.module.ngfactory] @ ./src/main.ts 3:0-74 @ multi ./src/main.ts
ERROR in Error: Please update @angular/cli. Angular 5+ requires at least Angular CLI 1.5+ at throwNotSupportedError (C:\Users\User\Documents\MyApps\angular\node_modul es@angular\compiler-cli\src\ngtools_api.js:78:11) at Function.NgTools_InternalApi_NG_2.codeGen (C:\Users\User\Documents\MyApps \angular\node_modules@angular\compiler-cli\src\ngtools_api.js:31:15) at _donePromise.Promise.resolve.then (C:\Users\User\Documents\MyApps\angular \node_modules@ngtools\webpack\src\plugin.js:430:58) at <anonymous> at process._tickCallback (internal/process/next_tick.js:188:7) at Function.Module.runMain (module.js:684:11) at startup (bootstrap_node.js:191:16) at bootstrap_node.js:613:3 Child html-webpack-plugin for “index.html”: 1 asset [7GO9] ./node_modules/html-webpack-plugin/lib/loader.js!./src/index.html 377 bytes {0} [built] npm ERR! code ELIFECYCLE npm ERR! errno 2 npm ERR! angular-electron@2.0.0 build:
webpack --display-error-details && npm r un build:electron:main
npm ERR! Exit status 2 npm ERR! npm ERR! Failed at the angular-electron@2.0.0 build script. npm ERR! This is probably not a problem with npm. There is likely additional log ging output above.npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\User\AppData\Roaming\npm-cache_logs\2017-11-15T20_38_16_6 31Z-debug.log npm ERR! code ELIFECYCLE npm ERR! errno 2 npm ERR! angular-electron@2.0.0 build:prod:
cross-env NODE_ENV=production npm r un build
npm ERR! Exit status 2 npm ERR! npm ERR! Failed at the angular-electron@2.0.0 build:prod script. npm ERR! This is probably not a problem with npm. There is likely additional log ging output above.npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\User\AppData\Roaming\npm-cache_logs\2017-11-15T20_38_16_7 25Z-debug.log