ng build --prod failure
See original GitHub issueBug Report or Feature Request (mark with an x
)
- [x] bug report -> please search issues before submitting
- [ ] feature request
Versions.
@angular/cli: 1.3.0
node: 8.2.1
os: win32 x64
@angular/animations: 4.3.3
@angular/common: 4.3.3
@angular/compiler: 4.3.3
@angular/core: 4.3.3
@angular/forms: 4.3.3
@angular/http: 4.3.3
@angular/platform-browser: 4.3.3
@angular/platform-browser-dynamic: 4.3.3
@angular/router: 4.3.3
@angular/cli: 1.3.0
@angular/compiler-cli: 4.3.3
@angular/language-service: 4.3.3
Repro steps.
- ng build --prod
- I will see the error message
The log given by the failure.
fs.js:652
return binding.open(pathModule._makeLong(path), stringToFlags(flags), mode);
Error: ENOENT: no such file or directory, open 'C:\software\test\node_modules\_@angular_core@4.3.3@@angular\package.json'
at Object.fs.openSync (fs.js:652:18)
at Object.fs.readFileSync (fs.js:553:33)
at licensePlugin.readPackageJson (C:\software\test\node_modules\_license-webpack-plugin@0.5.1@license-webpack-plugin\index.js:26:19)
at licensePlugin.getModuleInfo (C:\software\test\node_modules\_license-webpack-plugin@0.5.1@license-webpack-plugin\index.js:30:28)
at licensePlugin.<anonymous> (C:\software\test\node_modules\_license-webpack-plugin@0.5.1@license-webpack-plugin\index.js:81:31)
at Array.filter (native)
at licensePlugin.writeModuleInfo (C:\software\test\node_modules\_license-webpack-plugin@0.5.1@license-webpack-plugin\index.js:77:8)
at licensePlugin.gatherModuleInfo (C:\software\test\node_modules\_license-webpack-plugin@0.5.1@license-webpack-plugin\index.js:117:10)
at licensePlugin.<anonymous> (C:\software\test\node_modules\_license-webpack-plugin@0.5.1@license-webpack-plugin\index.js:233:12)
at Compiler.applyPlugins (C:\software\test\node_modules\_tapable@0.2.8@tapable\lib\Tapable.js:61:14)
at onCompiled (C:\software\test\node_modules\_webpack@3.4.1@webpack\lib\Compiler.js:240:10)
at applyPluginsAsync.err (C:\software\test\node_modules\_webpack@3.4.1@webpack\lib\Compiler.js:520:14)
at next (C:\software\test\node_modules\_tapable@0.2.8@tapable\lib\Tapable.js:202:11)
at Compiler.<anonymous> (C:\software\test\node_modules\_webpack@3.4.1@webpack\lib\CachePlugin.js:62:5)
at Compiler.applyPluginsAsyncSeries (C:\software\test\node_modules\_tapable@0.2.8@tapable\lib\Tapable.js:206:13)
at compilation.seal.err (C:\software\test\node_modules\_webpack@3.4.1@webpack\lib\Compiler.js:517:11)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
Desired functionality.
For the app to compile
Mention any other details that might be useful.
After I installed the following packages, there was a problem.
"@angular-redux/store": "^6.5.7",
"ng2-validation": "^4.2.0",
"redux": "^3.7.2",
"redux-logger": "^3.0.6",
Issue Analytics
- State:
- Created 6 years ago
- Comments:10
Top Results From Across the Web
ng build --prod is not working properly? how to check this?
If i run that using ng serve command, it works fine. Instead of using ng serve , i used ng build --prod ....
Read more >ng build --prod failed | Angular - EJ 2 Forums - Syncfusion
We have checked with your query and suspect that the reported issue (“ng build --prod produces build error”) may be caused due to...
Read more >Angular `ng build --prod` Error - Medium
You built a library, and tried to use it in a project. When building with --prod you see this unhelpful error: 'Unexpected value...
Read more >Toolips ng build –prod error - MDBootstrap
when I was trying to build production of my project we got this error: in Error: TypeError: Cannot read property 'kind' of undefined...
Read more >Error in ng build --prod that doesn't happen with ng serve --prod
When I serve the files outputted by with a server (apache, nginx) ng build --prod the app fails to load with js error....
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 Free
Top 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
same issue
ng build --prod --no-extract-license
works fine #7203I got same issue, both on Ubuntu and Mac
Build without --prod works fine
UPDATE Mine issue seems to related to
cnpm
, after deletingnode_modules/
folder and usenpm install
instead, build with --prod works fine again.