Parse-dashboard: Issue with Node 8 - `SyntaxError: Unexpected token ...` in browser

Created on 3 Nov 2017  路  5Comments  路  Source: parse-community/parse-dashboard

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

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

  • [x] 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.

All 5 comments

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

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

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

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

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

it's prepublish

Was this page helpful?
0 / 5 - 0 ratings