Skip to content

Cannot read property 'glob' of null #5231

Closed

Description

@mkdebie

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.

Activity

  1. intellix commented on Mar 6, 2017

    @intellix
    Contributor

    Duplicate of #4919

  2. xe4me commented on Mar 7, 2017

    @xe4me

    Same here
    Works fine in my mac
    not in ubunto

  3. balr404 commented on May 9, 2017

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

  4. balr404 commented on May 9, 2017

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

  5. balr404 commented on May 9, 2017

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

  6. manoz2000 commented on Jun 12, 2017

    @manoz2000

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

  7. kirillgroshkov commented on Aug 30, 2017

    @kirillgroshkov

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

  8. cisrakesh commented on Oct 9, 2017

    @cisrakesh

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

  9. abhishek-nyllabs commented on Nov 5, 2017

    @abhishek-nyllabs

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

  10. luizlucasi commented on Nov 23, 2017

    @luizlucasi

    On mac

    rm ~/.angular-cli.json

    worked for me

  11. afzal00 commented on Jan 24, 2018

    @afzal00

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

  12. coolrb commented on Jun 16, 2018

    @coolrb

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

  13. angular-automatic-lock-bot commented on Sep 8, 2019

    @angular-automatic-lock-bot

    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.

  14. locked and limited conversation to collaborators on Sep 8, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions