Skip to content
This repository has been archived by the owner on May 1, 2020. It is now read-only.

Build vs Serve #698

Closed
jgw96 opened this issue Jan 30, 2017 · 4 comments
Closed

Build vs Serve #698

jgw96 opened this issue Jan 30, 2017 · 4 comments

Comments

@jgw96
Copy link
Contributor

jgw96 commented Jan 30, 2017

From @awebdeveloper on January 30, 2017 18:48

Ionic version: (check one with "x")
[ ] 1.x
[x ] 2.x

I'm submitting a ... (check one with "x")
[x ] bug report
[ ] feature request
[ ] support request => Please do not submit support requests here, use one of these channels: https://forum.ionicframework.com/ or http://ionicworldwide.herokuapp.com/

Current behavior:

config/config.js

const config = function() {
    return {
        api: {
            base: 'http://localhost:3000/',
        },
    };
};

module.exports.edConfig = config();

event.js

import {edConfig} from "./../config/config";

Run ionic serve everything works fine

Run ionic run android . You get a white screen with error

Cannot find module "./../config/config"

Expected behavior:

Should not throw error in one when it works fine in another

Ionic info: (run ionic info from a terminal/cmd prompt and paste output below):

Cordova CLI: 6.5.0
Ionic Framework Version: 2.0.0-rc.3-201611211919
Ionic CLI Version: 2.1.18
Ionic App Lib Version: 2.1.9
Ionic App Scripts Version: 0.0.44
ios-deploy version: 1.9.0
ios-sim version: 5.0.13
OS: OS X Yosemite
Node Version: v7.2.1
Xcode version: Xcode 7.2.1 Build version 7C1002

Copied from original issue: ionic-team/ionic-framework#10245

@danbucholtz
Copy link
Contributor

@awebdeveloper,

Can you upload a basic repository to Github demonstrating this issue?

Thanks,
Dan

@awebdeveloper
Copy link
Contributor

Let me see if I can add it to ionic conf app and see

@danbucholtz
Copy link
Contributor

Due to lack of activity, I'm going to close this issue.

Since it is environment related, please weigh in on this proposal here.
#762

Thanks,
Dan

@awebdeveloper
Copy link
Contributor

issue was due to a service worker

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants