Quantcast
Channel: Ionic Forum - Latest topics
Viewing all articles
Browse latest Browse all 71531

Cannot find module '../../environments/environment' or its corresponding type declarations

$
0
0

I just used the wizard to build out an Capacitor type app, when following the details provided:

npm install -g @ionic/cli @capacitor/assets
git clone https://gitlab.com/space/project.git repo
cd project && npm install && ionic serve.

when I run the ionic serve (which I assume conducts a Ionic Build command) I get the following

./src/app/services/authentication.service.ts:6:0-84 - Error: Module not found: Error: Can't resolve '../../environments/environment' in '/Users/name/workspace/mobile/project/src/app/services'

./src/main.ts:4:0-57 - Error: Module not found: Error: Can't resolve './environments/environment' in '/Users/name/workspace/mobile/project/src'

Error: src/app/services/authentication.service.ts:8:8 - error TS2307: Cannot find module '../../environments/environment' or its corresponding type declarations.

8 } from '../../environments/environment';
         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


Error: src/main.ts:5:29 - error TS2307: Cannot find module './environments/environment' or its corresponding type declarations.

5 import { environment } from './environments/environment';
                              ~~~~~~~~~~~~~~~~~~~~~~~~~~~~



[ERROR] An error occurred while running subprocess ng.

        ng run app:build --verbose exited with exit code 1.

If I navigate to the localhost - I get a:

Cannot GET /

I am not sure if there is something missing in the start up documentation that requires me to set a environment flag or I have not accounted for something on my side?

1 post - 1 participant

Read full topic


Viewing all articles
Browse latest Browse all 71531

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>