tilegrinder icon indicating copy to clipboard operation
tilegrinder copied to clipboard

Error running the example script

Open manuelroth opened this issue 5 years ago • 1 comments

Hi @rastapasta, This module looks really nice. Thank you for making it. I would love to play around with it but struggle to get it running:

I get the following error when trying to run it:

➜  filter-mbtiles node index.js 
internal/modules/cjs/loader.js:584
    throw err;
    ^

Error: Cannot find module 'coffee-script/register'
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:582:15)
    at Function.Module._load (internal/modules/cjs/loader.js:508:25)
    at Module.require (internal/modules/cjs/loader.js:637:17)
    at require (internal/modules/cjs/helpers.js:22:18)
    at Object.<anonymous> (/Users/manuelroth/dev/filter-mbtiles/node_modules/tilegrinder/index.js:2:1)
    at Module._compile (internal/modules/cjs/loader.js:701:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:712:10)
    at Module.load (internal/modules/cjs/loader.js:600:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:539:12)
    at Function.Module._load (internal/modules/cjs/loader.js:531:3)

It requires a module coffee-script/register thats not defined in the package.json -> https://github.com/rastapasta/tilegrinder/blob/master/index.js#L2

Do you have any idea what the problem could be?

manuelroth avatar May 10 '19 09:05 manuelroth

Just ran into the same issue. The problem is that coffee-script is now coffeescript. It should work when you replace require('coffee-script/register'); with require('coffeescript/register');

mrMetalWood avatar Oct 21 '20 08:10 mrMetalWood