angular-cli icon indicating copy to clipboard operation
angular-cli copied to clipboard

Code watching not works in projects which contains parenthesis or square brackets in path

Open vadim-shb opened this issue 9 years ago • 5 comments

OS:

Linux Ubuntu 16.04

Versions:

@angular/cli: 1.0.0-beta.31 node: 7.5.0 os: linux x64

Repro steps.

  1. Create project in path which contains parenthesis or square brackets
  2. Run ng serve or ng test
  3. Change some code
  4. Server NOT reloaded and tests NOT restarted automatically.

example:

mkdir ~/"proj(angular)" # ~/"proj[angular]" behaves the same way
cd ~/"proj(angular)"
ng new web-app
cd web-app
ng test

So now when I change some code while "ng test" work: sed -i "s/app works/app hangs/" ~/"proj(angular)"/web-app/src/app/app.component.ts

Nothing happens. But tests must show errors.

vadim-shb avatar Feb 11 '17 19:02 vadim-shb

According to 54541a1975ce1052c4e42933d67d918360f452e6 you can't really create a project in a path that has parenthesis or square brackets. I guess it was possible in previous versions, but my best bet right now would be to just change the folder name.

#goodnessSquad

sthuck avatar Feb 15 '17 19:02 sthuck

Hm... it is true we don't allow the base folder to have such names, but you should still be able to have your folders named as whatever you want.

I had a go on a brand new project, chaging the name of src/app to src/app[[test]] and can verify reloads don't happen on ng serve.

Need to investigate more.

filipesilva avatar Mar 09 '17 13:03 filipesilva

@vadim-shb It seems like an issue with webpack-dev-server which ng serve uses. It doesn't pick up the paths with [] or () and do the reloading of code which it should.

sumitarora avatar Mar 14 '17 17:03 sumitarora

CLI 1.0 prerelease versions are no longer supported. If this error still occurs on the latest version (6.1.4 currently). Please open a new issue describing the problem.

clydin avatar Aug 23 '18 16:08 clydin

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.