Skip to content

Issue with Node 8 - SyntaxError: Unexpected token ... in browser #804

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

Closed
3 tasks done
gianpaj opened this issue Nov 3, 2017 · 5 comments
Closed
3 tasks done

Issue with Node 8 - SyntaxError: Unexpected token ... in browser #804

gianpaj opened this issue Nov 3, 2017 · 5 comments

Comments

@gianpaj
Copy link

gianpaj commented Nov 3, 2017

  • You're running version >=1.1.2 of Parse Dashboard.

  • You're running version >=2.6.5 of Parse Server (using docker image from Docker hub)

  • You've searched through existing issues. Chances are that your issue has been reported or resolved before.

Environment Setup

Using latest LTS Node release.

node --version
v8.9.0

npm --version
5.5.1

Steps to reproduce

Using the latest git repo from master or downloading from npm as global cli:

$ npm start

> [email protected] start /Users/gianfranco/temp/parse-dashboard
> node ./Parse-Dashboard/index.js

Iconsfolder at path: /Users/gianfranco/temp/parse-dashboard/Parse-Dashboard/icons not found!
The dashboard is now available at http://0.0.0.0:4040/
$ parse-dashboard --appId snowflake --masterKey Master --serverURL "http://localhost:1337/parse" --appName optionalName
The dashboard is now available at http://0.0.0.0:4040/

Logs/Trace

In the browser Dev console you get:

Uncaught SyntaxError: Unexpected token <

Looks like the JS bundle is returning an HTML webpage <script src="/bundles/dashboard.bundle.js"></script> instead of the JS file.

@flovilmart
Copy link
Contributor

Can you run npm run build and check if there are any errors?

@gianpaj
Copy link
Author

gianpaj commented Nov 3, 2017

That worked! Not sure if I messed up the packages installation while switching Node versions or misunderstood the build/installation process.

@flovilmart
Copy link
Contributor

yep that's odd, build should have been run part of npm install but perhaps it's not run on node 8.

@gianpaj
Copy link
Author

gianpaj commented Nov 3, 2017

I don't see any postinstall script in the package.json.

https://docs.npmjs.com/misc/scripts

@flovilmart
Copy link
Contributor

it's prepublish

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

No branches or pull requests

2 participants