Open Alifarmand opened 7 years ago
I have too (run ionic serve error cannot find '\node_modules\@ionic\app-scripts')
I dont know what's wrong
I find it, checkout branch master(I am in branch typescript before)
it doesn't matter which branch I try from. All of the were working before.
I uninstalled current ionic version and installed an earlier version which had release date around the same time I had the first push to bitbucket. I installed the angular-cli and now it's working.
@Alifarmand you mean you had wrong ionic version?you have install ionic before the project?
@jun58 The project was built last year where Ionic version 2 was newly released. When I wanted to run the project now, I just ran
npm install -g ionic cordova
Therefor it installed the Ionic v3.12.0, which was not working with my project.
sudo npm uninstall -g ionic
npm install -g ionic@2
That solved the issue and I also had to install angular-cli globally to have all the modules.
@Alifarmand ok,I understand
@Alifarmand @jun58 Please do not use the legacy CLI.
The error is that @ionic/app-scripts
is missing. You must install it into your project:
npm install --save @ionic/app-scripts
@dwieeb as I mentioned above @ionic/app-script
is missing, and if I manually install that and save it in dependencies, I get another error that says @angular/tsc-wrapped/src/tsc
.
@Alifarmand That's a fairly common error with Angular apps, I've seen it a few times.
Here are some resources for things to try: https://github.com/ionic-team/ionic-app-scripts/issues/1252 https://github.com/ionic-team/ionic/issues/12357
Somewhere along the way, this dependency gets lost, but it isn't because of the Ionic CLI version you're using.
Im getting that similar (if not the same) error when building in the ionic cloud pro.
if you get an error with just npm install it, that fixed it for me npm install --save-dev @angular/tsc-wrapped
Conclusion: This scenario is when you want to run an application that was built with a different version of ionic. So this issues was solved!
With node you have NVM for multiple versions. Is there a way to have multiple ionic versions installed to switch between depending on the project? @dwieeb
@Alifarmand What do you mean by "ionic"? The framework, or the CLI?
@dwieeb I mean the version you get when you run npm install -g ionic
@Alifarmand What is the use case for having multiple CLI versions? The latest CLI supports all Ionic framework versions.
I have a project that I started last year, but this year I can't seem to get it up and running. It says that the ionic/app-script is missing, and if I manually install that, it says Cannot find module angular/tsc-wrapped/src/tsc, which I can't install.
However, I started the project last year around september, but currently I have the following installed:
This is the package.json from the project:
I have NVM and I have tried to run it with earlier versions of Node but without any luck. What is the issue here and how can I overcome it so I can run my project?