Problem running yo generator/running keystone (node-pre-gyp install --fallback-to-build)

729 views
Skip to first unread message

Roger Sillito

unread,
Nov 16, 2015, 2:16:48 PM11/16/15
to Keystone JS
Hi,
I'm a keystone newb trying to get a working setup on Lubuntu 14.04 LTS, I've done the following:
I then tried to generate a first project using "yo keystone". Having responded to the prompts, the generation seems to get most of the way through before throwing up these warnings/errors:

npm WARN install Couldn't install optional dependency: Unsupported
npm WARN install Couldn't install optional dependency: Unsupported

-------

npm WARN prefer global coffee...@1.10.0 should be installed with -g
npm WARN prefer global mar...@0.3.5 should be installed with -g
npm WARN prefer global jsh...@2.3.0 should be installed with -g
npm WARN prefer global nod...@1.0.20 should be installed with -g
npm WARN prefer global node-in...@0.9.2 should be installed with -g

-------

> v8-d...@0.4.6 install /home/roger/Documents/keystone-test-project/node_modules/v8-debug
> node-pre-gyp install --fallback-to-build

make: Entering directory `/home/roger/Documents/keystone-test-project/node_modules/v8-debug/build'
  CXX(target) Release/obj.target/debug/src/debug.o
In file included from ../src/debug.cc:2:0:
../../nan/nan.h:261:25: error: redefinition of ‘template<class T> v8::Local<T> _NanEnsureLocal(v8::Local<T>)’
 NAN_INLINE v8::Local<T> _NanEnsureLocal(v8::Local<T> val) {
                         ^
../../nan/nan.h:256:25: error: ‘template<class T> v8::Local<T> _NanEnsureLocal(v8::Handle<T>)’ previously declared here
 NAN_INLINE v8::Local<T> _NanEnsureLocal(v8::Handle<T> val) {
                         ^
../../nan/nan.h:661:13: error: ‘node::smalloc’ has not been declared
     , node::smalloc::FreeCallback callback
             ^
../../nan/nan.h:661:35: error: expected ‘,’ or ‘...’ before ‘callback’
     , node::smalloc::FreeCallback callback
                                   ^
../../nan/nan.h: In function ‘v8::Local<v8::Object> NanNewBufferHandle(char*, size_t, int)’:
../../nan/nan.h:665:50: error: ‘callback’ was not declared in this scope
         v8::Isolate::GetCurrent(), data, length, callback, hint);
                                                  ^
../../nan/nan.h:665:60: error: ‘hint’ was not declared in this scope
         v8::Isolate::GetCurrent(), data, length, callback, hint);
                                                            ^
../../nan/nan.h: In function ‘v8::Local<v8::Object> NanNewBufferHandle(const char*, uint32_t)’:
../../nan/nan.h:672:67: error: call of overloaded ‘New(v8::Isolate*, const char*&, uint32_t&)’ is ambiguous
     return node::Buffer::New(v8::Isolate::GetCurrent(), data, size);
                                                                   ^
../../nan/nan.h:672:67: note: candidates are:
In file included from ../../nan/nan.h:25:0,
                 from ../src/debug.cc:2:
/home/roger/.node-gyp/4.2.2/include/node/node_buffer.h:31:40: note: v8::MaybeLocal<v8::Object> node::Buffer::New(v8::Isolate*, v8::Local<v8::String>, node::encoding) <near match>
 NODE_EXTERN v8::MaybeLocal<v8::Object> New(v8::Isolate* isolate,
                                        ^
/home/roger/.node-gyp/4.2.2/include/node/node_buffer.h:31:40: note:   no known conversion for argument 3 from ‘uint32_t {aka unsigned int}’ to ‘node::encoding’
/home/roger/.node-gyp/4.2.2/include/node/node_buffer.h:43:40: note: v8::MaybeLocal<v8::Object> node::Buffer::New(v8::Isolate*, char*, size_t) <near match>
 NODE_EXTERN v8::MaybeLocal<v8::Object> New(v8::Isolate* isolate,
                                        ^
/home/roger/.node-gyp/4.2.2/include/node/node_buffer.h:43:40: note:   no known conversion for argument 2 from ‘const char*’ to ‘char*’
In file included from ../src/debug.cc:2:0:
../../nan/nan.h: In function ‘v8::Local<v8::Object> NanNewBufferHandle(uint32_t)’:
../../nan/nan.h:676:61: error: could not convert ‘node::Buffer::New(v8::Isolate::GetCurrent(), ((size_t)size))’ from ‘v8::MaybeLocal<v8::Object>’ to ‘v8::Local<v8::Object>’
     return node::Buffer::New(v8::Isolate::GetCurrent(), size);
                                                             ^
../../nan/nan.h: In function ‘v8::Local<v8::Object> NanBufferUse(char*, uint32_t)’:
../../nan/nan.h:683:12: error: ‘Use’ is not a member of ‘node::Buffer’
     return node::Buffer::Use(v8::Isolate::GetCurrent(), data, size);
            ^
../src/debug.cc: In static member function ‘static void nodex::Debug::InternalConstructorName(const v8::FunctionCallbackInfo<v8::Value>&)’:
../src/debug.cc:194:23: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
           result_type = "";
                       ^
make: *** [Release/obj.target/debug/src/debug.o] Error 1
make: Leaving directory `/home/roger/Documents/keystone-test-project/node_modules/v8-debug/build'
gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/home/roger/.nvm/versions/node/v4.2.2/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:270:23)
gyp ERR! stack     at emitTwo (events.js:87:13)
gyp ERR! stack     at ChildProcess.emit (events.js:172:7)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12)
gyp ERR! System Linux 3.19.0-25-generic
gyp ERR! command "/home/roger/.nvm/versions/node/v4.2.2/bin/node" "/home/roger/.nvm/versions/node/v4.2.2/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "build" "--fallback-to-build" "--module=/home/roger/Documents/keystone-test-project/node_modules/v8-debug/build/debug/v0.4.6/node-v46-linux-x64/debug.node" "--module_name=debug" "--module_path=/home/roger/Documents/keystone-test-project/node_modules/v8-debug/build/debug/v0.4.6/node-v46-linux-x64"
gyp ERR! cwd /home/roger/Documents/keystone-test-project/node_modules/v8-debug
gyp ERR! node -v v4.2.2
gyp ERR! node-gyp -v v3.0.3
gyp ERR! not ok 
node-pre-gyp ERR! build error 
node-pre-gyp ERR! stack Error: Failed to execute '/home/roger/.nvm/versions/node/v4.2.2/bin/node /home/roger/.nvm/versions/node/v4.2.2/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/home/roger/Documents/keystone-test-project/node_modules/v8-debug/build/debug/v0.4.6/node-v46-linux-x64/debug.node --module_name=debug --module_path=/home/roger/Documents/keystone-test-project/node_modules/v8-debug/build/debug/v0.4.6/node-v46-linux-x64' (1)
node-pre-gyp ERR! stack     at ChildProcess.<anonymous> (/home/roger/Documents/keystone-test-project/node_modules/node-pre-gyp/lib/util/compile.js:83:29)
node-pre-gyp ERR! stack     at emitTwo (events.js:87:13)
node-pre-gyp ERR! stack     at ChildProcess.emit (events.js:172:7)
node-pre-gyp ERR! stack     at maybeClose (internal/child_process.js:818:16)
node-pre-gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:211:5)
node-pre-gyp ERR! System Linux 3.19.0-25-generic
node-pre-gyp ERR! command "/home/roger/.nvm/versions/node/v4.2.2/bin/node" "/home/roger/Documents/keystone-test-project/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd /home/roger/Documents/keystone-test-project/node_modules/v8-debug
node-pre-gyp ERR! node -v v4.2.2
node-pre-gyp ERR! node-pre-gyp -v v0.6.15
node-pre-gyp ERR! not ok 
Failed to execute '/home/roger/.nvm/versions/node/v4.2.2/bin/node /home/roger/.nvm/versions/node/v4.2.2/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/home/roger/Documents/keystone-test-project/node_modules/v8-debug/build/debug/v0.4.6/node-v46-linux-x64/debug.node --module_name=debug --module_path=/home/roger/Documents/keystone-test-project/node_modules/v8-debug/build/debug/v0.4.6/node-v46-linux-x64' (1)

