Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
$ npm i --build-from-source --verbose
npm info it worked if it ends with ok
npm verb cli [ '/usr/local/bin/iojs',
npm verb cli '/usr/local/bin/npm',
npm verb cli 'i',
npm verb cli '--build-from-source',
npm verb cli '--verbose' ]
npm info using npm@2.13.3
npm info using node@v3.3.0
npm verb readDependencies loading dependencies from /home/lms/src/leveldb-repos/leveldown/package.json
npm verb install where, deps [ '/home/lms/src/leveldb-repos/leveldown',
npm verb install [ 'abstract-leveldown',
npm verb install 'bindings',
npm verb install 'fast-future',
npm verb install 'nan',
npm verb install 'prebuild',
npm verb install 'async',
npm verb install 'delayed',
npm verb install 'du',
npm verb install 'faucet',
npm verb install 'mkfiletree',
npm verb install 'monotonic-timestamp',
npm verb install 'node-uuid',
npm verb install 'optimist',
npm verb install 'readfiletree',
npm verb install 'rimraf',
npm verb install 'slump',
npm verb install 'tape' ] ]
npm verb install where, peers [ '/home/lms/src/leveldb-repos/leveldown', [] ]
npm verb installManyTop reading for lifecycle /home/lms/src/leveldb-repos/leveldown/package.json
npm info preinstall leveldown@1.4.1
npm verb installManyTop reading scoped package data from /home/lms/src/leveldb-repos/leveldown/node_modules/abstract-leveldown/package.json
npm verb installManyTop reading scoped package data from /home/lms/src/leveldb-repos/leveldown/node_modules/async/package.json
npm verb installManyTop reading scoped package data from /home/lms/src/leveldb-repos/leveldown/node_modules/bindings/package.json
npm verb installManyTop reading scoped package data from /home/lms/src/leveldb-repos/leveldown/node_modules/delayed/package.json
npm verb installManyTop reading scoped package data from /home/lms/src/leveldb-repos/leveldown/node_modules/du/package.json
npm verb installManyTop reading scoped package data from /home/lms/src/leveldb-repos/leveldown/node_modules/fast-future/package.json
npm verb installManyTop reading scoped package data from /home/lms/src/leveldb-repos/leveldown/node_modules/faucet/package.json
npm verb installManyTop reading scoped package data from /home/lms/src/leveldb-repos/leveldown/node_modules/heapdump/package.json
npm verb installManyTop reading scoped package data from /home/lms/src/leveldb-repos/leveldown/node_modules/mkfiletree/package.json
npm verb installManyTop reading scoped package data from /home/lms/src/leveldb-repos/leveldown/node_modules/monotonic-timestamp/package.json
npm verb installManyTop reading scoped package data from /home/lms/src/leveldb-repos/leveldown/node_modules/nan/package.json
npm verb installManyTop reading scoped package data from /home/lms/src/leveldb-repos/leveldown/node_modules/node-uuid/package.json
npm verb installManyTop reading scoped package data from /home/lms/src/leveldb-repos/leveldown/node_modules/optimist/package.json
npm verb installManyTop reading scoped package data from /home/lms/src/leveldb-repos/leveldown/node_modules/prebuild/package.json
npm verb installManyTop reading scoped package data from /home/lms/src/leveldb-repos/leveldown/node_modules/readfiletree/package.json
npm verb installManyTop reading scoped package data from /home/lms/src/leveldb-repos/leveldown/node_modules/rimraf/package.json
npm verb installManyTop reading scoped package data from /home/lms/src/leveldb-repos/leveldown/node_modules/slump/package.json
npm verb installManyTop reading scoped package data from /home/lms/src/leveldb-repos/leveldown/node_modules/tape/package.json
npm verb readDependencies loading dependencies from /home/lms/src/leveldb-repos/leveldown/package.json
npm verb targetResolver reading package data from /home/lms/src/leveldb-repos/leveldown/node_modules/abstract-leveldown/package.json
npm verb targetResolver reading package data from /home/lms/src/leveldb-repos/leveldown/node_modules/async/package.json
npm verb targetResolver reading package data from /home/lms/src/leveldb-repos/leveldown/node_modules/bindings/package.json
npm verb targetResolver reading package data from /home/lms/src/leveldb-repos/leveldown/node_modules/delayed/package.json
npm verb targetResolver reading package data from /home/lms/src/leveldb-repos/leveldown/node_modules/du/package.json
npm verb targetResolver reading package data from /home/lms/src/leveldb-repos/leveldown/node_modules/fast-future/package.json
npm verb targetResolver reading package data from /home/lms/src/leveldb-repos/leveldown/node_modules/faucet/package.json
npm verb targetResolver reading package data from /home/lms/src/leveldb-repos/leveldown/node_modules/heapdump/package.json
npm verb targetResolver reading package data from /home/lms/src/leveldb-repos/leveldown/node_modules/mkfiletree/package.json
npm verb targetResolver reading package data from /home/lms/src/leveldb-repos/leveldown/node_modules/monotonic-timestamp/package.json
npm verb targetResolver reading package data from /home/lms/src/leveldb-repos/leveldown/node_modules/nan/package.json
npm verb targetResolver reading package data from /home/lms/src/leveldb-repos/leveldown/node_modules/node-uuid/package.json
npm verb targetResolver reading package data from /home/lms/src/leveldb-repos/leveldown/node_modules/optimist/package.json
npm verb targetResolver reading package data from /home/lms/src/leveldb-repos/leveldown/node_modules/prebuild/package.json
npm verb targetResolver reading package data from /home/lms/src/leveldb-repos/leveldown/node_modules/readfiletree/package.json
npm verb targetResolver reading package data from /home/lms/src/leveldb-repos/leveldown/node_modules/rimraf/package.json
npm verb targetResolver reading package data from /home/lms/src/leveldb-repos/leveldown/node_modules/slump/package.json
npm verb targetResolver reading package data from /home/lms/src/leveldb-repos/leveldown/node_modules/tape/package.json
npm verb targetResolver reading package data from /home/lms/src/leveldb-repos/leveldown/node_modules/.bin/dujs/package.json
npm verb targetResolver reading package data from /home/lms/src/leveldb-repos/leveldown/node_modules/.bin/faucet/package.json
npm verb targetResolver reading package data from /home/lms/src/leveldb-repos/leveldown/node_modules/.bin/prebuild/package.json
npm verb targetResolver reading package data from /home/lms/src/leveldb-repos/leveldown/node_modules/.bin/rimraf/package.json
npm verb targetResolver reading package data from /home/lms/src/leveldb-repos/leveldown/node_modules/.bin/tape/package.json
npm verb targetResolver reading package data from /home/lms/src/leveldb-repos/leveldown/node_modules/.bin/uuid/package.json
npm verb already installed skipping prebuild@~2.4.0 /home/lms/src/leveldb-repos/leveldown
npm verb already installed skipping async@~1.0.0 /home/lms/src/leveldb-repos/leveldown
npm verb already installed skipping delayed@~1.0.1 /home/lms/src/leveldb-repos/leveldown
npm verb already installed skipping du@~0.1.0 /home/lms/src/leveldb-repos/leveldown
npm verb already installed skipping faucet@0.0.1 /home/lms/src/leveldb-repos/leveldown
npm verb already installed skipping mkfiletree@~0.0.1 /home/lms/src/leveldb-repos/leveldown
npm verb already installed skipping monotonic-timestamp@~0.0.8 /home/lms/src/leveldb-repos/leveldown
npm verb already installed skipping node-uuid@~1.4.3 /home/lms/src/leveldb-repos/leveldown
npm verb already installed skipping optimist@~0.6.1 /home/lms/src/leveldb-repos/leveldown
npm verb already installed skipping readfiletree@~0.0.1 /home/lms/src/leveldb-repos/leveldown
npm verb already installed skipping rimraf@~2.2.8 /home/lms/src/leveldb-repos/leveldown
npm verb already installed skipping slump@~2.0.0 /home/lms/src/leveldb-repos/leveldown
npm verb already installed skipping tape@~4.0.0 /home/lms/src/leveldb-repos/leveldown
npm verb already installed skipping abstract-leveldown@~2.4.0 /home/lms/src/leveldb-repos/leveldown
npm verb already installed skipping bindings@~1.2.1 /home/lms/src/leveldb-repos/leveldown
npm verb already installed skipping fast-future@~1.0.0 /home/lms/src/leveldb-repos/leveldown
npm verb already installed skipping nan@~2.0.0 /home/lms/src/leveldb-repos/leveldown
npm info build /home/lms/src/leveldb-repos/leveldown
npm info linkStuff leveldown@1.4.1
npm verb linkBins leveldown@1.4.1
npm verb linkMans leveldown@1.4.1
npm verb rebuildBundles leveldown@1.4.1
npm verb rebuildBundles [ '.bin',
npm verb rebuildBundles 'abstract-leveldown',
npm verb rebuildBundles 'async',
npm verb rebuildBundles 'bindings',
npm verb rebuildBundles 'delayed',
npm verb rebuildBundles 'du',
npm verb rebuildBundles 'fast-future',
npm verb rebuildBundles 'faucet',
npm verb rebuildBundles 'heapdump',
npm verb rebuildBundles 'mkfiletree',
npm verb rebuildBundles 'monotonic-timestamp',
npm verb rebuildBundles 'nan',
npm verb rebuildBundles 'node-uuid',
npm verb rebuildBundles 'optimist',
npm verb rebuildBundles 'prebuild',
npm verb rebuildBundles 'readfiletree',
npm verb rebuildBundles 'rimraf',
npm verb rebuildBundles 'slump',
npm verb rebuildBundles 'tape' ]
npm verb rebuild bundle /home/lms/src/leveldb-repos/leveldown/node_modules/heapdump
npm info build /home/lms/src/leveldb-repos/leveldown/node_modules/heapdump
npm info preinstall heapdump@0.3.7
npm info linkStuff heapdump@0.3.7
npm verb linkBins heapdump@0.3.7
npm verb linkMans heapdump@0.3.7
npm verb rebuildBundles heapdump@0.3.7
npm info install heapdump@0.3.7
> heapdump@0.3.7 install /home/lms/src/leveldb-repos/leveldown/node_modules/heapdump
> node-gyp rebuild
gyp info it worked if it ends with ok
gyp verb cli [ '/usr/local/bin/iojs',
gyp verb cli '/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js',
gyp verb cli 'rebuild' ]
gyp info using node-gyp@2.0.2
gyp info using node@3.3.0 | linux | x64
gyp verb command rebuild []
gyp verb command clean []
gyp verb clean removing "build" directory
gyp verb command configure []
gyp verb check python checking for Python executable "python2" in the PATH
gyp verb `which` succeeded python2 /usr/bin/python2
gyp verb check python version `python2 -c "import platform; print(platform.python_version());"` returned: "2.7.8\n"
gyp verb get node dir no --target version specified, falling back to host node version: v3.3.0
gyp verb command install [ 'v3.3.0' ]
gyp verb install input version string "v3.3.0"
gyp verb install installing version: 3.3.0
gyp verb install --ensure was passed, so won't reinstall if already installed
gyp verb install version is already installed, need to check "installVersion"
gyp verb got "installVersion" 9
gyp verb needs "installVersion" 9
gyp verb install version is good
gyp verb get node dir target node version installed: 3.3.0
gyp verb build dir attempting to create "build" dir: /home/lms/src/leveldb-repos/leveldown/node_modules/heapdump/build
gyp verb build dir "build" dir needed to be created? /home/lms/src/leveldb-repos/leveldown/node_modules/heapdump/build
gyp verb build/config.gypi creating config file
gyp verb build/config.gypi writing out config file: /home/lms/src/leveldb-repos/leveldown/node_modules/heapdump/build/config.gypi
gyp verb config.gypi checking for gypi file: /home/lms/src/leveldb-repos/leveldown/node_modules/heapdump/config.gypi
gyp verb common.gypi checking for gypi file: /home/lms/src/leveldb-repos/leveldown/node_modules/heapdump/common.gypi
gyp verb gyp gyp format was not specified; forcing "make"
gyp info spawn python2
gyp info spawn args [ '/usr/local/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py',
gyp info spawn args 'binding.gyp',
gyp info spawn args '-f',
gyp info spawn args 'make',
gyp info spawn args '-I',
gyp info spawn args '/home/lms/src/leveldb-repos/leveldown/node_modules/heapdump/build/config.gypi',
gyp info spawn args '-I',
gyp info spawn args '/usr/local/lib/node_modules/npm/node_modules/node-gyp/addon.gypi',
gyp info spawn args '-I',
gyp info spawn args '/home/lms/.node-gyp/3.3.0/include/node/common.gypi',
gyp info spawn args '-Dlibrary=shared_library',
gyp info spawn args '-Dvisibility=default',
gyp info spawn args '-Dnode_root_dir=/home/lms/.node-gyp/3.3.0',
gyp info spawn args '-Dnode_gyp_dir=/usr/local/lib/node_modules/npm/node_modules/node-gyp',
gyp info spawn args '-Dmodule_root_dir=/home/lms/src/leveldb-repos/leveldown/node_modules/heapdump',
gyp info spawn args '--depth=.',
gyp info spawn args '--no-parallel',
gyp info spawn args '--generator-output',
gyp info spawn args 'build',
gyp info spawn args '-Goutput_dir=.' ]
gyp verb command build []
gyp verb build type Release
gyp verb architecture x64
gyp verb node dev dir /home/lms/.node-gyp/3.3.0
gyp verb `which` succeeded for `make` /usr/bin/make
gyp info spawn make
gyp info spawn args [ 'V=1', 'BUILDTYPE=Release', '-C', 'build', '--jobs', 4 ]
make: Entering directory '/home/lms/src/leveldb-repos/leveldown/node_modules/heapdump/build'
g++ '-DNODE_GYP_MODULE_NAME=addon' '-D_LARGEFILE_SOURCE' '-D_FILE_OFFSET_BITS=64' '-DBUILDING_NODE_EXTENSION' -I/home/lms/.node-gyp/3.3.0/include/node -I/home/lms/.node-gyp/3.3.0/src -I/home/lms/.node-gyp/3.3.0/deps/uv/include -I/home/lms/.node-gyp/3.3.0/deps/v8/include -fPIC -pthread -Wall -Wextra -Wno-unused-parameter -m64 -O3 -ffunction-sections -fdata-sections -fno-omit-frame-pointer -fno-rtti -fno-exceptions -std=gnu++0x -MMD -MF ./Release/.deps/Release/obj.target/addon/src/heapdump.o.d.raw -c -o Release/obj.target/addon/src/heapdump.o ../src/heapdump.cc
g++ -shared -pthread -rdynamic -m64 -Wl,-soname=addon.node -o Release/obj.target/addon.node -Wl,--start-group Release/obj.target/addon/src/heapdump.o -Wl,--end-group
rm -rf "Release/addon.node" && cp -af "Release/obj.target/addon.node" "Release/addon.node"
make: Leaving directory '/home/lms/src/leveldb-repos/leveldown/node_modules/heapdump/build'
gyp info ok
npm verb unsafe-perm in lifecycle true
npm info postinstall heapdump@0.3.7
npm info install leveldown@1.4.1
> leveldown@1.4.1 install /home/lms/src/leveldb-repos/leveldown
> prebuild --download
node-gyp-install /home/lms/.node-gyp/3.3.0/installVersion true
prebuild info install Header files already fetched
prebuild info install node-gyp should now work for v3.3.0
prebuild verb command rebuild []
prebuild verb command clean []
prebuild verb clean removing "build" directory
prebuild verb command configure []
prebuild verb check python checking for Python executable "python2" in the PATH
prebuild verb `which` succeeded python2 /usr/bin/python2
prebuild verb check python version `python2 -c "import platform; print(platform.python_version());"` returned: "2.7.8\n"
prebuild verb get node dir compiling against --target node version: v3.3.0
prebuild verb command install [ 'v3.3.0' ]
prebuild verb install input version string "v3.3.0"
prebuild verb install installing version: 3.3.0
prebuild verb install --ensure was passed, so won't reinstall if already installed
prebuild verb install version is already installed, need to check "installVersion"
prebuild verb got "installVersion" 9
prebuild verb needs "installVersion" 9
prebuild verb install version is good
prebuild verb get node dir target node version installed: 3.3.0
prebuild verb build dir attempting to create "build" dir: /home/lms/src/leveldb-repos/leveldown/build
prebuild verb build dir "build" dir needed to be created? /home/lms/src/leveldb-repos/leveldown/build
prebuild verb build/config.gypi creating config file
prebuild verb build/config.gypi writing out config file: /home/lms/src/leveldb-repos/leveldown/build/config.gypi
prebuild verb config.gypi checking for gypi file: /home/lms/src/leveldb-repos/leveldown/config.gypi
prebuild verb common.gypi checking for gypi file: /home/lms/src/leveldb-repos/leveldown/common.gypi
prebuild verb gyp gyp format was not specified; forcing "make"
prebuild info spawn python2
prebuild info spawn args [ '/home/lms/src/prebuild/node_modules/node-gyp/gyp/gyp_main.py',
prebuild info spawn args 'binding.gyp',
prebuild info spawn args '-f',
prebuild info spawn args 'make',
prebuild info spawn args '-I',
prebuild info spawn args '/home/lms/src/leveldb-repos/leveldown/build/config.gypi',
prebuild info spawn args '-I',
prebuild info spawn args '/home/lms/src/prebuild/node_modules/node-gyp/addon.gypi',
prebuild info spawn args '-I',
prebuild info spawn args '/home/lms/.node-gyp/3.3.0/common.gypi',
prebuild info spawn args '-Dlibrary=shared_library',
prebuild info spawn args '-Dvisibility=default',
prebuild info spawn args '-Dnode_root_dir=/home/lms/.node-gyp/3.3.0',
prebuild info spawn args '-Dnode_gyp_dir=/home/lms/src/prebuild/node_modules/node-gyp',
prebuild info spawn args '-Dmodule_root_dir=/home/lms/src/leveldb-repos/leveldown',
prebuild info spawn args '--depth=.',
prebuild info spawn args '--no-parallel',
prebuild info spawn args '--generator-output',
prebuild info spawn args 'build',
prebuild info spawn args '-Goutput_dir=.' ]
gyp: /home/lms/.node-gyp/3.3.0/common.gypi not found (cwd: /home/lms/src/leveldb-repos/leveldown) while reading includes of binding.gyp while trying to load binding.gyp
prebuild ERR! build `gyp` failed with exit code: 1
npm verb unsafe-perm in lifecycle true
npm info leveldown@1.4.1 Failed to exec install script
npm verb stack Error: leveldown@1.4.1 install: `prebuild --download`
npm verb stack Exit status 2
npm verb stack at EventEmitter.<anonymous> (/usr/local/lib/node_modules/npm/lib/utils/lifecycle.js:214:16)
npm verb stack at emitTwo (events.js:87:13)
npm verb stack at EventEmitter.emit (events.js:172:7)
npm verb stack at ChildProcess.<anonymous> (/usr/local/lib/node_modules/npm/lib/utils/spawn.js:24:14)
npm verb stack at emitTwo (events.js:87:13)
npm verb stack at ChildProcess.emit (events.js:172:7)
npm verb stack at maybeClose (internal/child_process.js:764:16)
npm verb stack at Process.ChildProcess._handle.onexit (internal/child_process.js:211:5)
npm verb pkgid leveldown@1.4.1
npm verb cwd /home/lms/src/leveldb-repos/leveldown
npm ERR! Linux 3.16.0-43-generic
npm ERR! argv "/usr/local/bin/iojs" "/usr/local/bin/npm" "i" "--build-from-source" "--verbose"
npm ERR! node v3.3.0
npm ERR! npm v2.13.3
npm ERR! code ELIFECYCLE
npm ERR! leveldown@1.4.1 install: `prebuild --download`
npm ERR! Exit status 2
npm ERR!
npm ERR! Failed at the leveldown@1.4.1 install script 'prebuild --download'.
npm ERR! This is most likely a problem with the leveldown package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! prebuild --download
npm ERR! You can get their info via:
npm ERR! npm owner ls leveldown
npm ERR! There is likely additional logging output above.
npm verb exit [ 1, true ]
npm ERR! Please include the following file with any support request:
npm ERR! /home/lms/src/leveldb-repos/leveldown/npm-debug.log
#!/bin/bash
# run these commands in an empty directory
# need this version of npm to be sure to reproduce
npm i npm@3.3.12 -g
git clone https://github.com/julien-f/issue-bundled-leveldown
cd issue-bundled-leveldown
cd foo
npm i
cd ..
npm pack foo
mv foo-0.0.0.tgz ..
cd ..
mkdir node_modules
# this works
npm i foo-0.0.0.tgz --verbose # note the npm output
./node_modules/.bin/foo
# this fails
npm i foo-0.0.0.tgz --verbose # different output compared to first one
./node_modules/.bin/foo
@ralphtheninja

This comment has been minimized.

Copy link
Owner Author

commented Nov 17, 2015

Once reproduce.sh has run you can retry it by doing

rm node_modules -rf && mkdir node_modules
npm i foo-0.0.0.tgz --verbose
./node_modules/.bin/foo
npm i foo-0.0.0.tgz --verbose
./node_modules/.bin/foo

cc @No9

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.