ng is not working
Please provide us with the following information:
OS?
Windows 10
Versions.
Cannot read property 'input' of null
TypeError: Cannot read property 'input' of null
at ObjectSchemaTreeNode._set (C:\Users\gkadmin\AppData\Roaming\npm\node_modules@angular\cli\node_modules@ngtools\json-schema\src\schema-tree.js:347:132)
at new ObjectSchemaTreeNode (C:\Users\gkadmin\AppData\Roaming\npm\node_modules@angular\cli\node_modules@ngtools\json-schema\src\schema-tree.js:331:14)
at OneOfSchemaTreeNode.NonLeafSchemaTreeNode._createChildProperty (C:\Users\gkadmin\AppData\Roaming\npm\node_modules@angular\cli\node_modules@ngtools\json-schema\src\schema-tree.js:244:24)
at C:\Users\gkadmin\AppData\Roaming\npm\node_modules@angular\cli\node_modules@ngtools\json-schema\src\schema-tree.js:260:26
at Array.map (native)
at new OneOfSchemaTreeNode (C:\Users\gkadmin\AppData\Roaming\npm\node_modules@angular\cli\node_modules@ngtools\json-schema\src\schema-tree.js:259:48)
at ArraySchemaTreeNode.NonLeafSchemaTreeNode._createChildProperty (C:\Users\gkadmin\AppData\Roaming\npm\node_modules@angular\cli\node_modules@ngtools\json-schema\src\schema-tree.js:244:24)
at ArraySchemaTreeNode._set (C:\Users\gkadmin\AppData\Roaming\npm\node_modules@angular\cli\node_modules@ngtools\json-schema\src\schema-tree.js:434:39)
at new ArraySchemaTreeNode (C:\Users\gkadmin\AppData\Roaming\npm\node_modules@angular\cli\node_modules@ngtools\json-schema\src\schema-tree.js:414:14)
at ObjectSchemaTreeNode.NonLeafSchemaTreeNode._createChildProperty (C:\Users\gkadmin\AppData\Roaming\npm\node_modules@angular\cli\node_modules@ngtools\json-schema\src\schema-tree.js:244:24)
at ObjectSchemaTreeNode._set (C:\Users\gkadmin\AppData\Roaming\npm\node_modules@angular\cli\node_modules@ngtools\json-schema\src\schema-tree.js:347:47)
at new ObjectSchemaTreeNode (C:\Users\gkadmin\AppData\Roaming\npm\node_modules@angular\cli\node_modules@ngtools\json-schema\src\schema-tree.js:331:14)
at ArraySchemaTreeNode.NonLeafSchemaTreeNode._createChildProperty (C:\Users\gkadmin\AppData\Roaming\npm\node_modules@angular\cli\node_modules@ngtools\json-schema\src\schema-tree.js:244:24)
at ArraySchemaTreeNode._set (C:\Users\gkadmin\AppData\Roaming\npm\node_modules@angular\cli\node_modules@ngtools\json-schema\src\schema-tree.js:434:39)
at new ArraySchemaTreeNode (C:\Users\gkadmin\AppData\Roaming\npm\node_modules@angular\cli\node_modules@ngtools\json-schema\src\schema-tree.js:414:14)
at RootSchemaTreeNode.NonLeafSchemaTreeNode._createChildProperty (C:\Users\gkadmin\AppData\Roaming\npm\node_modules@angular\cli\node_modules@ngtools\json-schema\src\schema-tree.js:244:24)
at RootSchemaTreeNode.ObjectSchemaTreeNode._set (C:\Users\gkadmin\AppData\Roaming\npm\node_modules@angular\cli\node_modules@ngtools\json-schema\src\schema-tree.js:347:47)
at RootSchemaTreeNode.ObjectSchemaTreeNode [as constructor] (C:\Users\gkadmin\AppData\Roaming\npm\node_modules@angular\cli\node_modules@ngtools\json-schema\src\schema-tree.js:331:14)
at new RootSchemaTreeNode (C:\Users\gkadmin\AppData\Roaming\npm\node_modules@angular\cli\node_modules@ngtools\json-schema\src\schema-tree.js:478:16)
at GeneratedSchemaClass.SchemaClassBase (C:\Users\gkadmin\AppData\Roaming\npm\node_modules@angular\cli\node_modules@ngtools\json-schema\src\schema-class-factory.js:66:29)
at new GeneratedSchemaClass (C:\Users\gkadmin\AppData\Roaming\npm\node_modules@angular\cli\node_modules@ngtools\json-schema\src\schema-class-factory.js:165:20)
at new CliConfig (C:\Users\gkadmin\AppData\Roaming\npm\node_modules@angular\cli\models\config\config.js:24:24)
at Function.CliConfig.fromConfigPath (C:\Users\gkadmin\AppData\Roaming\npm\node_modules@angular\cli\models\config\config.js:99:16)
at Function.CliConfig.fromProject (C:\Users\gkadmin\AppData\Roaming\npm\node_modules@angular\cli\models\config.js:63:44)
at Object.
Repro steps.
npm -g uninstall @angular/cli npm cache clean npm -g install @angular/cli@latest ng new myNewApp (the myNewApp folder did not previously exist) cd myNewApp
try ng serve or ng --version
node -v .v6.9.5 npm -v 4.1.2 @angular/cli 1.0.0.30 beta
I recommend you to install beta.21 and wait for beta.31. It is the only version working (partially) for me right now.
You omit quite a bit of information. Do your homework and provide more context. Starting with Repro steps containing your steps, not the tools versions.
Also, the issue title is not much of a help, it is too generic, more likely it gets ignored.
What I did: npm -g uninstall @angular/cli npm cache clean npm -g install @angular/cli@latest ng new myNewApp (the myNewApp folder did not previously exist) cd myNewApp ng serve
Cannot read property 'input' of null TypeError: Cannot read property 'input' of null at ObjectSchemaTreeNode._set (D:\angular2Projects\publicdash\node_modules@ngtools\json-schema\src\schema-tree.js:226:131)
When you use
ng new nyNewAPP,
is it working?
yes ng new nyNewAPP is working
I deleted all the
node_modules,
package.json
in
C:\Users\Administrator and
C:\Users\Administrator\AppData\Roaming
included folders npm and npm-cache.
Then I unisntalled the nodejs,reinstalled nodejs ,rxjs, node-sass and @angluar/cli@latest.
it`s working now.
@nmongiya If it is working for you, please close the issue.
its crashed if your use old nodejs version in OS.
If your OS ubuntu, use https://github.com/nodesource/distributions#deb
new angular/@cli requests nodejs ver. 6.9.x
I solve this problem use repo in link. Install to my ubuntu node 6.9 and all works fine!
+1, I cant even get ng new to run
Today I tried re-installing windows 10 then installed latest node and agular/cli but still getting error.
@angular/cli: 1.0.0-beta.32.3 node: 6.10.0 os: win32 x64
ng new is working but ng serve is giving below error
Cannot read property 'glob' of null
TypeError: Cannot read property 'glob' of null
at ObjectSchemaTreeNode._set (D:\newProjects\testAng\node_modules@ngtools\json-schema\src\schema-tree.js:226:131)
at new ObjectSchemaTreeNode (D:\newProjects\testAng\node_modules@ngtools\json-schema\src\schema-tree.js:211:14)
at OneOfSchemaTreeNode._createChildProperty (D:\newProjects\testAng\node_modules@ngtools\json-schema\src\schema-tree.js:150:26)
at OneOfSchemaTreeNode._typesPrototype.schema.oneOf.map (D:\newProjects\testAng\node_modules@ngtools\json-schema\src\schema-tree.js:163:25)
at Array.map (native)
at OneOfSchemaTreeNode (D:\newProjects\testAng\node_modules@ngtools\json-schema\src\schema-tree.js:162:48)
at ArraySchemaTreeNode._createChildProperty (D:\newProjects\testAng\node_modules@ngtools\json-schema\src\schema-tree.js:150:26)
at ArraySchemaTreeNode._set (D:\newProjects\testAng\node_modules@ngtools\json-schema\src\schema-tree.js:288:39)
at new ArraySchemaTreeNode (D:\newProjects\testAng\node_modules@ngtools\json-schema\src\schema-tree.js:269:14)
at ObjectSchemaTreeNode._createChildProperty (D:\newProjects\testAng\node_modules@ngtools\json-schema\src\schema-tree.js:150:26)
at ObjectSchemaTreeNode._set (D:\newProjects\testAng\node_modules@ngtools\json-schema\src\schema-tree.js:226:45)
at new ObjectSchemaTreeNode (D:\newProjects\testAng\node_modules@ngtools\json-schema\src\schema-tree.js:211:14)
at ArraySchemaTreeNode._createChildProperty (D:\newProjects\testAng\node_modules@ngtools\json-schema\src\schema-tree.js:150:26)
at ArraySchemaTreeNode._set (D:\newProjects\testAng\node_modules@ngtools\json-schema\src\schema-tree.js:288:39)
at new ArraySchemaTreeNode (D:\newProjects\testAng\node_modules@ngtools\json-schema\src\schema-tree.js:269:14)
at RootSchemaTreeNode._createChildProperty (D:\newProjects\testAng\node_modules@ngtools\json-schema\src\schema-tree.js:150:26)
at RootSchemaTreeNode._set (D:\newProjects\testAng\node_modules@ngtools\json-schema\src\schema-tree.js:226:45)
at RootSchemaTreeNode.ObjectSchemaTreeNode (D:\newProjects\testAng\node_modules@ngtools\json-schema\src\schema-tree.js:211:14)
at RootSchemaTreeNode (D:\newProjects\testAng\node_modules@ngtools\json-schema\src\schema-tree.js:309:9)
at GeneratedSchemaClass.SchemaClassBase (D:\newProjects\testAng\node_modules@ngtools\json-schema\src\schema-class-factory.js:52:29)
at GeneratedSchemaClass (D:\newProjects\testAng\node_modules@ngtools\json-schema\src\schema-class-factory.js:140:13)
at new CliConfig (D:\newProjects\testAng\node_modules@angular\cli\models\config\config.js:17:24)
at Function.fromConfigPath (D:\newProjects\testAng\node_modules@angular\cli\models\config\config.js:80:16)
at Function.fromProject (D:\newProjects\testAng\node_modules@angular\cli\models\config.js:79:46)
at Object.
Dupe of https://github.com/angular/angular-cli/issues/4919, there's more information there.
I had a look at the failing js module and found out there are still lots of bugs according to the follwing TypeError:
Cannot read property 'glob' of null TypeError: Cannot read property 'glob' of null at ObjectSchemaTreeNode._set (D:\newProjects\testAng\node_modules@ngtools\json-schema\src\schema-tree.js:226:131). I
Here's the reason and follows with a temporary fix: Line no. 223 if ( schema['properties'] ) always return TRUE even it has empty "{ }" object. Line no. 224 returns a null "input" then, Line no.225 tries to get a schema['properties'][null] <-- failed here
- Here's my temporary fix (replace line 223 to 228 with these then, ng new name and ng --version will work ) 223 if (schema['properties'] != null && Object.keys(schema['properties']).length > 0) { 224 for (const name of Object.keys(schema['properties'])) { 225 if (Object.keys(schema['properties'])['input'] != null) { 226 const propertySchema = schema['properties'][name]; 227 this._children[name] = this._createChildProperty(name, value ? value[name] : undefined, forward ? forward.children[name] : n ull, propertySchema);} 228 } 229 }
works for me on 1.3.1 i also change the dev in the package from angular/cli 131 to angular cli 1.7.4 (may be optional)
verify that u own the directrory (" chown groupe:user directory " on ubuntu) and try root launch for the ng (sudo)
or / and remove the node dir and -lock.json, run npm i and launch or sudo launch ng
changing node from nvm fixed everything for me
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.