....

npm ERR! Linux 3.19.0-25-generic
npm ERR! argv "/home/roger/.nvm/versions/node/v4.2.2/bin/node" "/home/roger/.nvm/versions/node/v4.2.2/bin/npm" "install"
npm ERR! node v4.2.2
npm ERR! npm  v3.4.0
npm ERR! code ELIFECYCLE

npm ERR! v8-d...@0.4.6 install: `node-pre-gyp install --fallback-to-build`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the v8-d...@0.4.6 install script 'node-pre-gyp install --fallback-to-build'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the v8-debug package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node-pre-gyp install --fallback-to-build
npm ERR! You can get their info via:
npm ERR!     npm owner ls v8-debug
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /home/roger/Documents/keystone-test-project/npm-debug.log

If I try starting the server up ("node keystone" within the project dir) I get:

npm ERR! 
module.js:339
    throw err;
    ^

Error: Cannot find module 'unicode/category/So'
    at Function.Module._resolveFilename (module.js:337:15)
    at Function.Module._load (module.js:287:25)
    at Module.require (module.js:366:17)
    at require (module.js:385:17)
    at symbols (/home/roger/Documents/keystone-test-project/node_modules/slug/slug.js:6:16)
    at /home/roger/Documents/keystone-test-project/node_modules/slug/slug.js:199:5
    at Object.<anonymous> (/home/roger/Documents/keystone-test-project/node_modules/slug/slug.js:212:2)
    at Module._compile (module.js:435:26)
    at Object.Module._extensions..js (module.js:442:10)
    at Module.load (module.js:356:32)

