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

Cryptic exception when there is an error in ionic.config.js (ionic2) #5293

Closed
dupski opened this issue Feb 2, 2016 · 4 comments
Closed

Cryptic exception when there is an error in ionic.config.js (ionic2) #5293

dupski opened this issue Feb 2, 2016 · 4 comments
Assignees

Comments

@dupski
Copy link

dupski commented Feb 2, 2016

Hi Guys

Would it be possible to improve the error reported when there is a syntax error in your ionic.config.js ?

The current exception doesn't reference the file at all:

$ ionic run android --live-reload

SyntaxError: Unexpected identifier
    at exports.runInThisContext (vm.js:53:16)
    at Module._compile (module.js:414:25)
    at Object.Module._extensions..js (module.js:442:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:313:12)
    at Module.require (module.js:366:17)
    at require (module.js:385:17)
    at Object.run (/usr/lib/node_modules/ionic/lib/cli.js:131:20)
    at Object.<anonymous> (/usr/lib/node_modules/ionic/bin/ionic:13:10)
    at Module._compile (module.js:435:26)


Unexpected identifier (CLI v2.0.0-beta.17)

Your system information:

Cordova CLI: 5.4.1
Ionic Version: 2.0.0-alpha.54
Ionic CLI Version: 2.0.0-beta.17
Ionic App Lib Version: 2.0.0-beta.8
OS: Distributor ID: Ubuntu Description: Ubuntu 14.04.3 LTS 
Node Version: v4.2.4
@tlancina
Copy link
Contributor

tlancina commented Feb 2, 2016

Yeah webpack config errors are similarly unhelpful I believe, thanks for the issue, we'll be looking into this.

@tlancina
Copy link
Contributor

tlancina commented Feb 2, 2016

Digging into this a bit more, I believe this is a problem on node's end: nodejs/node#2762, nodejs/node#3411, nodejs/node#3784.

If you'd like verbose errors, it appears node v0.12 still contains the "arrow message" with helpful line number information.

Going to close this as not an Ionic issue, but feel free to comment on here if you're still having issues, thanks!

@tlancina tlancina closed this as completed Feb 2, 2016
@dupski
Copy link
Author

dupski commented Feb 3, 2016

Thanks Tim

For anyone else that comes across this issue, it is fixed in Node 4.2.5 (I am on 4.2.4), and Node 5.2.0!

Cheers

@tlancina
Copy link
Contributor

tlancina commented Feb 4, 2016

Oh awesome, thanks!

@ionitron-bot ionitron-bot bot locked and limited conversation to collaborators Sep 7, 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

3 participants