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

ng new fails - Package install failed, see above. ng serve fails - Cannot read property 'glob' of null

Open huntsberg opened this issue 9 years ago • 5 comments

Please provide us with the following information:

OS?

Windows 7, 8 or 10. Linux (which distribution). Mac OSX (Yosemite? El Capitan?)

Linux Ubuntu (docker node container)

Versions.

Please run ng --version. If there's nothing outputted, please run in a Terminal: node --version and paste the result here:

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

Repro steps.

Was this an app that wasn't created using the CLI? What change did you do on your code? etc.

ng new myApp

The log given by the failure.

Normally this include a stack trace and some more information.

ng new myApp ng new.txt

ng serve serve.txt

Mention any other details that might be useful.

I don't think that I did anything special... just followed the directions.


Thanks! We'll be in touch soon.

huntsberg avatar Feb 21 '17 19:02 huntsberg

It looks like #4207 is the same issue. If you set up the environment in your home directory, it fails. It's a common pattern in docker to put the app in the home directory.

Changing the home directory seems to resolve the issue.

huntsberg avatar Feb 22 '17 02:02 huntsberg

https://github.com/angular/angular-cli/issues/4919 (there's more info there). I'll add your comment there as well.

filipesilva avatar Mar 13 '17 18:03 filipesilva

I have tried the following option to resolve the issue Steps to resolve the issue

$ pwd it shows —> /Users/YourName /*** That is your Home path***/ Execute the below command to display the hidden files

$ defaults write com.apple.Finder AppleShowAllFiles true $ killall Finder After executing the above command you will see the hidden files. if “.angular-cli.json” file exist under “/Users/yourname” (i.e Home Path) then remove “.angular-cli.json” file.

then navigate to your application path and try execute ‘ng’ command.

balr404 avatar May 09 '17 23:05 balr404

I had the same issue. I just deleted the .angular-cli.json file from my user directory and it resolved the issue.

To resolve this issue in Ubuntu, follow the below steps

  1. cd /home/userName (provide the appropriate userName.)
  2. ls -a
  3. If you find .angular-cli.json. listed then use the command
    rm -r .angular*

Sree-001 avatar Dec 19 '17 06:12 Sree-001

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.