Ionic-cli: Broken cli on 3.5.0, "Error: Cannot find module '@angular/tsc-wrapped/src/tsc'"

Created on 12 Jul 2017  Â·  19Comments  Â·  Source: ionic-team/ionic-cli

Description:
After upgrading to ionic-cli 3.5.0 witch also updates @ionic/cli-plugin-cordova to 1.4.1 and @ionic/cli-plugin-ionic-angular to 1.3.2 on ionic serve we get this error:

Error: Cannot find module '@angular/tsc-wrapped/src/tsc'

The problem is @angular/tsc-wrapped is not a dependencies of ionic-cli or plugins neither ionic-angular. Only @ionic/app-scripts has a devDependencies for it.

So the cli for now is broken, my workaround for now is to insert @angular/tsc-wrapped into project package.json

Steps to Reproduce:
Do a simple ionic start and create a new empty project on ionic serve you'll see the bug.

My ionic info:

global packages:
    @ionic/cli-utils : 1.5.0
    Ionic CLI        : 3.5.0

local packages:
    @ionic/app-scripts              : 2.0.1
    @ionic/cli-plugin-ionic-angular : 1.3.2
    Ionic Framework                 : ionic-angular 3.5.0

System:
    Node       : v6.11.0
    OS         : Linux 4.10
    Xcode      : not installed
    ios-deploy : not installed
    ios-sim    : not installed
    npm        : 5.2.0 

Most helpful comment

This is a problem with npm 5.2.0.
https://github.com/npm/npm/issues/17717#issuecomment-314599834

Downgrade npm
npm install -g [email protected]

All 19 comments

This is a problem with npm 5.2.0.
https://github.com/npm/npm/issues/17717#issuecomment-314599834

Downgrade npm
npm install -g [email protected]

Would you like to give a try to:

rm package-lock.json
rm -r node_modules
npm install

just saying that because I don't face this error. my info:

global packages:

@ionic/cli-utils : 1.5.0
Cordova CLI      : 7.0.1 
Gulp CLI         : CLI version 1.2.2 Local version 3.9.1
Ionic CLI        : 3.5.0

local packages:

@ionic/app-scripts              : 2.0.1
@ionic/cli-plugin-cordova       : 1.4.1
@ionic/cli-plugin-gulp          : 1.0.2
@ionic/cli-plugin-ionic-angular : 1.3.2
Cordova Platforms               : android 6.2.3 ios 4.4.0
Ionic Framework                 : ionic-angular 3.5.0

System:

Node       : v8.1.3
OS         : macOS Sierra
Xcode      : Xcode 8.3.3 Build version 8E3004b 
ios-deploy : 1.9.0 
ios-sim    : 5.0.13 
npm        : 5.2.0

Same error
````
global packages:

@ionic/cli-utils : 1.5.0
Cordova CLI      : 7.0.1
Ionic CLI        : 3.5.0

local packages:

@ionic/app-scripts              : 2.0.1
@ionic/cli-plugin-cordova       : 1.4.1
@ionic/cli-plugin-ionic-angular : 1.3.2
Cordova Platforms               : android 6.2.3
Ionic Framework                 : ionic-angular 3.5.0

System:

Node       : v6.11.0
OS         : Windows 10
Xcode      : not installed
ios-deploy : not installed
ios-sim    : not installed
npm        : 5.2.0

````

@tja4472 :(

So I guess you don't find any references to "@angular/tsc-wrapped"in your package-lock.json?

I do that's maybe the reason why I don't face the error

This happends with many, many modules after the update 'cannot find 'os-name', or 'request', etc...

The latest update create a real issue i'm afraid...

Any solution yet ?

Hello all! Are you all on npm 5.2.0? After some debugging this morning we discovered that this issue https://github.com/npm/npm/issues/17717#issuecomment-314599834 is causing all kinds of issues when starting new Ionic projects. The fix for me was to downgrade to npm 5.1.0, delete my node_modules and lock file and then do a fresh npm install.

also using yarn instead for npm for all my ionic 3 projects seem to work.

Updating npm to 5.3.0 resolves the issue out of the box! :+1:

@mburger81 having 5.30 still having the issue.

@tja4472 downgrading also did not help

I had to completely remove NodeJS, NPM, Cordova and Ionic CLI and reinstall from scratch for the second time to fix this.

Now i'm constantly afraid when the Ionic CLI warns me about updates since this is the second time it happened.

So here is the quick fix that actually works ;-) : I painted my keyboard n key in RED to be sure to answer "no" to anything the CLI asks.

What about you guys ? Anybody figured out what broke ?

Having this issue for a pretty long time now. ionic i have started to hate
you.

Thanks and Regards,

[image: Astro-Vision Future Tech] https://htmlsig.com/t/000001C1E7PD

Alok Rajasukumaran / Developer - Innovation Team
[email protected] / 00919995607654

Astro-Vision Future Tech
Kuthappadi, Thamannam, ErnakulamKerala, India - 682032
alokraj68.in

[image: Twitter] https://htmlsig.com/t/000001BVYZJE [image: Facebook]
https://htmlsig.com/t/000001BX9HG8 [image: Google +]
https://htmlsig.com/t/000001BV7H1J [image: LinkedIn]
https://htmlsig.com/t/000001C065D9 [image: Youtube]
https://htmlsig.com/t/000001C06RDJ [image: Github]
https://htmlsig.com/t/000001BYKTTT [image: Soundcloud]
https://htmlsig.com/t/000001BX996X [image: Stack Overflow]
https://htmlsig.com/t/000001BVE8RR

On 3 August 2017 at 17:50, Romain Bruckert notifications@github.com wrote:

I had to completely remove NodeJS, NPM, Cordova and Ionic CLI for the
second time to make it back on tracks.

Now i'm constantly afraid when the Ionic CLI warns me about updates since
this is the second time it happened.

So here is the quick fix that actually works ;-) : I painted my keyboard n
key in RED to be sure to answer "no" to anything the CLI asks.

What about you guys ? Anybody figured out what broke ?

—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/ionic-team/ionic-cli/issues/2512#issuecomment-319953016,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AIyDm0NiD0jkU1Kod8Y9xb0aIChwUw8zks5sUbr6gaJpZM4OVKje
.

@alokraj68 This is just a result of a wonky node_modules.

Do this: rm -rf node_modules; rm package-lock.json; npm install

@dwieeb no luck. tried that

And you're using npm 5.3? How about try just installing the module? npm install --save-dev @angular/tsc-wrapped?

@dwieeb am using npm 5.1.0 Should I upgrade?

@dwieeb upgraded to 5.3 and did the command now

Error: Cannot find module '@angular/compiler-cli'

Will install it now,

Ended up here after installing a lot of dependencies.

Error: Cannot find module 'rxjs/observable/merge'

after many tries it got installed with

npm install --save-dev rxjs

Was this page helpful?
0 / 5 - 0 ratings

Related issues

phyr0s picture phyr0s  Â·  3Comments

chsakell picture chsakell  Â·  3Comments

richardshergold picture richardshergold  Â·  3Comments

patwaswapnil picture patwaswapnil  Â·  3Comments

jgw96 picture jgw96  Â·  3Comments