Please provide us with the following information:
Windows 7, 8 or 10. Linux (which distribution). Mac OSX (Yosemite? El Capitan?)
Mac OsX 10.11.6
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'
Was this an app that wasn't created using the CLI? What change did you do on your code? etc.
Followed the tutorial to update cli. Now it is broken on all ng commands...
Thanks! We'll be in touch soon.
what does npm --version
say? For me, updating to current npm and reinstalling angular-cli fixed the issue. It seems npm > 3.0.0
is required, see: https://github.com/angular/angular-cli#prerequisites
same problem here, same error on Windows 10, Node: v4.6.1
FIXED: fixed updating npm using: npm install npm@latest -g
@Jaco97 I got the same issue tried ur fix but not working for me still showing the same issue.
@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
@snagar78 tried, it was working... tq
Thanks Snagar78
Your tips helped me as well 馃憤 dir
@snagar78 Thanks, worked well:)
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.
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.
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.
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.
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.
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.
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.
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 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 ?
None of these solutions worked for me...
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 ...
Someone please help... :(
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 :)
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!
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.
dependencies:
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.
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.
I am also having the same problem my specifications are:
OS:windows 8
Version:npm v6.10.3
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.
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:ionicTasknpm-debug.log"
npm install @angular/tsc-wrapped autoprefixer
Thanks
npm install @angular/tsc-wrapped autoprefixer
command will helu me
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
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 [email protected]
npm info using [email protected]
npm info lifecycle [email protected]~prebuild: [email protected]
npm info lifecycle [email protected]~build: [email protected][email protected] build /usr/src/app
ionic-app-scripts buildmodule.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 [email protected]~build: Failed to exec build script
Doing "npm install @angular/tsc-wrapped autoprefixer" as @snagar78 said fixed the issue :)
Thank you! Are "tsc-wrapped" and "autoprefixer" now required for using Ionic CLI? This seems odd.
@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
@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.
thanks @GabrielBB it works
@GabrielBB I was getting an error while trying to install those two packages. I had just upgraded to [email protected]
. I downgraded back to [email protected]
and it solved the problem.
npm install [email protected] -g
.
Hy, I just run this command, and it's worked:
npm install --save-dev @angular/tsc-wrapped
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._
Most helpful comment
@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