Error Cannot find module "@app/env"


I’m using CML command: ionic serve

The project was developed for people wich are not here so we must get by … :frowning:

ojalá pudiesemos lanzar la app en el browser o en el dispositivo porque eso nos ayudaría a avanzar.

Si todo nos fuese bien y la experiencia no fuese muy traumática, teniamos pensado aprender bien y comenzar nuevos desarrollos en IONIC (hasta ahora usabamos angular + cordova sólo)

Por favor, cualquier dato que veais me falte enviar para ayudar a determinar el problema pedidmelo, ahora estamos un poco perdidos y llevamso dos día intentando lanzar el proyecto en android o el browser.

This is de STACK TRACE of the error in the browser:

Error: Cannot find module “@app/env”
at Object.523 (http://localhost:8100/build/main.js:7000:7)
at webpack_require (http://localhost:8100/build/vendor.js:55:30)
at Object.472 (http://localhost:8100/build/main.js:6692:74)
at webpack_require (http://localhost:8100/build/vendor.js:55:30)
at Object.467 (http://localhost:8100/build/main.js:6654: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

This is data about the project:

Ionic Framework: 3.7.1
Ionic App Scripts: 3.0.0
Angular Core: 4.4.3
Angular Compiler CLI: 4.4.3
Node: 8.11.1
OS Platform: Windows 10
Navigator Platform: Win32
User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.87 Safari/537.36

This IONIC project is not mine and it is IONIC 3 so I’m little lost so I appreciate any clue. I’ve been stuck in this for two days.

We have no contact with the one who developed the project for us and we wanted to take advantage of it to start programming using IONIC. Until now we used only cordova. But first we need to start this project. The same error is obtained if we try to boot on the BROWSER or ANDROID platform

IONIC error when execute in my IONIC project (for run in the browser):

ionic server

Cannot find module "@app/env"
at Object.521 (http://localhost:8100/build/main.js:6800:7)
at __webpack_require__ (http://localhost:8100/build/vendor.js:55:30)
at Object.471 (http://localhost:8100/build/main.js:6492:74)
at __webpack_require__ (http://localhost:8100/build/vendor.js:55:30)
at Object.466 (http://localhost:8100/build/main.js:6454: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

Data about my IONIC proyect

Ionic Framework: 3.9.2
Ionic App Scripts: 3.1.10
Angular Core: 4.4.3
Angular Compiler CLI: 4.4.3
Node: 8.11.1
OS Platform: Windows 10
Navigator Platform: Win32
User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.87 Safari/537.36

if I run this CLI :

ionic doctor list

This is the output:

automatic-updates-off npm-installed-locally ionic-installed-locally git-not-used git-config-invalid ionic-angular-update-available ionic-angular-major-update-available app-scripts-update-available app-scripts-major-update-available ionic-native-old-version-installed ionic-native-update-available ionic-native-major-update-available unsaved-cordova-platforms cordova-platforms-committed default-cordova-bundle-id-used viewport-fit-not-set

Do you think I must run?

ionic doctor check




Thank you very much for your post.
Right now I’m going to study it and see if it helps me, because I’m still with the problem and I did not know what else to do.


Thank you very much for your clue. I’ve been quite busy understanding this about the environment in IONIC 3 and I managed to see the project in chrome running ‘ionic cordova run browser’ . I already have more hopes of getting run on an android device

When I try run in android I have errors in plugins. So updated some of them.

It has been a nightmare, because some were changes and adjustments punctual codes in some plugins, patches to dfueran well in IONIC 3

Only one doubt about IONIC
In browser platforms poject still have some problems now only with a plugin caller InAppBrowser

As far I can see in package.json I have this in dependencies:
@ionic-native/in-app-browser": "file:./custom_node_modules/@ionic-native-in-app-browser”,

and this line generate in my config.xml this tag:

in root of the project I have a folder called ‘custom_node_modules’ wich contain a folder inside with this name: ‘@ionic-native-in-app-browser

And in root of the project I have this other folder too called: ‘custom_plugins

wich have this other folder: ‘cordova-plugin-inappbrowser’ inside it.

All the other plugins of this INONIC - CORDOVA app are inside the folder called : ‘plugins’ in the root of the proyect.

So the only one plugin that is different is the plugin InAppBrowser

Why is InAppBrowser using this way of adding to the project.

You would help me a lot if you could send me a link to some page documenting this and explain why they use this way this plugin. It looks like it’s a version of InAppBrowser customized, is’t it?

I would like to know where the difference could be with directly including the plugin InAppBrowser like the other plugins, directly from the repository. I do not understand very well why this way to include the plugin and how to see the difference in use.

Could development work badly if I use the plugin directly from the repository?

Where could I notice the difference added to the this customized InAppBrowser to understand better the why of its use thsi way in this prioject?

Thanks in advance for your help on this.