I just upgraded my ionic legacy app to the ionic pro platform.
Following some steps to link my existing app to the ionic pro I had to run this command :
$ git push ionic master
which triggers a new remote build. This build fails stating :
Error: Cannot find module './_rules'
Googling for this _rules doesn't get me any further.
When I run this build on my local machine
ionic build --prod
Then everything goes well..
Installation : cli packages:
@ionic/cli-utils : 1.9.2 ionic (Ionic CLI) : 3.9.2
global packages:
Cordova CLI : 6.5.0
local packages: @ionic/app-scripts : 2.1.3 Cordova Platforms : android 6.1.2 ios 4.3.1 Ionic Framework : ionic-angular 3.5.0
System:
ios-deploy : 1.9.1 ios-sim : 5.0.13 Node : v7.5.0 npm : 4.1.2 OS : macOS Sierra Xcode : Xcode 8.3.3 Build version 8E3004b
EDIT : My current app.module.ts file
https://www.dropbox.com/s/oazatwyayer9chb/app.module.ts?dl=0
Can you show me the file directory which you define for the code
Error: Cannot find module './_rules'
I think the problem is not with the code, it is with the file name and its path. This can solve your problem if you import correct file name with its path in your app.module.ts.Like: If the file is present in the same folder you can use below code