Skip to content

8.0.0-rc.2 ng build app named rxjs01 created with --enableIvy=true fails with 'ENOENT: no such file or directory, open 'C:/dev/tests/rxjs/package.json' #14317

Closed
@varadero

Description

@varadero

🐞 Bug report

Command (mark with an x)

- [ ] new
- [x] build
- [ ] serve
- [ ] test
- [ ] e2e
- [ ] generate
- [ ] add
- [ ] update
- [ ] lint
- [ ] xi18n
- [ ] run
- [ ] config
- [ ] help
- [ ] version
- [ ] doc

Is this a regression?

Unknown

Description

I have created new project named rxjs01 with Angular CLI 8.0.0-rc.2 with --enableIvy=true but the build with npm run build fails.

🔬 Minimal Reproduction

npx @angular/cli@8.0.0-rc.2 new rxjs01 --enableIvy=true
cd rxjs01
npm run build

🔥 Exception or Error




C:\dev\tests\rxjs01>npm run build

> rxjs01@0.0.0 build C:\dev\tests\rxjs01
> ng build


Date: 2019-04-30T19:06:59.336Z
Hash: f0d98ebc5557ef47c6a6
Time: 17331ms
chunk {main} main-es5.js, main-es5.js.map (main) 614 bytes [initial] [rendered]
chunk {polyfills} polyfills-es5.js, polyfills-es5.js.map (polyfills) 398 kB [initial] [rendered]
chunk {runtime} runtime-es5.js, runtime-es5.js.map (runtime) 6.08 kB [entry] [rendered]
chunk {styles} styles-es5.js, styles-es5.js.map (styles) 16.3 kB [initial] [rendered]

