tilemill icon indicating copy to clipboard operation
tilemill copied to clipboard

Error at installing

Open jmlipman opened this issue 7 years ago • 2 comments

After I installed tilemill using npm and I try to execute index.js I get the following error:

module.js:328 throw err; ^

Error: Cannot find module '/sources/tilemill/node_modules/mapnik/lib/binding/node-v46-linux-x64/mapnik_settings.js' at Function.Module._resolveFilename (module.js:326:15) at Function.Module._load (module.js:277:25) at Module.require (module.js:354:17) at require (internal/module.js:12:17) at Object. (/sources/tilemill/node_modules/mapnik/lib/mapnik.js:8:16) at Module._compile (module.js:410:26) at Object.Module._extensions..js (module.js:417:10) at Module.load (module.js:344:32) at Function.Module._load (module.js:301:12) at Module.require (module.js:354:17)

This is what I get after I execute install npm lipman@lipmanLenovo:/sources/tilemill$ npm install loadDep:topcube → gunzTar ▌ ╢████████████████████████████████████░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░╟

[email protected] install /sources/tilemill/node_modules/topcube node-gyp rebuild

make: Entering directory '/sources/tilemill/node_modules/topcube/build' CXX(target) Release/obj.target/topcube/src/topcube.o LINK(target) Release/topcube ACTION binding_gyp_action_after_build_target_move_topcube bin/topcube TOUCH Release/obj.target/action_after_build.stamp make: Leaving directory '/sources/tilemill/node_modules/topcube/build'

[email protected] preinstall /sources/tilemill npm install npm

npm WARN package.json [email protected] 'repositories' (plural) Not supported. Please pick one as the 'repository' field npm WARN package.json [email protected] No repository field. npm WARN package.json [email protected] No description npm WARN package.json [email protected] No repository field. npm WARN package.json [email protected] No repository field. npm WARN package.json [email protected] No repository field. npm WARN package.json [email protected] buffer is also the name of a node core module. npm WARN package.json [email protected] No repository field. npm WARN package.json [email protected] events is also the name of a node core module. npm WARN package.json [email protected] No repository field. npm WARN package.json [email protected] No description npm WARN package.json [email protected] No repository field. npm WARN package.json [email protected] 'repositories' (plural) Not supported. Please pick one as the 'repository' field npm WARN package.json [email protected] No repository field. npm WARN package.json [email protected] punycode is also the name of a node core module. npm WARN package.json [email protected] querystring is also the name of a node core module. npm WARN package.json [email protected] string_decoder is also the name of a node core module. npm WARN package.json [email protected] No repository field. npm WARN package.json [email protected] No repository field. npm WARN package.json [email protected] No description npm WARN package.json [email protected] url is also the name of a node core module. [email protected] node_modules/npm

[email protected] postinstall /sources/tilemill node ./lib/gitutil.js

[email protected] /sources/tilemill ├─┬ [email protected] │ └─┬ [email protected] │ └── [email protected] ├─┬ [email protected] │ └─┬ [email protected] │ └─┬ [email protected] │ └─┬ [email protected] │ └── [email protected] ├─┬ [email protected] │ └─┬ [email protected] │ └── [email protected] ├─┬ [email protected] │ └─┬ [email protected] │ └── [email protected] └── [email protected]

npm WARN [email protected] No license field.

I tried to use a different version of node (0.10.26) and I get this other error:

/sources/tilemill/node_modules/boom/lib/index.js:5 const Hoek = require('hoek'); ^^^^^ 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. (/sources/tilemill/node_modules/hawk/lib/index.js:5:33) at Module._compile (module.js:456:26) at Object.Module._extensions..js (module.js:474:10) at Module.load (module.js:356:32)

I googled it and it seems that the problem has to do with the fact that it's an old version. What should I use? Should I use another version of node? How can I solve this? Thanks.

jmlipman avatar Oct 06 '17 04:10 jmlipman

If we figure out what version of node we should use, we should include an .nvmrc file so we can use nvm

almccon avatar Oct 13 '17 18:10 almccon

I'm using Ubuntu 16.04

I manged to get Tilemill up and running using the following:

git clone https://github.com/tilemill-project/tilemill.git
cd tilemill/
nvm use 4.9.1
npm install

IReese avatar Jan 10 '19 21:01 IReese