angular-cli icon indicating copy to clipboard operation
angular-cli copied to clipboard

The error come out when I run ng build --prod

Open david-ni opened this issue 9 years ago • 4 comments

Bug Report or Feature Request (mark with an x)

- [ ] bug report -> please search issues before submitting
- [ ] feature request

Versions.

@angular/cli: 1.4.9 node: 6.11.0 os: win32 x64 @angular/animations: 4.4.6 @angular/common: 4.4.6 @angular/compiler: 4.4.6 @angular/core: 4.4.6 @angular/forms: 4.4.6 @angular/http: 4.4.6 @angular/platform-browser: 4.4.6 @angular/platform-browser-dynamic: 4.4.6 @angular/router: 4.4.6 @angular/cli: 1.4.9 @angular/compiler-cli: 4.4.6 @angular/language-service: 4.4.6 typescript: 2.3.4

Repro steps.

ng new developer
ng build --prod 

The log given by the failure.

F:\working\fuerpay\developer>ng build --prod 95% emittingUnhandled rejection Error: ENOENT: no such file or directory, open F:\working\fuerpay\developer\node_modules_@[email protected]@@angula r\package.json at Error (native) at Object.fs.openSync (fs.js:641:18) at Object.fs.readFileSync (fs.js:509:33) at LicenseExtractor.readPackageJson (F:\working\fuerpay\developer\[email protected]@license-webpack-plugin\dist\LicenseExtra ctor.js:124:23) at LicenseExtractor.parsePackage (F:\working\fuerpay\developer\[email protected]@license-webpack-plugin\dist\LicenseExtracto r.js:21:32) at ModuleProcessor.processPackage (F:\working\fuerpay\developer\[email protected]@license-webpack-plugin\dist\ModuleProcesso r.js:24:46) at ModuleProcessor.processFile (F:\working\fuerpay\developer\[email protected]@license-webpack-plugin\dist\ModuleProcessor.j s:21:21) at moduleCallback (F:\working\fuerpay\developer\[email protected]@license-webpack-plugin\dist\LicenseWebpackPlugin.js:80:61) at SortableSet.forEach (native) at Chunk.forEachModule (F:\working\fuerpay\developer\[email protected]@webpack\lib\Chunk.js:159:17) at F:\working\fuerpay\developer\[email protected]@license-webpack-plugin\dist\LicenseWebpackPlugin.js:89:27 at Array.forEach (native) at Compiler. (F:\working\fuerpay\developer\[email protected]@license-webpack-plugin\dist\LicenseWebpackPlugin.js: 65:32) at next (F:\working\fuerpay\developer\[email protected]@tapable\lib\Tapable.js:204:14) at F:\working\fuerpay\developer\[email protected]@html-webpack-plugin\index.js:204:9 at PassThroughHandlerContext.finallyHandler (F:\working\fuerpay\developer\[email protected]@bluebird\js\release\finally.js:56:23)

Desired functionality.

Mention any other details that might be useful.

david-ni avatar Nov 02 '17 19:11 david-ni

do anyone know how to fixed it?

david-ni avatar Nov 03 '17 11:11 david-ni

The same issue.

My Versions:

@angular/cli: 1.5.0 node: 6.11.1 os: win32 x64 @angular/animations: 5.0.0 @angular/common: 5.0.0 @angular/compiler: 5.0.0 @angular/core: 5.0.0 @angular/forms: 5.0.0 @angular/http: 5.0.0 @angular/platform-browser: 5.0.0 @angular/platform-browser-dynamic: 5.0.0 @angular/router: 5.0.0 @angular/cli: 1.5.0 @angular/compiler-cli: 5.0.0 @angular/language-service: 5.0.0 typescript: 2.4.2

zhou3q avatar Nov 06 '17 03:11 zhou3q

  1. remove /node_modules
  2. run npm link can solve this problem

slowrookie avatar Nov 06 '17 10:11 slowrookie

This issue has been automatically locked due to inactivity. Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.