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

Cannot read property glob of null

Open balr404 opened this issue 9 years ago • 7 comments

What ever node version i install i am getting this error. Can some one help to fix this issue. I am completely blocked with this issue.

TypeError: Cannot read property 'glob' of null at ObjectSchemaTreeNode._set (/usr/local/lib/node_modules/@angular/cli/node_modules/@ngtools/json-schema/src/schema-tree.js:224:131) at new ObjectSchemaTreeNode (/usr/local/lib/node_modules/@angular/cli/node_modules/@ngtools/json-schema/src/schema-tree.js:209:14) at OneOfSchemaTreeNode._createChildProperty (/usr/local/lib/node_modules/@angular/cli/node_modules/@ngtools/json-schema/src/schema-tree.js:148:26) at OneOfSchemaTreeNode._typesPrototype.schema.oneOf.map (/usr/local/lib/node_modules/@angular/cli/node_modules/@ngtools/json-schema/src/schema-tree.js:161:25) at Array.map (native) at OneOfSchemaTreeNode (/usr/local/lib/node_modules/@angular/cli/node_modules/@ngtools/json-schema/src/schema-tree.js:160:48) at ArraySchemaTreeNode._createChildProperty (/usr/local/lib/node_modules/@angular/cli/node_modules/@ngtools/json-schema/src/schema-tree.js:148:26) at ArraySchemaTreeNode._set (/usr/local/lib/node_modules/@angular/cli/node_modules/@ngtools/json-schema/src/schema-tree.js:286:39) at new ArraySchemaTreeNode (/usr/local/lib/node_modules/@angular/cli/node_modules/@ngtools/json-schema/src/schema-tree.js:267:14) at ObjectSchemaTreeNode._createChildProperty (/usr/local/lib/node_modules/@angular/cli/node_modules/@ngtools/json-schema/src/schema-tree.js:148:26)

balr404 avatar May 05 '17 18:05 balr404

have the same problem

kerocode avatar May 08 '17 01:05 kerocode

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.

filipesilva avatar May 08 '17 10:05 filipesilva

Could please tell me,What kind of information you are expecting?

balr404 avatar May 08 '17 20:05 balr404

Version

@angular/cli: 1.0.2 node: 7.7.4 os: darwin x64

angular.cli.json

{ "$schema": "./node_modules/@angular/cli/lib/config/schema.json", "project": { "name": "my-app" }, "apps": [ { "root": "src", "outDir": "dist", "assets": [ "assets", "favicon.ico" ], "index": "index.html", "main": "main.ts", "polyfills": "polyfills.ts", "test": "test.ts", "tsconfig": "tsconfig.app.json", "testTsconfig": "tsconfig.spec.json", "prefix": "app", "styles": [ "../node_modules/bootstrap/dist/css/bootstrap.min.css", "../node_modules/font-awesome/css/font-awesome.css" ], "scripts": [], "environmentSource": "environments/environment.ts", "environments": { "dev": "environments/environment.ts", "prod": "environments/environment.prod.ts" } } ], "e2e": { "protractor": { "config": "./protractor.conf.js" } }, "lint": [ { "project": "src/tsconfig.app.json" }, { "project": "src/tsconfig.spec.json" }, { "project": "e2e/tsconfig.e2e.json" } ], "test": { "karma": { "config": "./karma.conf.js" } }, "defaults": { "styleExt": "css", "component": {} } }

Package.json

{ "name": "my-app", "version": "1.0.0", "description": "QuickStart package.json from the documentation, supplemented with testing support", "scripts": { "ng": "ng", "start": "ng serve", "build": "ng build", "test": "ng test", "lint": "ng lint", "e2e": "ng e2e", "i18n": "ng-xi18n" }, "private": true, "keywords": [], "author": "", "license": "MIT", "dependencies": { "@angular/animations": "^4.1.0", "@angular/common": "^4.1.0", "@angular/compiler": "^4.1.0", "@angular/compiler-cli": "^4.1.0", "@angular/core": "^4.1.0", "@angular/flex-layout": "2.0.0-beta.8", "@angular/forms": "^4.1.0", "@angular/http": "^4.1.0", "@angular/material": "^2.0.0-beta.3", "@angular/platform-browser": "^4.1.0", "@angular/platform-browser-dynamic": "^4.1.0", "@angular/platform-server": "^4.1.0", "@angular/router": "^4.1.0", "@ngx-translate/core": "^6.0.1", "@ngx-translate/http-loader": "0.0.3", "@types/underscore": "^1.8.0", "angular-2-local-storage": "^1.0.1", "bootstrap": "^3.3.7", "core-js": "^2.4.1", "font-awesome": "^4.7.0", "hammerjs": "^2.0.8", "ng2-validation": "^4.1.0", "ngx-infinite-scroll": "^0.5.1", "rxjs": "^5.3.0", "underscore": "^1.8.3", "zone.js": "^0.8.5" }, "devDependencies": { "@angular/cli": "^1.0.2", "@angular/compiler-cli": "^4.1.0", "@types/jasmine": "~2.5.38", "@types/node": "^7.0.8", "codelyzer": "~3.0.1", "jasmine-core": "~2.6.1", "jasmine-spec-reporter": "~4.1.0", "karma": "~1.6.0", "karma-chrome-launcher": "~2.0.0", "karma-cli": "~1.0.1", "karma-coverage-istanbul-reporter": "^1.2.1 ", "karma-jasmine": "~1.1.0", "karma-jasmine-html-reporter": "^0.2.2", "karma-phantomjs-launcher": "^1.0.4", "protractor": "~5.1.1", "ts-node": "~3.0.2", "tslint": "~5.1.0", "typescript": "~2.3.2" }, "repository": {} }

balr404 avatar May 08 '17 20: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

for me this was happening because I was targeting the wrong version of the CLI. The package.json file had "@angular/cli": "1.5.3" when it should have been "@angular/cli": "1.5.4". Once I changed it built successfully

ArnoldKrumins avatar Nov 27 '17 15:11 ArnoldKrumins

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.