Skip to content
This repository has been archived by the owner on Apr 4, 2019. It is now read-only.

Unable to install/setup Tileoven #14

Closed
csytsma opened this issue Aug 2, 2018 · 11 comments
Closed

Unable to install/setup Tileoven #14

csytsma opened this issue Aug 2, 2018 · 11 comments

Comments

@csytsma
Copy link

csytsma commented Aug 2, 2018

After cloning into local directory, running 'npm install' produces the errors below. Unable to start Tileoven.

contextify@0.1.15 install /Users//Development/Tilemill/tileoven_new/node_modules/contextify
node-gyp rebuild

CXX(target) Release/obj.target/contextify/src/contextify.o
../src/contextify.cc:131:56: warning: 'NewInstance' is deprecated [-Wdeprecated-declarations]
Local wrapper = Nan::New(constructor)->NewInstance();
^
/Users//.node-gyp/9.10.1/include/node/v8.h:3898:3: note: 'NewInstance' has been explicitly marked
deprecated here
V8_DEPRECATED("Use maybe version", Local NewInstance() const);
^
/Users//.node-gyp/9.10.1/include/node/v8config.h:321:29: note: expanded from macro 'V8_DEPRECATED'
declarator attribute((deprecated))
^
../src/contextify.cc:150:16: error: no member named 'SetAccessCheckCallbacks' in 'v8::ObjectTemplate'
otmpl->SetAccessCheckCallbacks(GlobalPropertyNamedAccessCheck,
~~~~~ ^
../src/contextify.cc:182:51: warning: 'GetRealNamedProperty' is deprecated [-Wdeprecated-declarations]
Local rv = Nan::New(ctx->sandbox)->GetRealNamedProperty(property);
^
/Users//.node-gyp/9.10.1/include/node/v8.h:3450:3: note: 'GetRealNamedProperty' has been explicitly
marked deprecated here
V8_DEPRECATED("Use maybe version",
^
/Users//.node-gyp/9.10.1/include/node/v8config.h:321:29: note: expanded from macro 'V8_DEPRECATED'
declarator attribute((deprecated))
^
../src/contextify.cc:209:38: warning: 'GetRealNamedProperty' is deprecated [-Wdeprecated-declarations]
if (!Nan::New(ctx->sandbox)->GetRealNamedProperty(property).IsEmpty() ||
^
/Users//.node-gyp/9.10.1/include/node/v8.h:3450:3: note: 'GetRealNamedProperty' has been explicitly
marked deprecated here
V8_DEPRECATED("Use maybe version",
^
/Users//.node-gyp/9.10.1/include/node/v8config.h:321:29: note: expanded from macro 'V8_DEPRECATED'
declarator attribute((deprecated))
^
../src/contextify.cc:210:42: warning: 'GetRealNamedProperty' is deprecated [-Wdeprecated-declarations]
!Nan::New(ctx->proxyGlobal)->GetRealNamedProperty(property).IsEmpty()) {
^
/Users//.node-gyp/9.10.1/include/node/v8.h:3450:3: note: 'GetRealNamedProperty' has been explicitly
marked deprecated here
V8_DEPRECATED("Use maybe version",
^
/Users//.node-gyp/9.10.1/include/node/v8config.h:321:29: note: expanded from macro 'V8_DEPRECATED'
declarator attribute((deprecated))
^
4 warnings and 1 error generated.
make: *** [Release/obj.target/contextify/src/contextify.o] Error 1
gyp ERR! build error
gyp ERR! stack Error: make failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:258:23)
gyp ERR! stack at ChildProcess.emit (events.js:180:13)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:209:12)
gyp ERR! System Darwin 16.7.0
gyp ERR! command "/usr/local/Cellar/node/9.10.1/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users//Development/Tilemill/tileoven_new/node_modules/contextify
gyp ERR! node -v v9.10.1
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok
npm WARN tilemill@0.10.2 No license field.

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! contextify@0.1.15 install: node-gyp rebuild
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the contextify@0.1.15 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

@freder
Copy link

freder commented Aug 4, 2018

same here

@florianf
Copy link
Owner

florianf commented Aug 6, 2018

Hi guys,

thanks for the pointer. I tried to fix the issue by upgrading bones deps to jsdom 4.0 and pinning gdal. Could you give it a spin?

@csytsma csytsma changed the title Unable to install/setup Tileover Unable to install/setup Tileoven Aug 6, 2018
@csytsma
Copy link
Author

csytsma commented Aug 6, 2018

I updated the package.json file, but got the same error. Can you provide what versions of the different dependencies you are running? I can provide a few, but I don't know enough to know which ones are important:
OXS v10.12.6
node v9.10.1
npm v5.6.0
gdal 2.1.3

The first error I get is an Access Denied to:
https://mapbox-node-binary.s3.amazonaws.com/mapnik/v3.6.2/node-v59-darwin-x64-Release.tar.gz. So it then appears to build from source.

`
gyp ERR! build error
gyp ERR! stack Error: "make" failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:258:23)
gyp ERR! stack at ChildProcess.emit (events.js:180:13)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:209:12)
gyp ERR! System Darwin 16.7.0
gyp ERR! command "/usr/local/Cellar/node/9.10.1/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "build" "--fallback-to-build" "--module=/Users/username/Development/Tilemill/tileoven/node_modules/gdal/lib/binding/node-v59-darwin-x64/gdal.node" "--module_name=gdal" "--module_path=/Users/username/Development/Tilemill/tileoven/node_modules/gdal/lib/binding/node-v59-darwin-x64"
gyp ERR! cwd /Users/username/Development/Tilemill/tileoven/node_modules/gdal
gyp ERR! node -v v9.10.1
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok
node-pre-gyp ERR! build error
node-pre-gyp ERR! stack Error: Failed to execute '/usr/local/Cellar/node/9.10.1/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/Users/username/Development/Tilemill/tileoven/node_modules/gdal/lib/binding/node-v59-darwin-x64/gdal.node --module_name=gdal --module_path=/Users/username/Development/Tilemill/tileoven/node_modules/gdal/lib/binding/node-v59-darwin-x64' (1)
node-pre-gyp ERR! stack at ChildProcess. (/Users/username/Development/Tilemill/tileoven/node_modules/gdal/node_modules/node-pre-gyp/lib/util/compile.js:83:29)
node-pre-gyp ERR! stack at ChildProcess.emit (events.js:180:13)
node-pre-gyp ERR! stack at maybeClose (internal/child_process.js:936:16)
node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:220:5)
node-pre-gyp ERR! System Darwin 16.7.0
node-pre-gyp ERR! command "/usr/local/Cellar/node/9.10.1/bin/node" "/Users/username/Development/Tilemill/tileoven/node_modules/gdal/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd /Users/username/Development/Tilemill/tileoven/node_modules/gdal
node-pre-gyp ERR! node -v v9.10.1
node-pre-gyp ERR! node-pre-gyp -v v0.6.39
node-pre-gyp ERR! not ok
Failed to execute '/usr/local/Cellar/node/9.10.1/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/Users/username/Development/Tilemill/tileoven/node_modules/gdal/lib/binding/node-v59-darwin-x64/gdal.node --module_name=gdal --module_path=/Users/username/Development/Tilemill/tileoven/node_modules/gdal/lib/binding/node-v59-darwin-x64' (1)
npm WARN tilemill@0.10.2 No license field.

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! gdal@0.9.3 install: "node-pre-gyp install --fallback-to-build"
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the gdal@0.9.3 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR! /Users/username/.npm/_logs/2018-08-06T23_48_14_097Z-debug.log
`

@csytsma
Copy link
Author

csytsma commented Aug 7, 2018

Appears it was probably a node version issue. I installed 'nvm' and installed Node v6.14.3 (nvm install 6), and now 'npm install' finishes without errors, and very quickly.

In running './index.js', it appears I'm getting a mapnik error?

$ ./index.js
module.js:478
throw err;
^
Error: Cannot find module '/Users/username/Development/Tilemill/tileoven/node_modules/mapnik/lib/binding/mapnik.node'
at Function.Module._resolveFilename (module.js:476:15)
at Function.Module._load (module.js:424:25)
at Module.require (module.js:504:17)
at require (internal/module.js:20:19)
at Object. (/Users/username/Development/Tilemill/tileoven/node_modules/mapnik/lib/mapnik.js:31:15)
at Module._compile (module.js:577:32)
at Object.Module._extensions..js (module.js:586:10)
at Module.load (module.js:494:32)
at tryModuleLoad (module.js:453:12)
at Function.Module._load (module.js:445:3)

Guessing this might be a version error as well? Is there an easy way to manage running different versions of mapnik? 'mapnik-config -v' = v3.0.19

@csytsma
Copy link
Author

csytsma commented Aug 7, 2018

Adding additional steps I took to get it working:
$ cd ../node_modules/mapnik
$ npm install

Attempted ./index.js again, this time complained about sqlite3
$ cd ../node_modules/sqlite3
$ npm install

Ran ./index.js again and it worked.

Not sure why I had to manually update those packages.

@Tybion
Copy link

Tybion commented Aug 7, 2018

Thanks for solving that.
For the record, is this a system running Mac OSX, Sierra?

@csytsma
Copy link
Author

csytsma commented Aug 7, 2018 via email

@csytsma csytsma closed this as completed Aug 7, 2018
@freder
Copy link

freder commented Aug 7, 2018

here's what did it for me:

nvm install 6
nvm use 6
yarn install

in yarn.lock under connect, change mime ">= 0.0.1" (wtf?) to mime "1.x" (because there were breaking changes in 2.x).

rm -rf node_modules
yarn install
open http://localhost:20009/

@florianf
Copy link
Owner

florianf commented Aug 8, 2018

Thanks for testing. I updated some more dependencies and fixed some minor bugs, now it should work with Node 8 LTS (tested on linux) out of the box.

@csytsma
Copy link
Author

csytsma commented Aug 8, 2018 via email

@csytsma
Copy link
Author

csytsma commented Aug 9, 2018

I ran ./index.js again using verbose mode, and appears to error when loading mapnik.node.

I then deleted /node_modules directory and ran 'npm install' again. Got an error about unable to download sqlite3, but it appeared to finish correctly.

node-pre-gyp ERR! Tried to download(403): https://mapbox-node-binary.s3.amazonaws.com/sqlite3/v3.1.3/node-v57-darwin-x64.tar.gz node-pre-gyp ERR! Pre-built binaries not found for sqlite3@3.1.3 and node@8.4.0 (node-v57 ABI, unknown) (falling back to source compile with node-gyp)

Running './index.js' in verbose mode, final error appears to be with sqlite3:

MODULE 89366: load "/Users/username/Development/Tilemill/tileoven/node_modules/sqlite3/lib/binding/node-v57-darwin-x64/node_sqlite3.node" for module "/Users/username/Development/Tilemill/tileoven/node_modules/sqlite3/lib/binding/node-v57-darwin-x64/node_sqlite3.node"

Fatal error in ../deps/v8/src/api.cc, line 1253
Check failed: !value_obj->IsJSReceiver() || value_obj->IsTemplateInfo().

==== C stack trace ===============================

0   node                                0x0000000100be5b13 v8::base::debug::StackTrace::StackTrace() + 19
1   node                                0x0000000100af46bb v8::platform::(anonymous namespace)::PrintStackTrace() + 27
2   node                                0x0000000100be2ccc V8_Fatal + 220
3   node                                0x00000001001e0beb v8::Template::Set(v8::Local<v8::Name>, v8::Local<v8::Data>, v8::PropertyAttribute) + 315
4   node_sqlite3.node                   0x00000001063c3a05 node_sqlite3::Database::Init(v8::Local<v8::Object>) + 277
5   node_sqlite3.node                   0x00000001063cb289 (anonymous namespace)::RegisterModule(v8::Local<v8::Object>) + 41
6   node                                0x0000000100a49999 node::DLOpen(v8::FunctionCallbackInfo<v8::Value> const&) + 888
7   node                                0x0000000100216432 v8::internal::FunctionCallbackArguments::Call(void (*)(v8::FunctionCallbackInfo<v8::Value> const&)) + 466
8   node                                0x0000000100277de0 v8::internal::MaybeHandle<v8::internal::Object> v8::internal::(anonymous namespace)::HandleApiCallHelper<false>(v8::internal::Isolate*, v8::internal::Handle<v8::internal::HeapObject>, v8::internal::Handle<v8::internal::HeapObject>, v8::internal::Handle<v8::internal::FunctionTemplateInfo>, v8::internal::Handle<v8::internal::Object>, v8::internal::BuiltinArguments) + 896
9   node                                0x0000000100277369 v8::internal::Builtin_Impl_HandleApiCall(v8::internal::BuiltinArguments, v8::internal::Isolate*) + 281
10  ???                                 0x00001c40499840dd 0x0 + 31062438199517
11  ???                                 0x00001c4049a738aa 0x0 + 31062439180458

Illegal instruction: 4

I tried going directly into /node_modules/mapnik and then /node_modules/sqlite3 and running 'npm install', but didn't appear to fix it this time.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants