Note: for support questions, please use one of these channels:
https://forum.ionicframework.com/
http://ionicworldwide.herokuapp.com/
If I want to use @ionic/cloud-angular as illustrated in the docs, I get the following error:
> @infarm/[email protected] ionic:serve /Users/rolandjitsu/Projects/infarm/maintenance
> ionic-app-scripts serve
keywords if/then/else require v5 option
[22:08:51] ionic-app-scripts 0.0.48
[22:08:52] watch started ...
[22:08:52] build dev started ...
[22:08:52] clean started ...
[22:08:52] clean finished in 6 ms
[22:08:52] copy started ...
[22:08:52] transpile started ...
[22:08:57] transpile finished in 4.99 s
[22:08:57] rollup started ...
[22:08:57] copy finished in 5.08 s
[22:09:04] rollup failed: Could not resolve '@ionic/cloud-angular' from
/Users/rolandjitsu/Projects/infarm/maintenance/src/app/app.module.ts
[22:09:04] dev server running: http://localhost:8100/
[22:09:04] watch ready in 12.34 s
Note the rollup failed: Could not resolve '@ionic/cloud-angular' from /Users/rolandjitsu/Projects/infarm/maintenance/src/app/app.module.ts error. I'm not quite sure why I get this. I have installed the package via npm.
I should be able to use @ionic/cloud-angular.
Steps to reproduce:
1.
2.
3.
insert any relevant code between the above and below backticks
Which @ionic/app-scripts version are you using?
Cordova CLI: 6.4.0
Ionic Framework Version: 2.0.0-rc.4
Ionic CLI Version: 2.1.18
Ionic App Lib Version: 2.1.9
Ionic App Scripts Version: 0.0.48
ios-deploy version: Not installed
ios-sim version: Not installed
OS: macOS Sierra
Node Version: v6.7.0
Xcode version: Xcode 8.2.1 Build version 8C1002
Other information: (e.g. stacktraces, related issues, suggestions how to fix, stackoverflow links, forum links, etc)
I also keep seeing this keywords if/then/else require v5 option message after a fresh npm install, I think it might be related to #3562.
Note that this only happens when I run a dev build.
As of now, with the new release of app scripts, it also fails for a production build.
+1
+1
Having same issue very annoying can't get push notifications working through that + 1
+1
Having same issue.
It works with webpack so I guess we need to go that way.
Switch to webpack
"config": {
....
"ionic_bundler": "webpack"
....
},
Same issue with Rollup !
Unfortunately switching to webpack is not really a solution. Moreover, production builds with env variables and AOT don't quite work, so at the moment I am stuck with Rollup and with this bug.
Yes, I had to abandon the environment setup in the bundling process :-(
Now I copy a environment.json file when building to the www root and the app reads it at startup.
Then DI is used to inject the environent setup. Not a perfect solution but works for me.
@jgw96,
Can you move this to the cloud repo and get a cloud dev to assigned to this?
Thanks,
Dan
@danbucholtz I just made a PR for this issue. Indeed it was not the scripts at fault, but some missing dist from the npm package. Hopefully someone will build and publish soon.