You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ng g app-shell works on a fresh app but on my project I get the following error but no idea what it means
TypeError: input.mergeMap is not a function
at Object.callRule (/node_modules/@angular-devkit/schematics/src/rules/call.js:70:18)
at SchematicImpl.call (/node_modules/@angular-devkit/schematics/src/engine/schematic.js:35:23)
at Promise (/node_modules/@angular/cli/tasks/schematic-run.js:73:23)
at new Promise (<anonymous>)
at Class.run (/node_modules/@angular/cli/tasks/schematic-run.js:72:16)
at Class.run (/node_modules/@angular/cli/commands/generate.js:152:33)
at resolve (/node_modules/@angular/cli/ember-cli/lib/models/command.js:261:20)
at new Promise (<anonymous>)
at Class.validateAndRun (/node_modules/@angular/cli/ember-cli/lib/models/command.js:240:12)
at Promise.resolve.then.then (/node_modules/@angular/cli/ember-cli/lib/cli/cli.js:140:24)
The only thing I can think of is it's a multi app setup structured like
Same happens with ng g component [componentname] or ng g module [modulename]
ng generate module public-library/trialinput.mergeMap is not a functionTypeError: input.mergeMap is not a function at Object.callRule (/mnt/d/dev/bereslim/bsm-ui/node_modules/@angular-devkit/schematics/src/rules/call.js:70:18) at SchematicImpl.call (/mnt/d/dev/bereslim/bsm-ui/node_modules/@angular-devkit/schematics/src/engine/schematic.js:35:23) at Promise (/mnt/d/dev/bereslim/bsm-ui/node_modules/@angular/cli/tasks/schematic-run.js:73:23) at new Promise (<anonymous>) at Class.run (/mnt/d/dev/bereslim/bsm-ui/node_modules/@angular/cli/tasks/schematic-run.js:72:16) at Class.run (/mnt/d/dev/bereslim/bsm-ui/node_modules/@angular/cli/commands/generate.js:152:33) at resolve (/mnt/d/dev/bereslim/bsm-ui/node_modules/@angular/cli/ember-cli/lib/models/command.js:261:20) at new Promise (<anonymous>) at Class.validateAndRun (/mnt/d/dev/bereslim/bsm-ui/node_modules/@angular/cli/ember-cli/lib/models/command.js:240:12) at Promise.resolve.then.then (/mnt/d/dev/bereslim/bsm-ui/node_modules/@angular/cli/ember-cli/lib/cli/cli.js:140:24)
exact same issue:
input.mergeMap is not a function
TypeError: input.mergeMap is not a function
at Object.callRule (/home/nils/Documents/DEV2017A/angular5-heroes/node_modules/@angular-devkit/schematics/src/rules/call.js:70:18)
at SchematicImpl.call (/home/nils/Documents/DEV2017A/angular5-heroes/node_modules/@angular-devkit/schematics/src/engine/schematic.js:35:23)
at Promise (/home/nils/Documents/DEV2017A/angular5-heroes/node_modules/@angular/cli/tasks/schematic-run.js:73:23)
at Promise ()
at Class.run (/home/nils/Documents/DEV2017A/angular5-heroes/node_modules/@angular/cli/tasks/schematic-run.js:72:16)
at Class.run (/home/nils/Documents/DEV2017A/angular5-heroes/node_modules/@angular/cli/commands/generate.js:152:33)
at resolve (/home/nils/Documents/DEV2017A/angular5-heroes/node_modules/@angular/cli/ember-cli/lib/models/command.js:261:20)
at Promise ()
at Class.validateAndRun (/home/nils/Documents/DEV2017A/angular5-heroes/node_modules/@angular/cli/ember-cli/lib/models/command.js:240:12)
at Promise.resolve.then.then (/home/nils/Documents/DEV2017A/angular5-heroes/node_modules/@angular/cli/ember-cli/lib/cli/cli.js:140:24)
It seems that if you have @angular/cli installed globally and a different version installed locally it gets broken.
I solved the same error removing the cli package that was installed locally with npm remove @angular/cli --save in my project folder.
Reacted by Daniel Calvi, mattvsky, Ray, Junior Gantin, FernandoM, murat çulcu, Aaron Roller, sharath1608, Bryce Cummock, courageTheDeveloper and 6 more
Reacted by courageTheDeveloper, mahendra-reglobe, Cristian Mota and luosuolaotaipo
same error Your global Angular CLI version (1.6.0) is greater than your local
version (1.4.9). The local Angular CLI version is used.
To disable this warning use "ng set --global warnings.versionMismatch=false".
input.mergeMap is not a function
TypeError: input.mergeMap is not a function
It seems that if you have @angular/cli installed globally and a different version installed locally it gets broken.
I solved the same error removing the cli package that was installed locally with npm remove @angular/cli --save in my project folder.
Both my global and local version are the same.
But.... uninstalling the local (project) cli works. 👍
[edit]
The other way around => uninstall global and install local project CLI results in the same error.
So it seems to be a problem with the local (project) cli
Reacted by Elias Dräxler, leedeblade, Alina Mihai, Deepu Nair, Stefan de Groot, Simon Weaver, Serafijn Boelaert, Luiz Carlos, Constantine Colotiline, jesben and 6 more
Reacted by Stefan de Groot, Luiz Carlos, Eugene Serafimovich and Lawrence Yoon
CLI isn't compatible with typescript 2.6 or above - so run this.
npm install typescript@'>=2.4.2 <2.6.0
Changing schematics worked for me too but then I get another error saying it needed 0.0.42. So I installed 0.0.42 and then typescript 2.5 and it worked again
@BenevidesLecontes got You seem to not be depending on "@angular/core. This is an error.' after successfully creating a component. This was after I ran npm install @angular-devkit/schematics --save-dev
Thanks for reporting this issue. This issue was originally reported a long time ago and since then we've had many releases, one of which might have addressed this problem. Please update to the most recent Angular CLI version.
If the problem persists after upgrading, please open a new issue, provide a simple repository reproducing the problem, and describe the difference between the expected and current behavior.
Activity
the-ult commentedon Dec 7, 2017
Same happens with
ng g component [componentname]orng g module [modulename]yarn install
dottodot commentedon Dec 7, 2017
Ok so deleting node_modules and reinstalling seems to clear that error but faced with a new error of
njifares commentedon Dec 7, 2017
Same issue here after updating CLI from 1.5.2 to 1.6.0
cristianqr commentedon Dec 7, 2017
The same is happening with:
ng generate module module-nameI think the issue is with all commands of angular cli.
Brocco commentedon Dec 7, 2017
If you are receiving an error other than
Specified module does not existplease create a new issue with your error and steps to recreate.NilsNaegele commentedon Dec 7, 2017
exact same issue:
input.mergeMap is not a function
TypeError: input.mergeMap is not a function
at Object.callRule (/home/nils/Documents/DEV2017A/angular5-heroes/node_modules/@angular-devkit/schematics/src/rules/call.js:70:18)
at SchematicImpl.call (/home/nils/Documents/DEV2017A/angular5-heroes/node_modules/@angular-devkit/schematics/src/engine/schematic.js:35:23)
at Promise (/home/nils/Documents/DEV2017A/angular5-heroes/node_modules/@angular/cli/tasks/schematic-run.js:73:23)
at Promise ()
at Class.run (/home/nils/Documents/DEV2017A/angular5-heroes/node_modules/@angular/cli/tasks/schematic-run.js:72:16)
at Class.run (/home/nils/Documents/DEV2017A/angular5-heroes/node_modules/@angular/cli/commands/generate.js:152:33)
at resolve (/home/nils/Documents/DEV2017A/angular5-heroes/node_modules/@angular/cli/ember-cli/lib/models/command.js:261:20)
at Promise ()
at Class.validateAndRun (/home/nils/Documents/DEV2017A/angular5-heroes/node_modules/@angular/cli/ember-cli/lib/models/command.js:240:12)
at Promise.resolve.then.then (/home/nils/Documents/DEV2017A/angular5-heroes/node_modules/@angular/cli/ember-cli/lib/cli/cli.js:140:24)
/ \ _ __ __ _ _ | | __ _ _ __ / | | | |
/ △ \ | ' \ / _
| | | | |/ _| '| | | | | | |/ ___ | | | | (| | || | | (| | | | || | | |
// __| ||_, |_,||_,|| _|||
|___/
Angular CLI: 1.6.0
Node: 8.3.0
OS: linux x64
Angular: 5.1.0
... animations, common, compiler, compiler-cli, core, forms
... http, platform-browser, platform-browser-dynamic
... platform-server, router
@angular/cli: 1.6.0
@angular/language-service: 4.4.6
@angular-devkit/build-optimizer: 0.0.35
@angular-devkit/core: 0.0.22
@angular-devkit/schematics: 0.0.41
@ngtools/json-schema: 1.1.0
@ngtools/webpack: 1.9.0
@schematics/angular: 0.1.10
@schematics/schematics: 0.0.10
typescript: 2.4.2
webpack: 3.10.0
joseques commentedon Dec 7, 2017
It seems that if you have
@angular/cliinstalled globally and a different version installed locally it gets broken.I solved the same error removing the cli package that was installed locally with
npm remove @angular/cli --savein my project folder.bingika commentedon Dec 8, 2017
same error Your global Angular CLI version (1.6.0) is greater than your local
version (1.4.9). The local Angular CLI version is used.
To disable this warning use "ng set --global warnings.versionMismatch=false".
input.mergeMap is not a function
TypeError: input.mergeMap is not a function
the-ult commentedon Dec 8, 2017
Both my global and local version are the same.
But.... uninstalling the local (project) cli works. 👍
[edit]
The other way around => uninstall global and install local project CLI results in the same error.
So it seems to be a problem with the local (project) cli
oldlie commentedon Dec 8, 2017
Removing local @angular/cli can resolve this issue, but globally CLI can't add automatically the references to the related local ts files.
19 remaining items
belemlc commentedon Dec 22, 2017
rm package-lock.json
npm install @angular-devkit/schematics@0.0.34 --save-devworked for me!
sanjaynegi commentedon Dec 24, 2017
npm i @angular-devkit/schematics@0.0.40
npm install --save-dev @angular/cli@latest
running these two worked for me..
oldlie commentedon Dec 25, 2017
把项目的angular版本更新到5.0.0可以彻底解决这个问题。
fix: angular-cli generate command
simeyla commentedon Jan 1, 2018
Can someone explain WHY
npm install @angular-devkit/schematics@0.0.34 --save-devfixes it?And also why schematics isn't in my package.json file after running this - yes it does work?
simeyla commentedon Jan 1, 2018
CLI isn't compatible with typescript 2.6 or above - so run this.
npm install typescript@'>=2.4.2 <2.6.0Changing schematics worked for me too but then I get another error saying it needed 0.0.42. So I installed 0.0.42 and then typescript 2.5 and it worked again
salmankazmi commentedon Jan 4, 2018
@joseques Thanks. uninstalling the local angular CLI worked.
balajidharma commentedon Jan 6, 2018
installed latest one and working fine
npm install @angular-devkit/schematics --save-devbolajipemipo commentedon Jan 9, 2018
@BenevidesLecontes got
You seem to not be depending on "@angular/core. This is an error.' after successfully creating a component. This was after I rannpm install @angular-devkit/schematics --save-devmohammedshoib commentedon Mar 22, 2018
I too had the same problem, it worked after I removed cli from the local project.
npm remove @angular/cli --save
filipesilva commentedon Oct 8, 2019
Thanks for reporting this issue. This issue was originally reported a long time ago and since then we've had many releases, one of which might have addressed this problem. Please update to the most recent Angular CLI version.
If the problem persists after upgrading, please open a new issue, provide a simple repository reproducing the problem, and describe the difference between the expected and current behavior.
angular-automatic-lock-bot commentedon Nov 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.