Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot find module '@angular/tsc-wrapped/src/tsc' #3183

Closed
HomeboxJim opened this issue Nov 17, 2016 · 31 comments
Closed

Cannot find module '@angular/tsc-wrapped/src/tsc' #3183

HomeboxJim opened this issue Nov 17, 2016 · 31 comments

Comments

@HomeboxJim
Copy link

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.

@Fice
Copy link

Fice commented Nov 17, 2016

what does npm --versionsay? For me, updating to current npm and reinstalling angular-cli fixed the issue. It seems npm > 3.0.0is required, see: https://github.com/angular/angular-cli#prerequisites

@Jaco97
Copy link

Jaco97 commented Nov 18, 2016

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

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

@iaashish
Copy link

@Jaco97 I got the same issue tried ur fix but not working for me still showing the same issue.

@nagarsuresh
Copy link

@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

@iaashish
Copy link

@snagar78 tried, it was working... tq

@theDiverDK
Copy link

Thanks Snagar78

Your tips helped me as well 👍 dir

@CreativeAnastasia
Copy link

@snagar78 Thanks, worked well:)

@tauqeer81
Copy link

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. (/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. (/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. (/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. (/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. (/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. (/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. (/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)

@nagarsuresh
Copy link

@tauqeer81 did you try these steps?
npm install npm@latest -g
npm uninstall -g angular-cli
npm cache clean
npm install -g angular-cli@latest

and launched command prompt as administrator in windows and use sudo in mac ?

@HomeboxJim
Copy link
Author

None of these solutions worked for me...

@jvdboom
Copy link

jvdboom commented Dec 2, 2016

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 ...

@JimLynchCodes
Copy link

Someone please help... :(

@JimLynchCodes
Copy link

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 :)

@nisarahmedah
Copy link

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!

@bastibense
Copy link

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.

@filipesilva
Copy link
Contributor

Closing as this doesn't happen anymore AFAIK. The original problem was with a bad release I believe.

@bastibense I have seen installs not actually installing all the packages, but not too sure what causes it. Our bet at the moment is that on system that can build native libs, that might fail and leave the repo incomplete.

It's an issue with npm itself I think, but we're trying to reduce the number of libs that try to do native compiles. See #2522 #1782 for that kind of issue.

@ashushre
Copy link

ashushre commented Jun 7, 2017

I am also having the same problem my specifications are:
OS:windows 8
Version:npm v6.10.3

@subhadeep41
Copy link

subhadeep41 commented Jun 11, 2017

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.

@ashushre
Copy link

I have tried the above installation i m having this errors:

"This is most likely not a problem with npm itself.
In most cases you or one of your dependencies are requesting
a package version that doesn't exist."...
"Please include the following file with any support request:
D:\ionicTask\npm-debug.log"

@mumairofficial
Copy link

npm install @angular/tsc-wrapped autoprefixer

@nidhivc
Copy link

nidhivc commented Jul 25, 2017

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

@dorontal
Copy link

dorontal commented Aug 4, 2017

Same problem for me on Ubuntu Linux OS. Here's some OS, Node and npm version info:

OS: Linux 16.04
NPM: 4.2.0
Node: 7.8.0

@GabrielBB
Copy link

GabrielBB commented Oct 2, 2017

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.1prebuild: 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

@GabrielBB
Copy link

Doing "npm install @angular/tsc-wrapped autoprefixer" as @snagar78 said fixed the issue :)

@bidwej
Copy link

bidwej commented Nov 1, 2017

Thank you! Are "tsc-wrapped" and "autoprefixer" now required for using Ionic CLI? This seems odd.

@JeremyLopez
Copy link

JeremyLopez commented Nov 3, 2017

@bidwej I think it might be? My build script just started failing with the most recent update. After running that, it introduced a whole slew of additional errors

@wallaaa
Copy link

wallaaa commented Nov 7, 2017

@snagar78 Thank you, "npm install @angular/tsc-wrapped autoprefixer" worked for me as well. I had the same error when trying to build my ionic project on android.

@fdambrosio
Copy link

thanks @GabrielBB it works

@sketchthat
Copy link

@GabrielBB I was getting an error while trying to install those two packages. I had just upgraded to npm@5.5.1. I downgraded back to npm@5.4.0 and it solved the problem.

npm install npm@5.4 -g.

@Hammad6264
Copy link

Hy, I just run this command, and it's worked:
npm install --save-dev @angular/tsc-wrapped

@angular-automatic-lock-bot
Copy link

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.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 9, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests