Cannot read property 'glob' of null
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.
Mention any other details that might be useful.
Duplicate of #4919
Same here Works fine in my mac not in ubunto
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.
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.
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.
In windows: Delete "angular-cli.json" file C:\Users\your name\angular-cli.json then run ng serve again.
I don't have any extra .angular-cli.json files, but still get this error. Help!
Facing same error , there isn't any additional .angular-cli.json
It worked for me. Deleted hidden angular-cli.json file in home directory.
On mac
rm ~/.angular-cli.json
worked for me
It working for me in window by deleting this '.angular-cli.json'file from the 'c:/Users/user-name/.angular-cli.json'
on CentOS7 rm ~/.angular-cli.json worked for me as well
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.