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

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 

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Reactions: 6
  • Comments: 19 (5 by maintainers)

Most upvoted comments

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

Downgrade npm npm install -g npm@5.1.0

Updating npm to 5.3.0 resolves the issue out of the box! 👍

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 post@alokraj68.in / 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 .

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

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 ?

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