gshigeto / ionic-environment-variables

Easy to use environment variables for Ionic3!
MIT License
276 stars 36 forks source link

Cannot find module "@app/env" #10

Closed richardshergold closed 6 years ago

richardshergold commented 6 years ago

Hi

I'm using this repo with the very latest version of Ionic i.e 3.8.0 (which runs on Angular 4.4.4)

I can run the app in dev mode ok but if I run

npm run ionic:serve --prod

I get the error:

Error: Cannot find module "@app/env"
    at Object.639 (http://localhost:8100/build/main.js:9289:7)
    at __webpack_require__ (http://localhost:8100/build/vendor.js:55:30)
    at Object.577 (http://localhost:8100/build/main.js:9196:70)
    at __webpack_require__ (http://localhost:8100/build/vendor.js:55:30)
    at webpackJsonpCallback (http://localhost:8100/build/vendor.js:26:23)
    at http://localhost:8100/build/main.js:1:1

Ionic CLI version is 3.15.2

app-scripts version is 3.0.1

Am I doing something wrong?

richardshergold commented 6 years ago

Sorry - missed the bit in the readme about using prod and opening index.html - closing this.