Any help gratefully appreciated.

cheers,
Roger.

Chris Troutner

unread,
Nov 16, 2015, 7:16:11 PM11/16/15
to Keystone JS
Hey Roger,

I ran into the same issues that you did. I ended up having to install node v.0.10.40 to successfully execute 'yo keystone'. After keystone is installed, you can then upgrade Node. Here are the directions that I followed:

Roger Sillito

unread,
Nov 17, 2015, 5:32:57 AM11/17/15
to Keystone JS
Thanks Chris - that solved it for me!

cheers,
Roger.

Ryan C.

unread,
Nov 28, 2015, 10:41:05 PM11/28/15
to Keystone JS
YOU SAVED MY DAY!!! THANK YOU.. ahem.. thank you.  So now that I have keystone installed and node downgraded,  I am really nervous to upgrade node.  What version did you upgrade to and is there anything I should watch out for?  Thanks!

Roger Sillito

unread,
Nov 29, 2015, 11:35:52 AM11/29/15
to Keystone JS
Ryan,
I tried switching back to 4.2.2 - I ran into problems as soon as I tried starting the site up.  I then tried updating the node dependencies:

rm -rf node_modules
npm cache clean
npm install
..but got more errors.   So until I find a compelling need to move versions I'm sticking with 0.10.40.   The impression I get is 0.10 is a fairly tried and tested version, and looking at the version history, .40 is a relatively recent update - hopefully someone with more node expertise than me will correct me if I'm wrong.

Chris Troutner

unread,
Dec 1, 2015, 11:05:54 AM12/1/15
to Keystone JS
I can't really add any new information, but I'll confirm that I'm working in 0.10.40 for all of my development so far. If someone upgrades to 0.12 or newer, let us know how it works for you.

Adam Bosco

unread,
Dec 8, 2015, 3:54:01 PM12/8/15
to Keystone JS
I have Keystone 0.3 functioning properly on Windows 10 with Node 0.12 and NPM 2. Attempts to use anything newer on Windows 10 have been unsuccessful thus far, thanks largely to the complicated build environment configuration insanity currently surrounding node-gyp on Windows.

I have been unable to properly configure a KeystoneJS environment on Debian Jessie from scratch thus far. However, using the Ubuntu 14.04 NodeJS Droplet on Digital Ocean, I was able to establish a functional KeystoneJS 0.3 instance on Node 4.2.2 and NPM 2.14 with nothing more than a few file ownership changes and increasing the system's allotted file watch limit. I've only been playing it for a couple hours, but so far no errors whatsoever.

If I have the time, I will investigate the environment further and try to come up with a reliable configuration.

Daniel Peterson

unread,
Dec 8, 2015, 6:09:09 PM12/8/15
to Keystone JS
Hey All,

I was getting this same issue, solved it by downgrading as Chris said. I am on a mac so I just used nvm and followed the accepted answer on this post.


Hope this helps someone

Jakub Jaroš

unread,
Dec 21, 2015, 9:12:31 AM12/21/15
to Keystone JS
I've successfully run keystone 0.3.16 and node 4.2.3. Only thing you have to change is grunt-node-inspector version.

Open package.json and change line to:

"grunt-node-inspector": "^0.4.1",

Reply all
Reply to author
Forward
0 new messages