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

Please provide us with the following information:

OS?

Windows 7, 8 or 10. Linux (which distribution). Mac OSX (Yosemite? El Capitan?)

Mac OsX 10.11.6

Versions.

Please run ng --version. If there’s nothing outputted, please run in a Terminal: node --version and paste the result here:

ng --version gives this error: Cannot find module ‘@angular/tsc-wrapped/src/tsc’

Repro steps.

Was this an app that wasn’t created using the CLI? What change did you do on your code? etc.

Mention any other details that might be useful.

Followed the tutorial to update cli. Now it is broken on all ng commands…


Thanks! We’ll be in touch soon.

About this issue

  • Original URL
  • State: closed
  • Created 8 years ago
  • Comments: 31 (1 by maintainers)

Most upvoted comments

@iaashish i was facing issue - tried following and it worked reinstalled npm to latest version npm uninstall -g angular-cli npm cache clean npm install -g angular-cli@latest

npm install @angular/tsc-wrapped autoprefixer

Doing “npm install @angular/tsc-wrapped autoprefixer” as @snagar78 said fixed the issue 😃

I had the same kind of problem using CircleCI. Tried a few different things. I got it to work eventually by installing the missing dependencies by hand in circle.yml. It’s odd that this works without any problems on my Mac.

I don’t have the time to research this more, but my feeling is that something isn’t correctly installed on some systems. Apparently the @angular/tsc-wrapped and autoprefixer are not installed when npm install is run. Doing this manually before building fixes this.

  pre:
    - npm install -g angular-cli
    - npm install @angular/tsc-wrapped autoprefixer

Maybe someone with some more in-depth knowledge can look into this? I assume this is isolated to angular-cli, not a general problem with angular or tools involved.

same problem here, same error on Windows 10, Node: v4.6.1

FIXED: fixed updating npm using: npm install npm@latest -g

Same here 😦 None of these solutions worked for me…

Sorry for the late reaction. tx @JimTheMan

for me the “npm install @angular/tsc-wrapped autoprefixer” part worked, i quess because II did a lot of things, you know how it works…, thus I’m not sure …

Try this: npm install npm@latest -g npm uninstall -g angular-cli npm cache clean npm install -g angular-cli@latest and then: npm install @angular/tsc-wrapped autoprefixer

worked for me.

Huzzah!

I was running npm update, but it was not actually updating npm. hehe. I was on npm version 2.15.9, and I need to run this to really update: sudo npm install -g npm

Now npm -v returns 4.0.3, and it works!

BTW- after updating npm I also had to delete the node_modules folder and rerun npm i

Hope this works for you too @jvdboom 😃

Its not working for me node version : 6.4.0 npm version : 4.0.2

