-
Notifications
You must be signed in to change notification settings - Fork 12k
I created a new project but there was a problem - Unhandled 'error' event #12670
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I also got the issue with |
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 Package Version I get error after I run the ng new my-app as below: Error: spawn C:\Windows\system32\cmd.exe ENOENT |
This usually means that the resolved If you do execute |
@alan-agius4 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.
Cached binary found at C:\Users...\AppData\Roaming\npm-cache\node-sass\4.9.3\win32-x64-64_binding.node
''; echo -e "\x1B[1mCircularJSON\x1B[0m is in \x1B[4mmaintenance only\x1B[0m, \x1B[1mflatted\x1B[0m is its successor."; echo ''
Binary found at C:\Users...\test-app\node_modules\node-sass\vendor\win32-x64-64\binding.node added 1097 packages from 1292 contributors and audited 39125 packages in 79.669s 'git' is not recognized as an internal or external command,
|
Thanks @alan-agius4 i could resolve for me. |
I can reproduce the exact same behavior on Windows 10 as @grebneglig, |
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:
Create a project one level deep works:
|
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: |
@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 #12951 to fix the issue. |
When normalized path will not have a trailing slash, and at the moment the RegExp for drive needs to match `\c\` Fixes #12670
When normalized path will not have a trailing slash, and at the moment the RegExp for drive needs to match `\c\` Fixes angular#12670
i am getting same issue but not in root drive ng serve --open chunk {main} main.js, main.js.map (main) 11.6 kB [initial] [rendered] Error: spawn cmd ENOENT |
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Bug Report or Feature Request (mark with an
x
)Command (mark with an
x
)Versions
node -- v8.12.0;
npm --6.4.1;
ng --7.0.2;
Windows (10)
Repro steps
The log given by the failure
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:\Windows\system32\cmd.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)
Desired functionality
Mention any other details that might be useful
The text was updated successfully, but these errors were encountered: