angular-cli icon indicating copy to clipboard operation
angular-cli copied to clipboard

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

Open HomeboxJim opened this issue 10 years ago • 31 comments

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.

HomeboxJim avatar Nov 17 '16 20:11 HomeboxJim

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

Fice avatar Nov 17 '16 23:11 Fice

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

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

Jaco97 avatar Nov 18 '16 15:11 Jaco97

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

iaashish avatar Nov 19 '16 08:11 iaashish

@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

nagarsuresh avatar Nov 19 '16 21:11 nagarsuresh

@snagar78 tried, it was working... tq

iaashish avatar Nov 20 '16 00:11 iaashish

Thanks Snagar78

Your tips helped me as well 👍 dir

theDiverDK avatar Nov 21 '16 12:11 theDiverDK

@snagar78 Thanks, worked well:)

CreativeAnastasia avatar Nov 29 '16 08:11 CreativeAnastasia

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)

tauqeer81 avatar Nov 30 '16 12:11 tauqeer81

@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 ?

nagarsuresh avatar Dec 01 '16 20:12 nagarsuresh

None of these solutions worked for me...

HomeboxJim avatar Dec 01 '16 21:12 HomeboxJim

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

jvdboom avatar Dec 02 '16 08:12 jvdboom

Someone please help... :(

JimLynchCodes avatar Dec 02 '16 19:12 JimLynchCodes

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

JimLynchCodes avatar Dec 02 '16 19:12 JimLynchCodes

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!

nisarahmedah avatar Dec 05 '16 05:12 nisarahmedah

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.

bastibense avatar Dec 05 '16 12:12 bastibense

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 https://github.com/angular/angular-cli/issues/2522 https://github.com/angular/angular-cli/issues/1782 for that kind of issue.

filipesilva avatar Dec 29 '16 18:12 filipesilva

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

ashushre avatar Jun 07 '17 12:06 ashushre

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.

subhadeep41 avatar Jun 11 '17 18:06 subhadeep41

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"

ashushre avatar Jun 12 '17 07:06 ashushre

npm install @angular/tsc-wrapped autoprefixer

mumairofficial avatar Jun 23 '17 11:06 mumairofficial