Error: Cannot find module ‘@angular/tsc-wrapped/src/tsc’ Error: Cannot find module ‘@angular/tsc-wrapped/src/tsc’ at Function.Module._resolveFilename (module.js:455:15) at Function.Module._load (module.js:403:25) at Module.require (module.js:483:17) at require (internal/module.js:20:19) at Object.<anonymous> (/home/tauqeer/.nvm/versions/node/v6.4.0/lib/node_modules/angular-cli/node_modules/@ngtools/webpack/src/plugin.js:7:13) at Module._compile (module.js:556:32) at Object.Module._extensions…js (module.js:565:10) at Module.load (module.js:473:32) at tryModuleLoad (module.js:432:12) at Function.Module._load (module.js:424:3) at Module.require (module.js:483:17) at require (internal/module.js:20:19) at Object.<anonymous> (/home/tauqeer/.nvm/versions/node/v6.4.0/lib/node_modules/angular-cli/node_modules/@ngtools/webpack/src/index.js:6:10) at Module._compile (module.js:556:32) at Object.Module._extensions…js (module.js:565:10) at Module.load (module.js:473:32) at tryModuleLoad (module.js:432:12) at Function.Module._load (module.js:424:3) at Module.require (module.js:483:17) at require (internal/module.js:20:19) at Object.<anonymous> (/home/tauqeer/.nvm/versions/node/v6.4.0/lib/node_modules/angular-cli/models/webpack-build-typescript.js:5:17) at Module._compile (module.js:556:32) at Object.Module._extensions…js (module.js:565:10) at Module.load (module.js:473:32) at tryModuleLoad (module.js:432:12) at Function.Module._load (module.js:424:3) at Module.require (module.js:483:17) at require (internal/module.js:20:19) at Object.<anonymous> (/home/tauqeer/.nvm/versions/node/v6.4.0/lib/node_modules/angular-cli/models/webpack-config.js:2:34) at Module._compile (module.js:556:32) at Object.Module._extensions…js (module.js:565:10) at Module.load (module.js:473:32) at tryModuleLoad (module.js:432:12) at Function.Module._load (module.js:424:3) at Module.require (module.js:483:17) at require (internal/module.js:20:19) at Object.<anonymous> (/home/tauqeer/.nvm/versions/node/v6.4.0/lib/node_modules/angular-cli/tasks/build-webpack.js:6:24) at Module._compile (module.js:556:32) at Object.Module._extensions…js (module.js:565:10) at Module.load (module.js:473:32) at tryModuleLoad (module.js:432:12) at Function.Module._load (module.js:424:3) at Module.require (module.js:483:17) at require (internal/module.js:20:19) at Object.<anonymous> (/home/tauqeer/.nvm/versions/node/v6.4.0/lib/node_modules/angular-cli/commands/build.js:3:23) at Module._compile (module.js:556:32) at Object.Module._extensions…js (module.js:565:10) at Module.load (module.js:473:32) at tryModuleLoad (module.js:432:12) at Function.Module._load (module.js:424:3) at Module.require (module.js:483:17) at require (internal/module.js:20:19) at Class.module.exports.includedCommands (/home/tauqeer/.nvm/versions/node/v6.4.0/lib/node_modules/angular-cli/addon/index.js:21:16) at /home/tauqeer/.nvm/versions/node/v6.4.0/lib/node_modules/angular-cli/angular-cli/lib/models/project.js:392:61 at Array.forEach (native) at Project.addonCommands (/home/tauqeer/.nvm/versions/node/v6.4.0/lib/node_modules/angular-cli/angular-cli/lib/models/project.js:391:15) at Project.eachAddonCommand (/home/tauqeer/.nvm/versions/node/v6.4.0/lib/node_modules/angular-cli/angular-cli/lib/models/project.js:426:30) at module.exports (/home/tauqeer/.nvm/versions/node/v6.4.0/lib/node_modules/angular-cli/angular-cli/lib/cli/lookup-command.js:33:13) at CLI.<anonymous> (/home/tauqeer/.nvm/versions/node/v6.4.0/lib/node_modules/angular-cli/angular-cli/lib/cli/cli.js:34:26) at tryCatch (/home/tauqeer/.nvm/versions/node/v6.4.0/lib/node_modules/angular-cli/node_modules/rsvp/dist/rsvp.js:538:12) at invokeCallback (/home/tauqeer/.nvm/versions/node/v6.4.0/lib/node_modules/angular-cli/node_modules/rsvp/dist/rsvp.js:553:13) at publish (/home/tauqeer/.nvm/versions/node/v6.4.0/lib/node_modules/angular-cli/node_modules/rsvp/dist/rsvp.js:521:7) at flush (/home/tauqeer/.nvm/versions/node/v6.4.0/lib/node_modules/angular-cli/node_modules/rsvp/dist/rsvp.js:2373:5) at _combinedTickCallback (internal/process/next_tick.js:67:7) at process._tickCallback (internal/process/next_tick.js:98:9)

npm install npm@latest -g npm uninstall -g angular-cli npm cache clean npm install -g angular-cli@latest

Then followed @JimTheMan advice to delete the node_modules folder. npm install went through successfully!

@snagar78 Thanks, worked well:)

@snagar78 tried, it was working… tq

I’m having this issue using the Ionic Dashboard after i imported these packages:

import { File } from '@ionic-native/file';
import { Transfer } from '@ionic-native/transfer';
import { FilePath } from '@ionic-native/file-path';
import { Camera } from '@ionic-native/camera';

It doesn’t happen in local but when i upload to the dashboard so i can easily test my app it throws the following error;

npm info using npm@5.3.0 npm info using node@v8.2.1 npm info lifecycle Cars@0.0.1~prebuild: Cars@0.0.1 npm info lifecycle Cars@0.0.1~build: Cars@0.0.1

Cars@0.0.1 build /usr/src/app ionic-app-scripts build

module.js:487 throw err; ^

Error: Cannot find module ‘@angular/tsc-wrapped/src/tsc’ at Function.Module._resolveFilename (module.js:485:15) at Function.Module._load (module.js:437:25) at Module.require (module.js:513:17) at require (internal/module.js:11:18) at Object. (/usr/src/app/node_modules/@ionic/app-scripts/dist/aot/aot-compiler.js:7:13) at Module._compile (module.js:569:30) at Object.Module._extensions…js (module.js:580:10) at Module.load (module.js:503:32) at tryModuleLoad (module.js:466:12) at Function.Module._load (module.js:458:3) npm info lifecycle Cars@0.0.1~build: Failed to exec build script

Thanks npm install @angular/tsc-wrapped autoprefixer command will helu me

Thanks Snagar78

Your tips helped me as well 👍 dir