visgl / deck.gl

WebGL2 powered visualization framework
https://deck.gl
MIT License
12.28k stars 2.09k forks source link

Trips Example Won't Compile -- Unexpected token #2838

Closed ctriley closed 5 years ago

ctriley commented 5 years ago

I cloned the git repo and tried to compile the trips example. After running npm install, I got the following output:

npm WARN optional Skipping failed optional dependency /chokidar/fsevents:
npm WARN notsup Not compatible with your operating system or architecture: fsevents@1.2.7
npm WARN acorn-jsx@5.0.1 requires a peer of acorn@^6.0.0 but none was installed.
npm WARN acorn-dynamic-import@4.0.0 requires a peer of acorn@^6.0.0 but none was installed.
npm WARN trips@0.0.0 No repository field.

Running npm start I get the following error:


ERROR in ./app.js
Module build failed (from ./node_modules/buble-loader/index.js):
BubleLoaderError: 
88 :     const {viewState, controller = true, baseMap = true} = this.props;
89 : 
90 :     return (
91 :       <DeckGL
92 :         layers={this._renderLayers()}
                   ^
Unexpected token (92:14)
    at Object.module.exports (/home/connor/Documents/deck.gl/examples/website/trips/node_modules/buble-loader/index.js:24:69)
 @ multi (webpack)-dev-server/client?http://localhost:8080 (webpack)/hot/dev-server.js ./app.js app[2]

I'm on npm version 3.5.2

[Update] I was able to update npm to 6.4.1 and I installed acorn manually, then ran npm install again. I'm still getting this error.

jianhuang01 commented 5 years ago

use yarn instead of npm install

ctriley commented 5 years ago

That fixed my issue -- thanks

Pessimistress commented 5 years ago

@jianhuang01 This should be fixed after #2888 ?