Repository navigation
glob' of null when trying to build #4919
Description
Please provide us with the following information:
OS?
Linux 4.4.0-63-generic #84-Ubuntu SMP x86_64 x86_64 GNU/Linux
Versions.
@angular/cli: 1.0.0-beta.32.3
node: 7.6.0
os: linux x64
@angular/common: 2.4.8
@angular/compiler: 2.4.8
@angular/core: 2.4.8
@angular/forms: 2.4.8
@angular/http: 2.4.8
@angular/platform-browser: 2.4.8
@angular/platform-browser-dynamic: 2.4.8
@angular/router: 3.4.8
@angular/cli: 1.0.0-beta.32.3
@angular/compiler-cli: 2.4.8
Repro steps.
ng build --env=prod
The log given by the failure.
TypeError: Cannot read property 'glob' of null
at ObjectSchemaTreeNode._set (/app/node_modules/@ngtools/json-schema/src/schema-tree.js:226:131)
at new ObjectSchemaTreeNode (/app/node_modules/@ngtools/json-schema/src/schema-tree.js:211:14)
at OneOfSchemaTreeNode._createChildProperty (/app/node_modules/@ngtools/json-schema/src/schema-tree.js:150:26)
at OneOfSchemaTreeNode._typesPrototype.schema.oneOf.map (/app/node_modules/@ngtools/json-schema/src/schema-tree.js:163:25)
at Array.map (native)
at OneOfSchemaTreeNode (/app/node_modules/@ngtools/json-schema/src/schema-tree.js:162:48)
at ArraySchemaTreeNode._createChildProperty (/app/node_modules/@ngtools/json-schema/src/schema-tree.js:150:26)
at ArraySchemaTreeNode._set (/app/node_modules/@ngtools/json-schema/src/schema-tree.js:288:39)
at new ArraySchemaTreeNode (/app/node_modules/@ngtools/json-schema/src/schema-tree.js:269:14)
at ObjectSchemaTreeNode._createChildProperty (/app/node_modules/@ngtools/json-schema/src/schema-tree.js:150:26)
at ObjectSchemaTreeNode._set (/app/node_modules/@ngtools/json-schema/src/schema-tree.js:226:45)
at new ObjectSchemaTreeNode (/app/node_modules/@ngtools/json-schema/src/schema-tree.js:211:14)
at ArraySchemaTreeNode._createChildProperty (/app/node_modules/@ngtools/json-schema/src/schema-tree.js:150:26)
at ArraySchemaTreeNode._set (/app/node_modules/@ngtools/json-schema/src/schema-tree.js:288:39)
at new ArraySchemaTreeNode (/app/node_modules/@ngtools/json-schema/src/schema-tree.js:269:14)
at RootSchemaTreeNode._createChildProperty (/app/node_modules/@ngtools/json-schema/src/schema-tree.js:150:26)
at RootSchemaTreeNode._set (/app/node_modules/@ngtools/json-schema/src/schema-tree.js:226:45)
at RootSchemaTreeNode.ObjectSchemaTreeNode (/app/node_modules/@ngtools/json-schema/src/schema-tree.js:211:14)
at RootSchemaTreeNode (/app/node_modules/@ngtools/json-schema/src/schema-tree.js:309:9)
at GeneratedSchemaClass.SchemaClassBase (/app/node_modules/@ngtools/json-schema/src/schema-class-factory.js:52:29)
at GeneratedSchemaClass (/app/node_modules/@ngtools/json-schema/src/schema-class-factory.js:140:13)
at new CliConfig (/app/node_modules/@angular/cli/models/config/config.js:17:24)
at Function.fromConfigPath (/app/node_modules/@angular/cli/models/config/config.js:80:16)
at Function.fromProject (/app/node_modules/@angular/cli/models/config.js:79:46)
at Object. (/app/node_modules/@angular/cli/commands/build.js:5: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 (/app/node_modules/@angular/cli/addon/index.js:22:16)
at /app/node_modules/@angular/cli/ember-cli/lib/models/project.js:287:61
at Array.forEach (native)
at Project.addonCommands (/app/node_modules/@angular/cli/ember-cli/lib/models/project.js:286:15)
at Project.eachAddonCommand (/app/node_modules/@angular/cli/ember-cli/lib/models/project.js:321:30)
at module.exports (/app/node_modules/@angular/cli/ember-cli/lib/cli/lookup-command.js:33:13)
at CLI. (/app/node_modules/@angular/cli/ember-cli/lib/cli/cli.js:42:26)
at tryCatch (/app/node_modules/rsvp/dist/rsvp.js:538:12)
at invokeCallback (/app/node_modules/rsvp/dist/rsvp.js:553:13)
at publish (/app/node_modules/rsvp/dist/rsvp.js:521:7)
at flush (/app/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.
Generated a new app using the CLI and did a deployment with dokku to digitalocean
Thanks! We'll be in touch soon.
Activity
timelot commentedon Feb 23, 2017
same error here after updating from angular-cli to angular/cli
nmongiya commentedon Feb 24, 2017
same error here , I am using windows 10
@angular/cli: 1.0.0-beta.32.3
node: 6.10.0
os: win32 x64
nmongiya commentedon Feb 24, 2017
Even ng serve is not working for me
thomasdtucker commentedon Feb 24, 2017
I am having the exact same error. I have uninstalled node entirely. brew installed node again. And installed @angular/cli from scratch. I also tried downgrading versions of cli and it still happens.
What is going on?
@angular/cli: 1.0.0-beta.32.3
node: 7.5.0
os: darwin x64
@angular/cli: 1.0.0-beta.32.3
@angular/common: 2.4.8
@angular/compiler: 2.4.8
@angular/compiler-cli: 2.4.8
@angular/core: 2.4.8
@angular/forms: 2.4.8
@angular/http: 2.4.8
@angular/material: 2.0.0-beta.2
@angular/platform-browser: 2.4.8
@angular/platform-browser-dynamic: 2.4.8
@angular/platform-server: 2.4.8
@angular/router: 3.4.8
Shirish-FrontEndDev commentedon Mar 1, 2017
I’m facing the same issue with @angular/cli 1.0.0-rc.0, and this is just angular/cli ng new app nothing fancy.
My .angular-cli.json
and package.json
lafama commentedon Mar 1, 2017
Anyone with a fix for this?
intellix commentedon Mar 3, 2017
Debugging this a little. I'm also getting
input of nullwhen pushing an ng2 app. I'm only getting this when pushing to a Deis PaaS application but everything works when it's Heroku. I'm even using the same build pack but it's still not working.I see that
glob,inputandoutputare all values of schema.json to do with the assets array for copying stuff over.I've tried:
assetsproperty entirelyassetsproperty.angular-cli.jsontoangular-cli.jsonDeleting the assets property entirely from .angular-cli.json gives me the
input of nullerror so I guess that's why my ng2 project gets that error when pushing to Deis PaaSIt seems there are a couple of related issues: #4889 and #4207
My error, which may signify that it also doesn't work from /tmp/build:
Shirish-FrontEndDev commentedon Mar 3, 2017
filipesilva commentedon Mar 13, 2017
In #4889 (comment), @huntsberg said:
filipesilva commentedon Mar 13, 2017
Dupe of #4207, especially relevant is #4207 (comment)
balr404 commentedon May 9, 2017
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 commentedon May 9, 2017
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.
cctv549681 commentedon Jun 29, 2017
@balr404 thanks ,it works
kirillgroshkov commentedon Aug 30, 2017
Still doesn't work for me!
magentall commentedon Apr 30, 2018
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
magentall commentedon Jun 25, 2018
Try sudo of ur ng first, not to have to have to reinstall if not necessary
im on debian 9.4
angular-automatic-lock-bot commentedon Sep 8, 2019
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.