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

Cannot read property 'glob' of null

Open mkdebie opened this issue 9 years ago • 13 comments

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) .

Mention any other details that might be useful.

mkdebie avatar Mar 05 '17 01:03 mkdebie

Duplicate of #4919

intellix avatar Mar 06 '17 15:03 intellix

Same here Works fine in my mac not in ubunto

xe4me avatar Mar 07 '17 05:03 xe4me

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 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 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

In windows: Delete "angular-cli.json" file C:\Users\your name\angular-cli.json then run ng serve again.

manoz2000 avatar Jun 12 '17 09:06 manoz2000

I don't have any extra .angular-cli.json files, but still get this error. Help!

kirillgroshkov avatar Aug 30 '17 21:08 kirillgroshkov

Facing same error , there isn't any additional .angular-cli.json

cisrakesh avatar Oct 09 '17 09:10 cisrakesh

It worked for me. Deleted hidden angular-cli.json file in home directory.

abhishek-nyllabs avatar Nov 05 '17 01:11 abhishek-nyllabs

On mac

rm ~/.angular-cli.json

worked for me

luizlucasi avatar Nov 23 '17 01:11 luizlucasi

It working for me in window by deleting this '.angular-cli.json'file from the 'c:/Users/user-name/.angular-cli.json'

afzal00 avatar Jan 24 '18 05:01 afzal00

on CentOS7 rm ~/.angular-cli.json worked for me as well

coolrb avatar Jun 16 '18 18:06 coolrb

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.