Ionic 3 - CLI Generate does not make the module file

Asked

Viewed 138 times

1

Hello! When I use the command "Ionic g page Example", the same creates only three files, instead of 4.

-exemplo.html
-exemplo.scss
-exemplo.ts

But I believe I need the example.modulets. because I’m getting the following modal error: Uncaught (in Promise) error: invalid link: parentName.

  • It appears they have taken https://github.com/ionic-team/ionic/pull/12347 out. Since all the pages of my project were already using the module.ts I create a new one every time I make a new page. I don’t know why they took it

1 answer

0

Apparently this was removed from Ionic temporarily. There is a solution for you to use this creation behavior of .module ts..

To re-create the file you have the possibility to downgrade the scripts of the app. For this do as follows:

  • Open the file "package json." of your project. It is at the root of the Ionic project.
  • Within it, seek the property "devDependencies" json and change the "@ionic/app-scripts": "2.0.2" leaving with the version "@ionic/app-scripts": "1.3.7".
  • Delete the "node_modules" folder of the project.
  • Execute the command npm install.
  • After running the command to generate the new Page the .module.ts will be created inside the folder along with the other files.

Obs: This procedure is to use a previous version of scripts where the creation of the modules was still running. In the new version "2.0.2" this option is not working. It is then up to you to use this step by step.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.