Skip to content
This repository has been archived by the owner on Jan 14, 2022. It is now read-only.

Add platform: Invalid or unexpected token #115

Open
codi0 opened this issue Jan 6, 2020 · 2 comments
Open

Add platform: Invalid or unexpected token #115

codi0 opened this issue Jan 6, 2020 · 2 comments
Labels

Comments

@codi0
Copy link

codi0 commented Jan 6, 2020

I get the error "Invalid or unexpected token" in the CLI after installing the hostedwebapp plugin (disappears on removal), when adding any of android, ios or browser platforms to cordova.

I've tried removing the engine constraints in plugin.xml and using different platform versions (e.g. android 8.0.0 and 5.1.1), but the error is always the same and prevents any build / run commands from executing.

Unfortunately I'm not sure how to debug the plugin error on cordova. Any advice?

@fikkatra
Copy link

Ran into this issue too, running the command with '-d' (for verbose logging) indicated that the issue was the shebang
#!/usr/bin/env node
in updateConfigurationBeforePrepare.js. Downgrading to node 8 fixed it, but there should be a better way :(.

@JudahGabriel
Copy link

JudahGabriel commented Aug 3, 2020

Yes, currently the CLI and its pwabuilder-lib are stuck on an older version of Node due to 3rd party dependencies monkey-patching the Node file system APIs. We're working to fix it so that we can run on newer Node version.

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

No branches or pull requests

3 participants