Skip to content
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

Code fails to run #2

Closed
srfrnk opened this issue Oct 7, 2017 · 11 comments
Closed

Code fails to run #2

srfrnk opened this issue Oct 7, 2017 · 11 comments

Comments

@srfrnk
Copy link

srfrnk commented Oct 7, 2017

Went over the steps.

At ng test or ng serve I get:

.../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 (.../node_modules/@ngtools/json-schema/src/schema-tree.js:226:131)
    at new ObjectSchemaTreeNode (.../node_modules/@ngtools/json-schema/src/schema-tree.js:211:14)
    at OneOfSchemaTreeNode._createChildProperty (.../node_modules/@ngtools/json-schema/src/schema-tree.js:150:26)
    at OneOfSchemaTreeNode._typesPrototype.schema.oneOf.map (.../node_modules/@ngtools/json-schema/src/schema-tree.js:163:25)
    at Array.map (native)
    at OneOfSchemaTreeNode (.../node_modules/@ngtools/json-schema/src/schema-tree.js:162:48)
    at ArraySchemaTreeNode._createChildProperty (.../node_modules/@ngtools/json-schema/src/schema-tree.js:150:26)
    at ArraySchemaTreeNode._set (.../node_modules/@ngtools/json-schema/src/schema-tree.js:288:39)
    at new ArraySchemaTreeNode (.../node_modules/@ngtools/json-schema/src/schema-tree.js:269:14)
    at ObjectSchemaTreeNode._createChildProperty (.../node_modules/@ngtools/json-schema/src/schema-tree.js:150:26)

Any ideas?

@pimotte
Copy link
Contributor

pimotte commented Oct 7, 2017

Can you let me know versions for:
Node.js, NPM, truffle, angular-cli, testrpc and your operating system?

@pimotte
Copy link
Contributor

pimotte commented Oct 7, 2017

angular/angular-cli#4919 and angular/angular-cli#4207 suggest these kinds of issues are commonly caused by angular-cli config files in your home directory. Maybe that's the case for you as well?

@cisrakesh
Copy link

cisrakesh commented Oct 7, 2017

Any solutions ? checked angular/angular-cli#4207 and angular/angular-cli#4919 , but no solutions works.

@pimotte
Copy link
Contributor

pimotte commented Oct 7, 2017

angular/angular-cli#7884 and angular/angular-cli#6698 also look relevant.

@srfrnk
Copy link
Author

srfrnk commented Oct 7, 2017

I did find a .angular-cli.json under my home folder and deleted that.
Works great now. 10x.

@srfrnk srfrnk closed this as completed Oct 7, 2017
@cisrakesh
Copy link

deleting .angular-cli.json give this error
Cannot read property 'config' of null
TypeError: Cannot read property 'config' of null
at Class.run (/var/www/html/angcliapp/node_modules/@angular/cli/tasks/serve.js:51:63)
at check_port_1.checkPort.then.port (/var/www/html/angcliapp/node_modules/@angular/cli/commands/serve.js:121:26)
at
at process._tickCallback (internal/process/next_tick.js:188:7)

@pimotte
Copy link
Contributor

pimotte commented Oct 7, 2017

To be clear, you shouldn't be deleting the .angular-cli.json in the project itself, but any that remains in your home directory. I also recommend reinstalling all dependencies and checking out everything again

@cisrakesh
Copy link

cisrakesh commented Oct 9, 2017

Had searched on my harddisk , hasn't found .angular-cli.json on any other place . Still getting this error

sudo ng serve
/var/www/html/angappcli/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 (/var/www/html/angappcli/node_modules/@ngtools/json-schema/src/schema-tree.js:226:132)
at new ObjectSchemaTreeNode (/var/www/html/angappcli/node_modules/@ngtools/json-schema/src/schema-tree.js:211:14)
at OneOfSchemaTreeNode._createChildProperty (/var/www/html/angappcli/node_modules/@ngtools/json-schema/src/schema-tree.js:150:26)
at OneOfSchemaTreeNode._typesPrototype.schema.oneOf.map (/var/www/html/angappcli/node_modules/@ngtools/json-schema/src/schema-tree.js:163:25)
at Array.map ()
at OneOfSchemaTreeNode (/var/www/html/angappcli/node_modules/@ngtools/json-schema/src/schema-tree.js:162:48)
at ArraySchemaTreeNode._createChildProperty (/var/www/html/angappcli/node_modules/@ngtools/json-schema/src/schema-tree.js:150:26)
at ArraySchemaTreeNode._set (/var/www/html/angappcli/node_modules/@ngtools/json-schema/src/schema-tree.js:288:39)
at new ArraySchemaTreeNode (/var/www/html/angappcli/node_modules/@ngtools/json-schema/src/schema-tree.js:269:14)
at ObjectSchemaTreeNode._createChildProperty (/var/www/html/angappcli/node_modules/@ngtools/json-schema/src/schema-tree.js:150:26)

@pimotte
Copy link
Contributor

pimotte commented Oct 9, 2017

Check if /root/.angular-cli.json exists.

I also recommend against running ng serve with sudo, that seems like a security risk.

@cisrakesh
Copy link

checked with locate -i ".angular-cli.json" , but haven't find any search result

@pimotte
Copy link
Contributor

pimotte commented Oct 9, 2017

And if you do the instructions from scratch without using sudo?

pimotte pushed a commit that referenced this issue Oct 11, 2017
* Update README.md

* Update README.md
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants