gshigeto / ionic-environment-variables

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

Cannot find @app/env #17

Closed newuser44 closed 6 years ago

newuser44 commented 6 years ago

Not sure what I'm doing wrong. I think I have everything setup as the instructions say.

In a service I have import { ENV } from '@app/env'; Get the error Cannot find module '@app/env'.

I put in the value in the constructor constructor(private http: HttpClient, private env: ENV) { this.baseUrl = env.wsUrl + this.baseUrl; }

Trying to build the android app.

[16:28:00] typescript: src/services/user.service.ts, line: 18 Cannot find name 'ENV'.

  L17:  constructor(private http: HttpClient,
  L18:              private env: ENV) {
  L19:                  this.baseUrl = env.wsUrl + this.baseUrl;

Not sure why it doesn't know what app/env is.

newuser44 commented 6 years ago

After doing a build the error shifted to the ENV in the constructor. It didn't like it there. Also didn't need it. just doing ENV.wsUrl worked fine. Everything works.

gshigeto commented 6 years ago

If everything is working as expected, I am going to close this issue. Thanks!