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

bug: ionic generate page seems to not work with angular cli 10 #274

Closed
pooriaPoorsarvi opened this issue Aug 22, 2020 · 11 comments · Fixed by #275
Closed

bug: ionic generate page seems to not work with angular cli 10 #274

pooriaPoorsarvi opened this issue Aug 22, 2020 · 11 comments · Fixed by #275
Labels

Comments

@pooriaPoorsarvi
Copy link

Bug Report

Ionic CLI : 6.11.1 (#)
Ionic Framework : @ionic/angular 5.3.1
@angular-devkit/build-angular : 0.1000.7
@angular-devkit/schematics : 10.0.7
@angular/cli : 10.0.7
@ionic/angular-toolkit : 2.3.2

Capacitor:

Capacitor CLI : 2.4.0
@capacitor/core : 2.4.0

Utility:

cordova-res : not installed
native-run : not installed

System:

NodeJS : v10.16.3 (#)
npm : 6.14.8
OS : Windows 10

When trying to run ionic g page home/examples (from the root directory of the project so ".../wrong/") I get the following error :
Could not find an NgModule. Use the skip-import option to skip importing in NgModule.
[ERROR] Could not generate page.

The project is basically a blank project created by ionic start but just to be sure I have uploaded the project so that you can clone it for reproducibility: https://github.com/pooriaPoorsarvi/wrong

I think this may be an issue with the new Angular/Cli but since I was not sure and could not find anything on the internet about a problem with this specific version of angular and ionic I made the issue here.

Thank you for your time.

@JiaYee
Copy link

JiaYee commented Aug 22, 2020

Same here

1 similar comment
@antoniodipinto
Copy link

Same here

@fjgallard
Copy link

Funny, I have two ionic projects, one created yesterday, and another today - both using Angular 10.

The one created yesterday I could still use ionic g page properly, while on the newer one today, I couldn't.

@ghost
Copy link

ghost commented Aug 22, 2020

Im facing the same issue!

@hgsantana
Copy link

Same here. Can't generate pages. Fresh start with
ionic start stuff tabs
cd stuff
ionic g page things
Could not find an NgModule. Use the skip-import option to skip importing in NgModule. [ERROR] Could not generate page.

@indraraj26
Copy link

just rollback to 2.3.0 to resolve
npm i @ionic/angular-toolkit@2.3.0 --save-dev

@hgsantana
Copy link

hgsantana commented Aug 22, 2020

Did, so I can create pages automatically again... Yet, running npm audit:

Run npm install --save-dev @ionic/angular-toolkit@2.3.2 to resolve 1 vulnerability

High Remote Code Execution

Package serialize-javascript

Dependency of @ionic/angular-toolkit [dev]

Path @ionic/angular-toolkit > copy-webpack-plugin >
serialize-javascript

More info https://npmjs.com/advisories/1548

Since it comes from serialize-javascript, I ran npm i -D serialize-javascript. But it gives me the warning anyway.

@lechediaz
Copy link

just rollback to 2.3.0 to resolve
npm i @ionic/angular-toolkit@2.3.0 --save-dev

This works for me. Thank you.

@AlexanderPalencia
Copy link

Same here.

@liamdebeasi
Copy link
Contributor

This seems to be related to https://github.com/ionic-team/angular-toolkit, so I am going to move this issue over there. Thank you!

@liamdebeasi liamdebeasi transferred this issue from ionic-team/ionic-framework Aug 24, 2020
mhartington added a commit that referenced this issue Aug 24, 2020
make sure path builder sets the options correctly

Closes #274
mhartington added a commit that referenced this issue Aug 24, 2020
make sure path builder sets the options correctly

Closes #274
Ionitron added a commit that referenced this issue Aug 24, 2020
## [2.3.3](v2.3.2...v2.3.3) (2020-08-24)

### Bug Fixes

* **generators:** update path builder ([#275](#275)) ([1393e8c](1393e8c)), closes [#274](#274)
@Ionitron
Copy link
Collaborator

🎉 This issue has been resolved in version 2.3.3 🎉

The release is available on:

Your semantic-release bot 📦🚀

wand1252 added a commit to wand1252/angular-toolkit-develop that referenced this issue Aug 31, 2022
## [2.3.3](ionic-team/angular-toolkit@v2.3.2...v2.3.3) (2020-08-24)

### Bug Fixes

* **generators:** update path builder ([#275](ionic-team/angular-toolkit#275)) ([1393e8c](ionic-team/angular-toolkit@1393e8c)), closes [#274](ionic-team/angular-toolkit#274)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

10 participants