tilemill icon indicating copy to clipboard operation
tilemill copied to clipboard

`SyntaxError: Use of const in strict mode` on startup

Open salomvary opened this issue 9 years ago • 12 comments

Node version v0.10.31 Npm version 1.4.23

$ node ./index.js 

node_modules/connect/node_modules/qs/lib/index.js:5
const Stringify = require('./stringify');
^^^^^
SyntaxError: Use of const in strict mode.
    at Module._compile (module.js:439:25)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Module.require (module.js:364:17)
    at require (module.js:380:17)
    at Object.<anonymous> (node_modules/connect/lib/middleware/bodyParser.js:13:10)
    at Module._compile (module.js:456:26)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)

salomvary avatar Dec 12 '15 15:12 salomvary

Same problem. Ubuntu 14.04. nodejs v0.10.25 npm 1.3.10

./index.js --server=true                                 
/home/ben/tilemill/node_modules/connect/node_modules/qs/lib/index.js:5
const Stringify = require('./stringify');
^^^^^
SyntaxError: Use of const in strict mode.
    at Module._compile (module.js:439:25)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Module.require (module.js:364:17)
    at require (module.js:380:17)
    at Object.<anonymous> (/home/ben/tilemill/node_modules/connect/lib/middleware/bodyParser.js:13:10)
    at Module._compile (module.js:456:26)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)

benboughton1 avatar Dec 18 '15 04:12 benboughton1

Solution is install qs 5.2 After regular install: cd .../node_modules/connect npm uninstall qs npm install [email protected]

benboughton1 avatar Dec 20 '15 01:12 benboughton1

Hi folks, I forked TileMill to work with Node v4, tested on Linux Mint 17.3 and Ubuntu 16.04 Alpha: https://github.com/florianf/tileoven Most of the work was done by Paulo Viera in his fork: https://github.com/paulovieira/hapi-tilemill, maybe this works for you too!

Regards, Florian

florianf avatar Jan 31 '16 13:01 florianf

@florianf we can give you push access to this repo - it's not necessary to fork, unless you want to.

tmcw avatar Jan 31 '16 14:01 tmcw

@tmcw thank's for the offer, but I'll stick with the fork. With my limited knowledge and resources I only can support a basic use-case (Linux, server mode, no prebuild packages) - I think people expect more from an "official" TileMill project. Also a huge thank you to MapBox for all the provided OSS!

florianf avatar Jan 31 '16 16:01 florianf

@tmcw I can send a few pull requests with the necessary changes to make Tilemill work again (or give me push access and I'll send the commits).

I've been using a customized version of Tilemill in a project in my work - hapi-tilemill. It would be a good way to contribute back. I had to do a little but of patching here and there, but it is relatively fresh in my memory.

paulovieira avatar Feb 01 '16 07:02 paulovieira

Got the same problem. Switching to node v4.2.2 solved the issue for me. nvm install v4.2.2

Maybe newer versions would work too. I haven't tried.

d2lam avatar Apr 05 '16 20:04 d2lam

@paulovieira pull requests would be awesome! just pull requesting from hapi-tilemill shows too much change - could you please get the required changes done without moving the whole project away? thanks! :)

Komzpa avatar Oct 25 '16 19:10 Komzpa

Good morning all , I need help I work on tillmill, I created my tile in mbtiles format but to extract it in command prompt I had to enter the command below in cmd: C: \ Programs (x86) \ pytho38 \ python.exe C: Program Files \ mbutil-master D: \ philadelphia \ phyladelphiebasemap.mbtiles D: \ philadelphia \ philadelphia2 unsuccessful is there another alternative to extract my tiles in mbtiles

yvemalongo avatar Jul 10 '20 21:07 yvemalongo

Hi, are you not able to Export the MBTiles from the Tilemill browser window, under the Export dropdown?

On Jul 10, 2020, at 2:06 PM, yvemalongo [email protected] wrote:

Good morning all , I need help I work on tillmill, I created my tile in mbtiles format but to extract it in command prompt I had to enter the command below in cmd: C: \ Programs (x86) \ pytho38 \ python.exe C: Program Files \ mbutil-master D: \ philadelphia \ phyladelphiebasemap.mbtiles D: \ philadelphia \ philadelphia2 unsuccessful is there another alternative to extract my tiles in mbtiles

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/tilemill-project/tilemill/issues/2541#issuecomment-656890541, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAA7ORAP6RHCA3LYKWKSZOTR257DZANCNFSM4BWQRNSQ.

csytsma avatar Jul 10 '20 22:07 csytsma

yes i have already exported the mbtile file now so it remains now to extract the layers in several thumbnails

yvemalongo avatar Jul 11 '20 16:07 yvemalongo

Tilemill has no feature to extract images from a MBTile file. I'd suggest using a Sqlite db app, like DB Browser for Sqlite, to export the images.

Alternatively, if you just want static image files, export from Tilemill directly as a png, jpg or pdf file. No need to start with a MBTile. That's probably the easiest.

On Jul 11, 2020, at 9:07 AM, yvemalongo [email protected] wrote:

yes i have already exported the mbtile file now so it remains now to extract the layers in several thumbnails

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/tilemill-project/tilemill/issues/2541#issuecomment-657086988, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAA7ORBYHURFB4NP7ZWSVPLR3CE2JANCNFSM4BWQRNSQ.

csytsma avatar Jul 11 '20 18:07 csytsma