ERROR in ENOENT: no such file or directory, open 'C:/dev/tests/rxjs/package.json'
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! rxjs01@0.0.0 build: `ng build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the rxjs01@0.0.0 build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\Svincho\AppData\Roaming\npm-cache\_logs\2019-04-30T19_06_59_432Z-debug.log

It looks like it does not like the name rxjs01 for a project created with --enableIvy=true. For some reason build process tries to find package.json file in non-existing folder (...rxjs/package.json instead of ...rxjs01/package.json). If I do exactly the same but with another name say ivy01, the build process completes successfully. If I do not use --enableIvy=true then a project with name rxjs01 can build successfully.

So to summarize:

npx @angular/cli@8.0.0-rc.2 new rxjs01 --enableIvy=true
cd rxjs01
npm run build
Build fails with ERROR in ENOENT: no such file or directory, open 'C:/dev/tests/rxjs/package.json'

npx @angular/cli@8.0.0-rc.2 new ivy01 --enableIvy=true
cd ivy01
npm run build
Build succeeds

npx @angular/cli@8.0.0-rc.2 new rxjs01
cd rxjs01
npm run build
Build succeeds

And this is the full npm error log mentioned in the npm error output:


0 info it worked if it ends with ok
1 verbose cli [ 'C:\\Program Files\\nodejs\\node.exe',
1 verbose cli   'C:\\Users\\Svincho\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js',
1 verbose cli   'run',
1 verbose cli   'build' ]
2 info using npm@6.4.1
3 info using node@v10.9.0
4 verbose run-script [ 'prebuild', 'build', 'postbuild' ]
5 info lifecycle rxjs01@0.0.0~prebuild: rxjs01@0.0.0
6 info lifecycle rxjs01@0.0.0~build: rxjs01@0.0.0
7 verbose lifecycle rxjs01@0.0.0~build: unsafe-perm in lifecycle true
8 verbose lifecycle rxjs01@0.0.0~build: PATH: C:\Users\Svincho\AppData\Roaming\npm\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin;C:\dev\tests\rxjs01\node_modules\.bin;C:\Program Files\Docker\Docker\Resources\bin;C:\ProgramData\Oracle\Java\javapath;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\GtkSharp\2.12\bin;C:\Program Files\Microsoft SQL Server\130\Tools\Binn\;C:\Program Files\dotnet\;C:\ProgramData\chocolatey\bin;C:\Program Files\OpenSSL\bin;C:\Program Files\OpenVPN\bin;C:\Program Files\Microsoft SQL Server\Client SDK\ODBC\130\Tools\Binn\;C:\Program Files (x86)\Microsoft SQL Server\130\Tools\Binn\;C:\Program Files\Microsoft SQL Server\130\DTS\Binn\;C:\Program Files (x86)\Microsoft SQL Server\Client SDK\ODBC\130\Tools\Binn\;C:\Program Files (x86)\Microsoft SQL Server\140\Tools\Binn\;C:\Program Files (x86)\Microsoft SQL Server\140\DTS\Binn\;C:\Program Files (x86)\Microsoft SQL Server\140\Tools\Binn\ManagementStudio\;C:\Program Files\Java\jdk1.8.0_152\bin;C:\Android\android-sdk\tools;C:\Android\android-sdk\platform-tools;C:\Program Files (x86)\Subversion\bin;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Users\Svincho\AppData\Roaming\nvm;C:\Program Files\nodejs;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\WINDOWS\System32\OpenSSH\;C:\Program Files\nodejs\;C:\Program Files\PuTTY\;C:\Program Files\Git\cmd;C:\Program Files\Microsoft SQL Server\Client SDK\ODBC\170\Tools\Binn\;C:\Program Files\Microsoft VS Code\bin;C:\Users\Svincho\AppData\Local\Programs\Fiddler;C:\Program Files\Microsoft VS Code Insiders\bin;C:\Users\Svincho\AppData\Local\Microsoft\WindowsApps;C:\Users\Svincho\AppData\Local\Programs\Microsoft VS Code Insiders\bin;C:\mvn\bin;C:\Users\Svincho\AppData\Local\Programs\Microsoft VS Code\bin;C:\Users\Svincho\AppData\Roaming\npm;C:\Users\Svincho\.dotnet\tools
9 verbose lifecycle rxjs01@0.0.0~build: CWD: C:\dev\tests\rxjs01
10 silly lifecycle rxjs01@0.0.0~build: Args: [ '/d /s /c', 'ng build' ]
11 silly lifecycle rxjs01@0.0.0~build: Returned: code: 1  signal: null
12 info lifecycle rxjs01@0.0.0~build: Failed to exec build script
13 verbose stack Error: rxjs01@0.0.0 build: `ng build`
13 verbose stack Exit status 1
13 verbose stack     at EventEmitter. (C:\Users\Svincho\AppData\Roaming\npm\node_modules\npm\node_modules\npm-lifecycle\index.js:301:16)
13 verbose stack     at EventEmitter.emit (events.js:182:13)
13 verbose stack     at ChildProcess. (C:\Users\Svincho\AppData\Roaming\npm\node_modules\npm\node_modules\npm-lifecycle\lib\spawn.js:55:14)
13 verbose stack     at ChildProcess.emit (events.js:182:13)
13 verbose stack     at maybeClose (internal/child_process.js:961:16)
13 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:250:5)
14 verbose pkgid rxjs01@0.0.0
15 verbose cwd C:\dev\tests\rxjs01
16 verbose Windows_NT 10.0.17134
17 verbose argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\Svincho\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js" "run" "build"
18 verbose node v10.9.0
19 verbose npm  v6.4.1
20 error code ELIFECYCLE
21 error errno 1
22 error rxjs01@0.0.0 build: `ng build`
22 error Exit status 1
23 error Failed at the rxjs01@0.0.0 build script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 1, true ]

The error output if I run npm run build -- --verbose is attached
ng-build-verbose.txt

🌍 Your Environment




C:\dev\tests\rxjs01>npm run ng -- version

> rxjs01@0.0.0 ng C:\dev\tests\rxjs01
> ng "version"


     _                      _                 ____ _     ___
    / \   _ __   __ _ _   _| | __ _ _ __     / ___| |   |_ _|
   / △ \ | '_ \ / _` | | | | |/ _` | '__|   | |   | |    | |
  / ___ \| | | | (_| | |_| | | (_| | |      | |___| |___ | |
 /_/   \_\_| |_|\__, |\__,_|_|\__,_|_|       \____|_____|___|
                |___/


Angular CLI: 8.0.0-rc.2
Node: 10.9.0
OS: win32 x64
Angular: 8.0.0-rc.2
... animations, cli, common, compiler, compiler-cli, core, forms
... language-service, platform-browser, platform-browser-dynamic
... router

Package                           Version
-----------------------------------------------------------
@angular-devkit/architect         0.800.0-rc.2
@angular-devkit/build-angular     0.800.0-rc.2
@angular-devkit/build-optimizer   0.800.0-rc.2
@angular-devkit/build-webpack     0.800.0-rc.2
@angular-devkit/core              8.0.0-rc.2
@angular-devkit/schematics        8.0.0-rc.2
@ngtools/webpack                  8.0.0-rc.2
@schematics/angular               8.0.0-rc.2
@schematics/update                0.800.0-rc.2
rxjs                              6.4.0
typescript                        3.4.5
webpack                           4.30.0

Anything else relevant?

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions