-
Notifications
You must be signed in to change notification settings - Fork 12k
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
Cannot apply a change to a different path. #3169
Comments
Does the same problem happen with just normal Windows command prompt? The path you give to the generate command is usually relative to Please try with normal command prompt to rule away the possibility of MINGW64 doing anything funky. Thanks. Cheers, |
|
Oh. This is going to be a tough nut to crack. My guess is that Git Bash is messing with your input, maybe replacing If this is the case, can I ask you to try and wrap the path in single quotes
If this fails, then try in Windows command line changing It might be fixed in latest version already, beta.20-4, but I wouldn't recommend upgrading and testing until #3158 is resolved. |
At git Bash, the result: At Windows command,I change the result: |
I seem to be seeing the same error with the latest release:
|
This output shows beta 20-4. There has been beta 21 for a while and beta 22 should have been available on npm any minute. |
Sill seeing the same error with beta 21. |
I experienced the same error after creating a component, deleting that same component via 'rm -r' and then re-creating it. The cause for me was that I didn't remove the reference from app.module.ts. Once I deleted it manually from app.module.ts, ng g myComponent throws no errors. @Meligy, maybe that will give you a clue as to the real source? |
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. |
admin@user MINGW64 /e/git/ng2-adminlte/src/app/logon (master)
$ ng g component ./sign-in
installing component
create src\app\sign-in\sign-in.component.css
create src\app\sign-in\sign-in.component.html
create src\app\sign-in\sign-in.component.spec.ts
create src\app\sign-in\sign-in.component.ts
Cannot apply a change to a different path.
Error: Cannot apply a change to a different path.
at MultiChange.appendChange (E:\git\ng2-adminlte\node_modules@angular-cli\ast-tools\src\change.js:45:19)
at E:\git\ng2-adminlte\node_modules@angular-cli\ast-tools\src\change.js:36:86
at Array.forEach (native)
at new MultiChange (E:\git\ng2-adminlte\node_modules@angular-cli\ast-tools\src\change.js:36:45)
at E:\git\ng2-adminlte\node_modules@angular-cli\ast-tools\src\ast-utils.js:222:16
at tryCatch (E:\git\ng2-adminlte\node_modules\es6-promise\dist\lib\es6-promise-internal.js:195:12)
at invokeCallback (E:\git\ng2-adminlte\node_modules\es6-promise\dist\lib\es6-promise-internal.js:210:13)
at publish (E:\git\ng2-adminlte\node_modules\es6-promise\dist\lib\es6-promise-internal.js:178:7)
at flush (E:\git\ng2-adminlte\node_modules\es6-promise\dist\lib\es6-promise\asap.js:94:5)
at doNTCallback0 (node.js:428:9)
at process._tickCallback (node.js:357:13)
ng version:
$ ng --version
angular-cli: 1.0.0-beta.19-3
node: 5.0.0
os: win32 ia32
The text was updated successfully, but these errors were encountered: