Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build vs Serve #10245

Closed
awebdeveloper opened this issue Jan 30, 2017 · 2 comments
Closed

Build vs Serve #10245

awebdeveloper opened this issue Jan 30, 2017 · 2 comments

Comments

@awebdeveloper
Copy link

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

@jgw96
Copy link
Contributor

jgw96 commented Jan 30, 2017

This issue was moved to ionic-team/ionic-app-scripts#698

@ionitron-bot
Copy link

ionitron-bot bot commented Sep 4, 2018

Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Ionic, please create a new issue and ensure the template is fully filled out.

@ionitron-bot ionitron-bot bot locked and limited conversation to collaborators Sep 4, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants