0

I have a question. In this part of the geonode tutorial (https://training.geonode.geosolutionsgroup.com/master/GN4/mapstore_client/005_EXTENSION.html), I get the following error while running "npx @mapstore/project create extension". The versions of npm and node are correct. I am using an Ubuntu 22.04 VM on Windows 11. Does someone have an idea?

**(my_geonode) geonode@geonode-Virtual-Machine:/opt/geonode-project/my_geonode/src/my_geonode$ npx @mapstore/project create extension**
../csrc/addon.cc: In function ‘Nan::NAN_METHOD_RETURN_TYPE convert(Nan::NAN_METHOD_ARGS_TYPE)’:
../csrc/addon.cc:10:48: error: no matching function for call to ‘v8::Value::ToObject()’
   10 |   Local<Object> inputBuffer = info[0]->ToObject();
      |                               ~~~~~~~~~~~~~~~~~^~
In file included from /home/geonode/.cache/node-gyp/14.7.0/include/node/node.h:67,
                 from ../../nan/nan.h:62,
                 from ../csrc/addon.cc:1:
/home/geonode/.cache/node-gyp/14.7.0/include/node/v8.h:2822:44: note: candidate: ‘v8::MaybeLocal<v8::Object> v8::Value::ToObject(v8::Local<v8::Context>) const’
 2822 |   V8_WARN_UNUSED_RESULT MaybeLocal<Object> ToObject(
      |                                            ^~~~~~~~
/home/geonode/.cache/node-gyp/14.7.0/include/node/v8.h:2822:44: note:   candidate expects 1 argument, 0 provided
make: *** [addon.target.mk:137: Release/obj.target/addon/csrc/addon.o] Error 1
gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/home/geonode/.nvm/versions/node/v14.7.0/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:194:23)
gyp ERR! stack     at ChildProcess.emit (events.js:314:20)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:276:12)
gyp ERR! System Linux 6.2.0-1016-azure
gyp ERR! command "/home/geonode/.nvm/versions/node/v14.7.0/bin/node" "/home/geonode/.nvm/versions/node/v14.7.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/geonode/.npm/_npx/6054/lib/node_modules/@mapstore/project/node_modules/ttf2woff2
gyp ERR! node -v v14.7.0
gyp ERR! node-gyp -v v5.1.0
gyp ERR! not ok

1 Answer 1

0

The error message says, you are using node -v v14.7.0. ATM, I switch using v12 to compile geonode-mapstore-client stuff, as I also had problems compiling with "newer" node versions.

However, creating extensions by using components from geonode-mapstore-client is quite limited at the moment. The package does not provide an installable package for node. There is an open discussion issue on GitHub.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.