`ng add @angular/elements@next` fails with schema.json not found error
See original GitHub issue🐞 bug report
Affected Package
The issue is caused by package @angular/elements
Is this a regression?
Yes. Doing ng add @angular/elements
works fine.
Description
Creating a new workspace project using angular 9 RC 12. Everything installing fine, but when doing ng add @angular/elements@next
I get:
`An unhandled exception occurred: Path "<my_dir>/node_modules/@angular/elements/schematics/ng-add/schema.json" does not exist.
See "/private/var/folders/9c/scyzyh01349gnx6qgkp_twzh0000gn/T/ng-GPnlhg/angular-errors.log" for further details.
Log shows:
[error] Error: Path "/Users/hisham/src/ess-app/frontend/node_modules/@angular/elements/schematics/ng-add/schema.json" does not exist.
at readFile (/Users/hisham/src/ess-app/frontend/node_modules/@angular-devkit/schematics/tools/file-system-utility.js:17:15)
at Object.readJsonFile (/Users/hisham/src/ess-app/frontend/node_modules/@angular-devkit/schematics/tools/file-system-utility.js:45:29)
at NodeModulesEngineHost.createSchematicDescription (/Users/hisham/src/ess-app/frontend/node_modules/@angular-devkit/schematics/tools/file-system-engine-host-base.js:183:48)
at SchematicEngine.createSchematic (/Users/hisham/src/ess-app/frontend/node_modules/@angular-devkit/schematics/src/engine/engine.js:219:38)
at CollectionImpl.createSchematic (/Users/hisham/src/ess-app/frontend/node_modules/@angular-devkit/schematics/src/engine/engine.js:69:29)
at AddCommand.getSchematic (/Users/hisham/src/ess-app/frontend/node_modules/@angular/cli/models/schematic-command.js:134:27)
at AddCommand.runSchematic (/Users/hisham/src/ess-app/frontend/node_modules/@angular/cli/models/schematic-command.js:296:32)
at AddCommand.executeSchematic (/Users/hisham/src/ess-app/frontend/node_modules/@angular/cli/commands/add-impl.js:176:31)
at AddCommand.run (/Users/hisham/src/ess-app/frontend/node_modules/@angular/cli/commands/add-impl.js:60:29)
at async AddCommand.validateAndRun (/Users/hisham/src/ess-app/frontend/node_modules/@angular/cli/models/command.js:134:28)
at async Object.runCommand (/Users/hisham/src/ess-app/frontend/node_modules/@angular/cli/models/command-runner.js:201:24)
at async default_1 (/Users/hisham/src/ess-app/frontend/node_modules/@angular/cli/lib/cli/index.js:62:31)
Anything else relevant?
OSX 10.5.12, npm 6.13.2, node 13.2.0
Issue Analytics
- State:
- Created 4 years ago
- Reactions:5
- Comments:8 (4 by maintainers)
Top Results From Across the Web
Unable to load Schema -- angular.json file - Stack Overflow
I got this in VSCode when I accidentally started it without first running "npm install" in an Angular project after restructuring my work ......
Read more >JSON Schema | The home of JSON Schema
JSON Schema is a declarative language that allows you to annotate and validate JSON documents. JSON Schema enables the confident and reliable use...
Read more >Authoring schematics - Angular
The Angular Schematics tooling guards against side effects and errors by creating a virtual file system. A schematic describes a pipeline of transformations ......
Read more >Error when pass my application to universal angular
An unhandled exception occurred: Error: ENOENT: no such file or directory, lstat tsconfig.app.json comparto configuración angular.json { "$schema": ".
Read more >Speed up your Angular schematics development with useful ...
json file. Last but not least we don't want our users to manually run npm install on the console after adding dependencies. Therefore,...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Probably in 9.0.1. Patch releases are usually weekly.
Just a note; schema.json is also not present in earlier versions of @angular/elements; checked a couple of versions at unpkg: 6.x, 7.x, 8.x.