x)- [ ×] bug report -> please search issues before submitting
- [ ] feature request
x)- [x ] new
- [ ] build
- [ ] serve
- [ ] test
- [ ] e2e
- [ ] generate
- [ ] add
- [ ] update
- [ ] lint
- [ ] xi18n
- [ ] run
- [ ] config
- [ ] help
- [ ] version
- [ ] doc
node -- v8.12.0;
npm --6.4.1;
ng --7.0.2;
Windows (10)
E:>ng new kl
? Would you like to add Angular routing? Yes
? Which stylesheet format would you like to use? SCSS [ http://sass-lang.com ]
CREATE kl/angular.json (3823 bytes)
CREATE kl/package.json (1309 bytes)
CREATE kl/README.md (1019 bytes)
CREATE kl/tsconfig.json (408 bytes)
CREATE kl/tslint.json (2837 bytes)
CREATE kl/.editorconfig (245 bytes)
CREATE kl/.gitignore (503 bytes)
CREATE kl/src/favicon.ico (5430 bytes)
CREATE kl/src/index.html (289 bytes)
CREATE kl/src/main.ts (372 bytes)
CREATE kl/src/polyfills.ts (3234 bytes)
CREATE kl/src/test.ts (642 bytes)
CREATE kl/src/styles.scss (80 bytes)
CREATE kl/src/browserslist (388 bytes)
CREATE kl/src/karma.conf.js (964 bytes)
CREATE kl/src/tsconfig.app.json (166 bytes)
CREATE kl/src/tsconfig.spec.json (256 bytes)
CREATE kl/src/tslint.json (314 bytes)
CREATE kl/src/assets/.gitkeep (0 bytes)
CREATE kl/src/environments/environment.prod.ts (51 bytes)
CREATE kl/src/environments/environment.ts (662 bytes)
CREATE kl/src/app/app-routing.module.ts (245 bytes)
CREATE kl/src/app/app.module.ts (393 bytes)
CREATE kl/src/app/app.component.html (1173 bytes)
CREATE kl/src/app/app.component.spec.ts (1083 bytes)
CREATE kl/src/app/app.component.ts (207 bytes)
CREATE kl/src/app/app.component.scss (0 bytes)
CREATE kl/e2e/protractor.conf.js (752 bytes)
CREATE kl/e2e/tsconfig.e2e.json (213 bytes)
CREATE kl/e2e/src/app.e2e-spec.ts (298 bytes)
CREATE kl/e2e/src/app.po.ts (208 bytes)
events.js:183
throw er; // Unhandled 'error' event
^
Error: spawn C:Windowssystem32cmd.exe ENOENT
at Process.ChildProcess._handle.onexit (internal/child_process.js:190:19)
at onErrorNT (internal/child_process.js:362:16)
at _combinedTickCallback (internal/process/next_tick.js:139:11)
at process._tickCallback (internal/process/next_tick.js:181:9)
I also got the issue with
node -- v10.12.0;
npm --6.4.1;
ng --7.0.2;
Windows (10)
I get the same issue also.
I can not create a new workspace with ng new in windows10
Command : ng new my-app
npm: 6.4.1
Angular CLI: 7.0.2
Node: 8.12.0
OS: win32 x64
Package Version
@angular-devkit/architect 0.10.2
@angular-devkit/core 7.0.2
@angular-devkit/schematics 7.0.2
@schematics/angular 7.0.2
@schematics/update 0.10.2
rxjs 6.3.3
typescript 3.1.3
I get error after I run the ng new my-app as below:
.......
CREATE my-app/src/app/app.component.css (0 bytes)
CREATE my-app/e2e/protractor.conf.js (752 bytes)
CREATE my-app/e2e/tsconfig.e2e.json (213 bytes)
CREATE my-app/e2e/src/app.e2e-spec.ts (302 bytes)
CREATE my-app/e2e/src/app.po.ts (208 bytes)
events.js:183
throw er; // Unhandled 'error' event
^
Error: spawn C:Windowssystem32cmd.exe ENOENT
at Process.ChildProcess._handle.onexit (internal/child_process.js:190:19)
at onErrorNT (internal/child_process.js:362:16)
at _combinedTickCallback (internal/process/next_tick.js:139:11)
at process._tickCallback (internal/process/next_tick.js:181:9)
This usually means that the resolved cwd path is invalid, or the cmd path is incorrect.
If you do execute pwd and where cmd in the terminal where you are trying to do ng new what is the output?
@alan-agius4
As your tips, when I got your reply.
First, I restarted the PC and created a new project with powershell, there isn't any issue.
Then I tried to create another project with cmd, it can be also created.
That's so weird. The issue is gone. I don't know why.
`? Would you like to add Angular routing? Yes
? Which stylesheet format would you like to use? SCSS [ http://sass-lang.com ]
CREATE test-app/angular.json (3877 bytes)
CREATE test-app/package.json (1315 bytes)
CREATE test-app/README.md (1024 bytes)
CREATE test-app/tsconfig.json (408 bytes)
CREATE test-app/tslint.json (2837 bytes)
CREATE test-app/.editorconfig (245 bytes)
CREATE test-app/.gitignore (503 bytes)
CREATE test-app/src/favicon.ico (5430 bytes)
CREATE test-app/src/index.html (294 bytes)
CREATE test-app/src/main.ts (372 bytes)
CREATE test-app/src/polyfills.ts (3234 bytes)
CREATE test-app/src/test.ts (642 bytes)
CREATE test-app/src/styles.scss (80 bytes)
CREATE test-app/src/browserslist (388 bytes)
CREATE test-app/src/karma.conf.js (964 bytes)
CREATE test-app/src/tsconfig.app.json (166 bytes)
CREATE test-app/src/tsconfig.spec.json (256 bytes)
CREATE test-app/src/tslint.json (314 bytes)
CREATE test-app/src/assets/.gitkeep (0 bytes)
CREATE test-app/src/environments/environment.prod.ts (51 bytes)
CREATE test-app/src/environments/environment.ts (662 bytes)
CREATE test-app/src/app/app-routing.module.ts (245 bytes)
CREATE test-app/src/app/app.module.ts (393 bytes)
CREATE test-app/src/app/app.component.html (1173 bytes)
CREATE test-app/src/app/app.component.spec.ts (1101 bytes)
CREATE test-app/src/app/app.component.ts (213 bytes)
CREATE test-app/src/app/app.component.scss (0 bytes)
CREATE test-app/e2e/protractor.conf.js (752 bytes)
CREATE test-app/e2e/tsconfig.e2e.json (213 bytes)
CREATE test-app/e2e/src/app.e2e-spec.ts (304 bytes)
CREATE test-app/e2e/src/app.po.ts (208 bytes)
[email protected] install C:Users...test-appnode_modulesnode-sass
node scripts/install.js
Cached binary found at C:Users...AppDataRoamingnpm-cachenode-sass4.9.3win32-x64-64_binding.node
[email protected] postinstall C:Users...test-appnode_modulescircular-json
echo ''; echo -e "x1B[1mCircularJSONx1B[0m is in x1B[4mmaintenance onlyx1B[0m, x1B[1mflattedx1B[0m is its successor."; echo ''
''; echo -e "x1B[1mCircularJSONx1B[0m is in x1B[4mmaintenance onlyx1B[0m, x1B[1mflattedx1B[0m is its successor."; echo ''
[email protected] postinstall C:Users...test-appnode_modulesnode-sass
node scripts/build.js
Binary found at C:Users...test-appnode_modulesnode-sassvendorwin32-x64-64binding.node
Testing binary
Binary is fine
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modulesfsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
added 1097 packages from 1292 contributors and audited 39125 packages in 79.669s
found 0 vulnerabilities
'git' is not recognized as an internal or external command,
operable program or batch file.`
This usually means that the resolved
cwdpath is invalid, or thecmdpath is incorrect.If you do execute
pwdandwhere cmdin the terminal where you are trying to dong newwhat is the output?
Thanks @alan-agius4 i could resolve for me.
I tried to create an project in "D:" and got the same error as @MangoWHL.
Then i created a project in "D:Test" and all was ok.
So i think the Problem was the Path.
I can reproduce the exact same behavior on Windows 10 as @grebneglig,
if I try ng new in the root of any of my drives.
Make and enter a folder, and the error goes away.
Thanks @grebneglig @lranders , I create a folder under the root of the driver, then ng new under the folder, it works.
I get the same issue when creating a project on root of a drive for example:
R:\
Create a project one level deep works:
R:\test
ng --version
Angular CLI: 7.0.3
Node: 8.9.4
OS: win32 x64
Can also confirm failing with the same error when trying to create a new project from the root directory of a drive on Windows 10, but works if it's inside a sub-directory.
I get the same issue when creating a project on root of a drive for example:
F:\
Create a project one level deep works:
F:\TestDirectory
But i want to create project on root of a driver
how can i ?
@amirzenoozi create the project one level deep and then move it?
Hi all, we have identified the bug that is causing this error, as at the moment we are not handling root paths correctly in windows.
We landed a PR https://github.com/angular/angular-cli/pull/12951 to fix the issue.
i am getting same issue but not in root drive
e:codeFrontEndAngular-by-bradtraversy
still getting same error
ng serve --open
10% building 3/3 modules 0 activei ï½¢wdsï½£: Project is running at http://localhost:4200/webpack-dev-server/
i ï½¢wdsï½£: webpack output is served from /
i ï½¢wdsï½£: 404s will fallback to //index.html
chunk {main} main.js, main.js.map (main) 11.6 kB [initial] [rendered]
chunk {polyfills} polyfills.js, polyfills.js.map (polyfills) 251 kB [initial] [rendered]
chunk {runtime} runtime.js, runtime.js.map (runtime) 6.09 kB [entry] [rendered]
chunk {styles} styles.js, styles.js.map (styles) 16.3 kB [initial] [rendered]
chunk {vendor} vendor.js, vendor.js.map (vendor) 4.07 MB [initial] [rendered]
Date: 2019-07-23T03:03:43.732Z - Hash: 178530f1609a19eea4fd - Time: 16578ms
* Angular Live Development Server is listening on localhost:4200, open your browser on http://localhost:4200/ *
i ï½¢wdmï½£: Compiled successfully.
events.js:170
throw er; // Unhandled 'error' event
^
Error: spawn cmd ENOENT
at Process.ChildProcess._handle.onexit (internal/child_process.js:247:19)
at onErrorNT (internal/child_process.js:429:16)
at processTicksAndRejections (internal/process/task_queues.js:81:17)
Emitted 'error' event at:
at Process.ChildProcess._handle.onexit (internal/child_process.js:253:12)
at onErrorNT (internal/child_process.js:429:16)
at processTicksAndRejections (internal/process/task_queues.js:81:17)
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._
Most helpful comment
Thanks @alan-agius4 i could resolve for me.
I tried to create an project in "D:" and got the same error as @MangoWHL.
Then i created a project in "D:Test" and all was ok.
So i think the Problem was the Path.