Skip to content

ng giving error when run inside an ng-cli generated project after the latest update! #7884

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
SiddAjmera opened this issue Sep 29, 2017 · 6 comments
Labels
needs: more info Reporter must clarify the issue

Comments

@SiddAjmera
Copy link

Bug Report or Feature Request (mark with an x)

I updated to the latest version of AngularCLI and now, whenever I try to run ng inside an Angular Project generated using Angular CLI, it's giving me this error:

C:\DEV\Angular>cd MyFirstApp

C:\DEV\Angular\MyFirstApp>ng -v
C:\DEV\Angular\MyFirstApp\node_modules\@ngtools\json-schema\src\schema-tree.js:226
                this._children[name] = this._createChildProperty(name, value ? value[name] : undefined, forward ? forward.children[name] : null, propertySchema);
                                                                                                                                  ^

TypeError: Cannot read property 'glob' of null
    at ObjectSchemaTreeNode._set (C:\DEV\Angular\MyFirstApp\node_modules\@ngtools\json-schema\src\schema-tree.js:226:131)
    at new ObjectSchemaTreeNode (C:\DEV\Angular\MyFirstApp\node_modules\@ngtools\json-schema\src\schema-tree.js:211:14)
    at OneOfSchemaTreeNode._createChildProperty (C:\DEV\Angular\MyFirstApp\node_modules\@ngtools\json-schema\src\schema-tree.js:150:26)
    at OneOfSchemaTreeNode._typesPrototype.schema.oneOf.map (C:\DEV\Angular\MyFirstApp\node_modules\@ngtools\json-schema\src\schema-tree.js:163:25)
    at Array.map (native)
    at OneOfSchemaTreeNode (C:\DEV\Angular\MyFirstApp\node_modules\@ngtools\json-schema\src\schema-tree.js:162:48)
    at ArraySchemaTreeNode._createChildProperty (C:\DEV\Angular\MyFirstApp\node_modules\@ngtools\json-schema\src\schema-tree.js:150:26)
    at ArraySchemaTreeNode._set (C:\DEV\Angular\MyFirstApp\node_modules\@ngtools\json-schema\src\schema-tree.js:288:39)
    at new ArraySchemaTreeNode (C:\DEV\Angular\MyFirstApp\node_modules\@ngtools\json-schema\src\schema-tree.js:269:14)
    at ObjectSchemaTreeNode._createChildProperty (C:\DEV\Angular\MyFirstApp\node_modules\@ngtools\json-schema\src\schema-tree.js:150:26)

C:\DEV\Angular\MyFirstApp>

Versions.

C:\DEV\Angular>ng -v
    _                      _                 ____ _     ___
   / \   _ __   __ _ _   _| | __ _ _ __     / ___| |   |_ _|
  / ? \ | '_ \ / _` | | | | |/ _` | '__|   | |   | |    | |
 / ___ \| | | | (_| | |_| | | (_| | |      | |___| |___ | |
/_/   \_\_| |_|\__, |\__,_|_|\__,_|_|       \____|_____|___|
               |___/
@angular/cli: 1.4.4
node: 6.10.2
os: win32 x64

C:\DEV\Angular>

Repro steps.

I just tried to uninstall and reinstall Angular CLI using the following commands:

npm uninstall -g @angular/cli
npm cache clean
npm install -g @angular/cli@latest

I would like to emphasize on the fact that it's working as expected in a folders outside the ones generated by Angular CLI.

The log given by the failure.

C:\DEV\Angular\MyFirstApp>ng -v
C:\DEV\Angular\MyFirstApp\node_modules\@ngtools\json-schema\src\schema-tree.js:226
                this._children[name] = this._createChildProperty(name, value ? value[name] : undefined, forward ? forward.children[name] : null, propertySchema);
                                                                                                                                  ^

TypeError: Cannot read property 'glob' of null
    at ObjectSchemaTreeNode._set (C:\DEV\Angular\MyFirstApp\node_modules\@ngtools\json-schema\src\schema-tree.js:226:131)
    at new ObjectSchemaTreeNode (C:\DEV\Angular\MyFirstApp\node_modules\@ngtools\json-schema\src\schema-tree.js:211:14)
    at OneOfSchemaTreeNode._createChildProperty (C:\DEV\Angular\MyFirstApp\node_modules\@ngtools\json-schema\src\schema-tree.js:150:26)
    at OneOfSchemaTreeNode._typesPrototype.schema.oneOf.map (C:\DEV\Angular\MyFirstApp\node_modules\@ngtools\json-schema\src\schema-tree.js:163:25)
    at Array.map (native)
    at OneOfSchemaTreeNode (C:\DEV\Angular\MyFirstApp\node_modules\@ngtools\json-schema\src\schema-tree.js:162:48)
    at ArraySchemaTreeNode._createChildProperty (C:\DEV\Angular\MyFirstApp\node_modules\@ngtools\json-schema\src\schema-tree.js:150:26)
    at ArraySchemaTreeNode._set (C:\DEV\Angular\MyFirstApp\node_modules\@ngtools\json-schema\src\schema-tree.js:288:39)
    at new ArraySchemaTreeNode (C:\DEV\Angular\MyFirstApp\node_modules\@ngtools\json-schema\src\schema-tree.js:269:14)
    at ObjectSchemaTreeNode._createChildProperty (C:\DEV\Angular\MyFirstApp\node_modules\@ngtools\json-schema\src\schema-tree.js:150:26)

C:\DEV\Angular\MyFirstApp>
@Brocco Brocco self-assigned this Oct 2, 2017
@Brocco
Copy link
Contributor

Brocco commented Oct 2, 2017

Can you try reinstalling in your local projects?
Ideally upgrading your local project to the latest version as well, and then retrying.

Thanks!

@Brocco Brocco added the needs: more info Reporter must clarify the issue label Oct 2, 2017
@SiddAjmera
Copy link
Author

@Brocco , I created the project after uninstalling and reinstalling AngularCLI. So ideally my project should have the same version as my global version which is the latest version. Please do correct me if I'm wrong.

Thanks!

@chukwuemekanweke
Copy link

Check path C:\USERS{Computer-name}
I had same issue. went as far as re-installing node. But what fixed it for me was deleting a ".angular-cli.json" file i found in that directory

@hansl hansl unassigned Brocco Feb 6, 2018
@mgechev
Copy link
Member

mgechev commented Dec 20, 2018

Are you still able to reproduce this issue with the latest version?

@alan-agius4
Copy link
Collaborator

Thanks for reporting this issue. However, you didn't provide sufficient information for us to understand and reproduce the problem. Please check out our submission guidelines to understand why we can't act on issues that are lacking important information.

If the problem persists, please file a new issue and ensure you provide all of the required information when filling out the issue template.

@angular-automatic-lock-bot
Copy link

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.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 9, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
needs: more info Reporter must clarify the issue
Projects
None yet
Development

No branches or pull requests

5 participants