Repository navigation
Cannot read property 'glob' of null #5231
Description
Please provide us with the following information:
OS?
Ubuntu 16.04
Versions.
@angular/cli: 1.0.0-rc.1
node: 7.6.0
os: linux x64
Repro steps.
When I create an app in angular cli, every ng command results in a crash resulting in the output below. Since being stuck in the very early phase, none of the files created by angular/cli where touched I have no clue how to fix this.
The log given by the failure.
Cannot read property 'glob' of null
TypeError: Cannot read property 'glob' of null
at ObjectSchemaTreeNode._set (/home/mihaly/mroizo/node_modules/@ngtools/json-schema/src/schema-tree.js:224:131)
at new ObjectSchemaTreeNode (/home/mihaly/mroizo/node_modules/@ngtools/json-schema/src/schema-tree.js:209:14)
at OneOfSchemaTreeNode._createChildProperty (/home/mihaly/mroizo/node_modules/@ngtools/json-schema/src/schema-tree.js:148:26)
at OneOfSchemaTreeNode._typesPrototype.schema.oneOf.map (/home/mihaly/mroizo/node_modules/@ngtools/json-schema/src/schema-tree.js:161:25)
at Array.map (native)
at OneOfSchemaTreeNode (/home/mihaly/mroizo/node_modules/@ngtools/json-schema/src/schema-tree.js:160:48)
at ArraySchemaTreeNode._createChildProperty (/home/mihaly/mroizo/node_modules/@ngtools/json-schema/src/schema-tree.js:148:26)
at ArraySchemaTreeNode._set (/home/mihaly/mroizo/node_modules/@ngtools/json-schema/src/schema-tree.js:286:39)
at new ArraySchemaTreeNode (/home/mihaly/mroizo/node_modules/@ngtools/json-schema/src/schema-tree.js:267:14)
at ObjectSchemaTreeNode._createChildProperty (/home/mihaly/mroizo/node_modules/@ngtools/json-schema/src/schema-tree.js:148:26)
at ObjectSchemaTreeNode._set (/home/mihaly/mroizo/node_modules/@ngtools/json-schema/src/schema-tree.js:224:45)
at new ObjectSchemaTreeNode (/home/mihaly/mroizo/node_modules/@ngtools/json-schema/src/schema-tree.js:209:14)
at ArraySchemaTreeNode._createChildProperty (/home/mihaly/mroizo/node_modules/@ngtools/json-schema/src/schema-tree.js:148:26)
at ArraySchemaTreeNode._set (/home/mihaly/mroizo/node_modules/@ngtools/json-schema/src/schema-tree.js:286:39)
at new ArraySchemaTreeNode (/home/mihaly/mroizo/node_modules/@ngtools/json-schema/src/schema-tree.js:267:14)
at RootSchemaTreeNode._createChildProperty (/home/mihaly/mroizo/node_modules/@ngtools/json-schema/src/schema-tree.js:148:26)
at RootSchemaTreeNode._set (/home/mihaly/mroizo/node_modules/@ngtools/json-schema/src/schema-tree.js:224:45)
at RootSchemaTreeNode.ObjectSchemaTreeNode (/home/mihaly/mroizo/node_modules/@ngtools/json-schema/src/schema-tree.js:209:14)
at RootSchemaTreeNode (/home/mihaly/mroizo/node_modules/@ngtools/json-schema/src/schema-tree.js:307:9)
at GeneratedSchemaClass.SchemaClassBase (/home/mihaly/mroizo/node_modules/@ngtools/json-schema/src/schema-class-factory.js:53:29)
at GeneratedSchemaClass (/home/mihaly/mroizo/node_modules/@ngtools/json-schema/src/schema-class-factory.js:144:13)
at new CliConfig (/home/mihaly/mroizo/node_modules/@angular/cli/models/config/config.js:18:24)
at Function.fromConfigPath (/home/mihaly/mroizo/node_modules/@angular/cli/models/config/config.js:81:16)
at Function.fromProject (/home/mihaly/mroizo/node_modules/@angular/cli/models/config.js:90:46)
at Object. (/home/mihaly/mroizo/node_modules/@angular/cli/commands/build.js:7:35)
at Module._compile (module.js:571:32)
at Object.Module._extensions..js (module.js:580:10)
at Module.load (module.js:488:32)
at tryModuleLoad (module.js:447:12)
at Function.Module._load (module.js:439:3)
at Module.require (module.js:498:17)
at require (internal/module.js:20:19)
at Class.includedCommands (/home/mihaly/mroizo/node_modules/@angular/cli/addon/index.js:15:16)
at /home/mihaly/mroizo/node_modules/@angular/cli/ember-cli/lib/models/project.js:287:61
at Array.forEach (native)
at Project.addonCommands (/home/mihaly/mroizo/node_modules/@angular/cli/ember-cli/lib/models/project.js:286:15)
at Project.eachAddonCommand (/home/mihaly/mroizo/node_modules/@angular/cli/ember-cli/lib/models/project.js:321:30)
at module.exports (/home/mihaly/mroizo/node_modules/@angular/cli/ember-cli/lib/cli/lookup-command.js:33:13)
at CLI. (/home/mihaly/mroizo/node_modules/@angular/cli/ember-cli/lib/cli/cli.js:46:26)
at tryCatch (/home/mihaly/mroizo/node_modules/rsvp/dist/rsvp.js:538:12)
at invokeCallback (/home/mihaly/mroizo/node_modules/rsvp/dist/rsvp.js:553:13)
at publish (/home/mihaly/mroizo/node_modules/rsvp/dist/rsvp.js:521:7)
at flush (/home/mihaly/mroizo/node_modules/rsvp/dist/rsvp.js:2373:5)
at _combinedTickCallback (internal/process/next_tick.js:67:7)
at process._tickCallback (internal/process/next_tick.js:98:9)
.
Activity
intellix commentedon Mar 6, 2017
Duplicate of #4919
xe4me commentedon Mar 7, 2017
Same here
Works fine in my mac
not in ubunto
balr404 commentedon May 9, 2017
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 commentedon May 9, 2017
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 commentedon May 9, 2017
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.
manoz2000 commentedon Jun 12, 2017
In windows:
Delete "angular-cli.json" file
C:\Users\your name\angular-cli.json
then run ng serve again.
kirillgroshkov commentedon Aug 30, 2017
I don't have any extra .angular-cli.json files, but still get this error. Help!
cisrakesh commentedon Oct 9, 2017
Facing same error , there isn't any additional .angular-cli.json
abhishek-nyllabs commentedon Nov 5, 2017
It worked for me. Deleted hidden angular-cli.json file in home directory.
luizlucasi commentedon Nov 23, 2017
On mac
rm ~/.angular-cli.json
worked for me
afzal00 commentedon Jan 24, 2018
It working for me in window by deleting this '.angular-cli.json'file from the 'c:/Users/user-name/.angular-cli.json'
coolrb commentedon Jun 16, 2018
on CentOS7
rm ~/.angular-cli.json
worked for me as well
angular-automatic-lock-bot commentedon Sep 8, 2019
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.