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

leaflet-geopackage build problems #89

Closed
jsuwala opened this issue Apr 7, 2017 · 3 comments
Closed

leaflet-geopackage build problems #89

jsuwala opened this issue Apr 7, 2017 · 3 comments

Comments

@jsuwala
Copy link

jsuwala commented Apr 7, 2017

Hi!

Thanks for your work on leaflet-geopackage; it's great to see this integration between leaflet and geopackage-js working.

I thought I should report two problems with your current package.json that I found when trying to compile leaflet-geopackage:

  1. the webworkify package is missing (I got the error "Error: Cannot find module 'webworkify' from '/home/user/geopackage/leaflet/node_modules/geopackage/lib/tiles/creator'")
  2. the default uglify-js installed does not support es6, so gives the error "uglifyjs failed: SyntaxError: Unexpected token: operator (>)".

A fix to the missing webworkify package is straight-forward.

And I found a fix for the uglify-js problem here: ionic-team/ionic-framework#8817 , which says you need to reference the "harmony" branch of uglify-js.

The revised package.json file that includes these two fixes is attached.

@danielbarela
Copy link
Member

I added webworkify but I cannot make the syntax error occur. What did you run to make that happen?
Thanks

@jsuwala
Copy link
Author

jsuwala commented Apr 10, 2017

I was just running npm commands:
1: npm install

"Error: Cannot find module 'webworkify' from '/home/user/geopackage/leaflet/node_modules/geopackage/lib/tiles/creator'"

2: npm install webworkify --save
3: npm run build-min

Parse error at -:20762,24 module.exports = input => { ^ SyntaxError: Unexpected token: operator (>)

I'm running Ubuntu 14.04.5 LTS, with npm version 4.0.5

@danielbarela
Copy link
Member

AH, npm 4.0.5 was the key. Added in your uglify fix and merged to master.
Thanks

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