Closed richqez closed 6 years ago
fix by npm i '@.schematics/angular'
npm ERR! code ENOLOCAL npm ERR! Could not install from ".schematics\angular'" as it does not contain a package.json file.
npm i @schematics/angular
Did try it without "." yesterday at the time of the post. But it did not work, now it works, thanks 👍
@erika9star you are a life saver :+1 :)
Npm install works too
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.
Bug Report or Feature Request (mark with an
x
)Versions.
/ \ | | / | | | | / △ \ | ' \ / ` | | | | |/ ` | '| | | | | | | / | | | | (| | || | | (| | | | |__| | | | // __| ||_, |_,||_,|| __|__|| |/ @angular/cli: 1.4.0 node: 7.10.0 os: win32 x64 @angular/animations: 4.3.6 @angular/common: 4.3.6 @angular/compiler: 4.3.6 @angular/core: 4.3.6 @angular/forms: 4.3.6 @angular/http: 4.3.6 @angular/platform-browser: 4.3.6 @angular/platform-browser-dynamic: 4.3.6 @angular/platform-server: 4.3.6 @angular/router: 4.3.6 @angular/upgrade: 4.1.3 @angular/cli: 1.4.0 @angular/compiler-cli: 4.3.6 typescript: 2.3.4
Repro steps.
The log given by the failure.
ng g component r101c --module=eis/eis.module Unknown collection "@schematics/angular". Error: Unknown collection "@schematics/angular". at SchematicEngine.createCollection (C:\PI-Data-Center-App\node_modules\@angular-devkit\schematics\src\engine\engine.js:45:19) at Object.getCollection (C:\PI-Data-Center-App\node_modules\@angular\cli\utilities\schematics.js:32:31) at Class.run (C:\PI-Data-Center-App\node_modules\@angular\cli\tasks\schematic-get-options.js:11:41) at Class.beforeRun (C:\PI-Data-Center-App\node_modules\@angular\cli\commands\generate.js:89:31) at Promise.resolve.then (C:\PI-Data-Center-App\node_modules\@angular\cli\ember-cli\lib\cli\cli.js:150:24)