Node: Can't build node (make test-only fails)

Created on 12 Oct 2018  Â·  6Comments  Â·  Source: nodejs/node

Version: v10.12.0
Platform: macos 10.13.5 Darwin kbuchana-macOS 17.6.0 Darwin Kernel Version 17.6.0: Tue May 8 15:22:16 PDT 2018; root:xnu-4570.61.1~1/RELEASE_X86_64 x86_64

I'm at the JS Interactive - Code & Learn and I followed the instructions on Building Node.js. When I try to run the make test-only, I get an error. Spoke to help and wasn't able to resolve this. Was told to create an issue and post the output:

LD_LIBRARY_PATH=/Users/kbuchana/projects/node/out/Release/lib.host:/Users/kbuchana/projects/node/out/Release/lib.target:$LD_LIBRARY_PATH; export LD_LIBRARY_PATH; cd ../.; mkdir -p /Users/kbuchana/projects/node/out/Release/obj/gen/src/node/inspector/protocol; python tools/inspector_protocol/CodeGenerator.py --jinja_dir tools/inspector_protocol/.. --output_base "/Users/kbuchana/projects/node/out/Release/obj/gen/src/" --config "/Users/kbuchana/projects/node/out/Release/obj/gen/node_protocol_config.json"
rm 0cb572b55b1f0325b382934e82261dffc1d684b8.intermediate 4d4b22f91139490e6aaccbf6e6653c58da8acaad.intermediate 91d71556585fb9c72bbeeb057c983b6aa21b58b8.intermediate
if [ ! -r node -o ! -L node ]; then ln -fs out/Release/node node; fi
rm -f -r test/addons/??_*/
[ -x ./node ] && ./node tools/doc/addon-verify.js || node tools/doc/addon-verify.js
internal/modules/cjs/loader.js:588
    throw err;
    ^

Error: Cannot find module 'is-buffer'
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:586:15)
    at Function.Module._load (internal/modules/cjs/loader.js:512:25)
    at Module.require (internal/modules/cjs/loader.js:642:17)
    at require (internal/modules/cjs/helpers.js:20:18)
    at Object.<anonymous> (/Users/kbuchana/projects/node/tools/doc/node_modules/to-vfile/lib/core.js:3:14)
    at Module._compile (internal/modules/cjs/loader.js:706:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:717:10)
    at Module.load (internal/modules/cjs/loader.js:604:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:543:12)
    at Function.Module._load (internal/modules/cjs/loader.js:535:3)
internal/modules/cjs/loader.js:582
    throw err;
    ^

Error: Cannot find module 'is-buffer'
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:580:15)
    at Function.Module._load (internal/modules/cjs/loader.js:506:25)
    at Module.require (internal/modules/cjs/loader.js:636:17)
    at require (internal/modules/cjs/helpers.js:20:18)
    at Object.<anonymous> (/Users/kbuchana/projects/node/tools/doc/node_modules/to-vfile/lib/core.js:3:14)
    at Module._compile (internal/modules/cjs/loader.js:688:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:699:10)
    at Module.load (internal/modules/cjs/loader.js:598:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:537:12)
    at Function.Module._load (internal/modules/cjs/loader.js:529:3)
make[1]: *** [test/addons/.docbuildstamp] Error 1
make: *** [test-only] Error 2

build

Most helpful comment

Hi. The above comment is not accurate. That would point to an install problem with some tooling, but it seems more likely to me that your branch is out of date.

@kbuchanan What does git log --oneline -1 say?

All 6 comments

Hi. The above comment is not accurate. That would point to an install problem with some tooling, but it seems more likely to me that your branch is out of date.

@kbuchanan What does git log --oneline -1 say?

bcbb9370dd (HEAD -> master, upstream/master, origin/master, origin/HEAD) doc: revise security-reporting text in README

@kbuchanan Can you try running make test before make test-only? I wager that the install bits are only done in the full version.

@Fishrock123 I did try that before too. I get the following error:

if [ ! -r node -o ! -L node ]; then ln -fs out/Release/node node; fi
/Applications/Xcode.app/Contents/Developer/usr/bin/make -s test-doc
internal/modules/cjs/loader.js:588
    throw err;
    ^

Error: Cannot find module 'extend'
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:586:15)
    at Function.Module._load (internal/modules/cjs/loader.js:512:25)
    at Module.require (internal/modules/cjs/loader.js:642:17)
    at require (internal/modules/cjs/helpers.js:20:18)
    at Object.<anonymous> (/Users/kbuchana/projects/node/tools/doc/node_modules/unified/index.js:4:14)
    at Module._compile (internal/modules/cjs/loader.js:706:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:717:10)
    at Module.load (internal/modules/cjs/loader.js:604:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:543:12)
    at Function.Module._load (internal/modules/cjs/loader.js:535:3)
make[2]: *** [out/doc/api/addons.html] Error 1
make[1]: *** [doc-only] Error 2
make: *** [test] Error 2

This happened to quite a number of people. Nuking tools/doc/node_modules and running npm install again in that directory seems to have worked…

That seemed to resolve my issue. Thanks @addaleax !

Was this page helpful?
0 / 5 - 0 ratings

Related issues

stevenvachon picture stevenvachon  Â·  3Comments

mcollina picture mcollina  Â·  3Comments

danielstaleiny picture danielstaleiny  Â·  3Comments

fanjunzhi picture fanjunzhi  Â·  3Comments

addaleax picture addaleax  Â·  3Comments