[6.0.0-beta.2] - `ng new` tries to create app on a wrong path
See original GitHub issueVersions
Angular CLI: 6.0.0-beta.2
Node: 8.9.4
OS: win32 x64
PowerShell or CMD (I'm not running WSL)
Repro steps
npm install -g @angular/cli@next
ng new some-app
Observed behavior
Running ng new some-app
in c:\www
has the following output:
PS C:\www> ng new some-app
create some-app/e2e/app.e2e-spec.ts (290 bytes)
create some-app/e2e/app.po.ts (208 bytes)
create some-app/e2e/tsconfig.e2e.json (235 bytes)
create some-app/karma.conf.js (923 bytes)
create some-app/package.json (1300 bytes)
create some-app/protractor.conf.js (722 bytes)
create some-app/README.md (1030 bytes)
create some-app/tsconfig.json (363 bytes)
create some-app/tslint.json (3012 bytes)
create some-app/.angular-cli.json (1243 bytes)
create some-app/.editorconfig (245 bytes)
create some-app/.gitignore (529 bytes)
create some-app/src/assets/.gitkeep (0 bytes)
create some-app/src/environments/environment.prod.ts (51 bytes)
create some-app/src/environments/environment.ts (387 bytes)
create some-app/src/favicon.ico (5430 bytes)
create some-app/src/index.html (294 bytes)
create some-app/src/main.ts (370 bytes)
create some-app/src/polyfills.ts (3114 bytes)
create some-app/src/styles.css (80 bytes)
create some-app/src/test.ts (642 bytes)
create some-app/src/tsconfig.app.json (211 bytes)
create some-app/src/tsconfig.spec.json (283 bytes)
create some-app/src/typings.d.ts (104 bytes)
create some-app/src/app/app.module.ts (316 bytes)
create some-app/src/app/app.component.html (1141 bytes)
create some-app/src/app/app.component.spec.ts (986 bytes)
create some-app/src/app/app.component.ts (207 bytes)
create some-app/src/app/app.component.css (0 bytes)
Error: ENOENT: no such file or directory, mkdir 'C:\C\www\some-app'
ENOENT: no such file or directory, mkdir 'C:\C\www\some-app'
Notice the path mentioned in the error C:\C\www\...
instead of C:\www\...
Trying with the --directory
flag has the same result. If I try an absolute path, like ng new some-app --directory='c:/www'
even appends another c:
at the end:
Error: ENOENT: no such file or directory, mkdir 'C:\C\www\c:'
ENOENT: no such file or directory, mkdir 'C:\C\www\c:'
Also, if I try c:\some\path
- with \
instead of /
, like we usually work on Windows, I get something like:
Error: Schematic input does not validate against the Schema
Errors:
.directory should match format "path"
Issue Analytics
- State:
- Created 6 years ago
- Reactions:5
- Comments:12
Top Results From Across the Web
unable to resolve dependency tree error for creating new ...
Open the folder you create with ng new and open the package.json file. In devDependencies change the version of "jasmine-core" 3.6.0 to ...
Read more >Changelog - Cypress Documentation
Compile errors are now surfaced in the command log during tests for Angular and Next projects. Fixes #23219. The error "Automatic publicPath is...
Read more >Using Angular routes in a single-page application
Using the Angular CLI, create a new application, angular-router-sample. This application will have two components: crisis-list and heroes-list.
Read more >npm err! missing script: "ng" - You.com | The search engine you ...
Can anyone explain this error when I run "npm run ng new app"? ... ng new app . Open side panel. `npm run...
Read more >Changelog — Python 3.11.1 documentation
gh-99370: Fix zip path for venv created from a non-installed python on ... The errno modules exposes the new error number. getpath.py now ......
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
@hansl Just tested 6.0.0-beta.3 and it’s working. Thank you!
@SaabirMohamed
--service-worker
is available since1.6.something
I believe. Anyway, you definitely have it in the latest1.7.0
stable.