I know that this issue has been discussed at great length in the past, and I revisited some of those issues/discussions before posting this. I'm not sure if I'm just not reading the previous resolutions correctly or if something else is going on, but I'm still getting a bunch of this error when running mocha tests for my code that's using buyan:
[SyntaxError: Unexpected token ILLEGAL]
{ [Error: Cannot find module './build/default/DTraceProviderBindings'] code: 'MODULE_NOT_FOUND' }
{ [Error: Cannot find module './build/Debug/DTraceProviderBindings'] code: 'MODULE_NOT_FOUND' }
I'm running OS X Yosemite.
Any ideas on getting rid of this message? It's not the end of the world, but it's pretty annoying and, more importantly, it's slowing down my test runs.
thanks,
_howard
Can you gist a full 'npm install' run? Do you get that error when just doing require('bunyan') in the node repl?
I was getting this error too and it turned out to be a configuration issue after updating to OS X Yosemite. I installed the Xcode command line tools but never accepted the user agreement in Xcode. Argh :)
If you are getting this error you may see the following when running "npm install bunyan":
Building dtrace-provider failed with exit code 1 and signal 0
re-run install with environment variable V set to see the build output
---------------
Setting the "V" environment variable will give you more info as to why npm failed to install bunyan:
YPCMC12678:bunyan-test gj870q$ pwd
/Users/gj870q/bunyan-test
YPCMC12678:bunyan-test gj870q$ export V=/Users/gj870q/bunyan-test
YPCMC12678:bunyan-test gj870q$ npm install bunyan
|
> [email protected] install /Users/gj870q/node_modules/bunyan/node_modules/dtrace-provider
> scripts/install.js
Agreeing to the Xcode/iOS license requires admin privileges, please re-run as root via sudo.
Agreeing to the Xcode/iOS license requires admin privileges, please re-run as root via sudo.
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 69
gyp ERR! stack at ChildProcess.onExit (/Users/gj870q/.nvm/v0.10.32/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:267:23)
gyp ERR! stack at ChildProcess.emit (events.js:98:17)
gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:810:12)
gyp ERR! System Darwin 14.0.0
gyp ERR! command "node" "/Users/gj870q/.nvm/v0.10.32/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/gj870q/node_modules/bunyan/node_modules/dtrace-provider
gyp ERR! node -v v0.10.32
gyp ERR! node-gyp -v v1.0.1
gyp ERR! not ok
[email protected] ../node_modules/bunyan
βββ [email protected]
βββ [email protected] ([email protected], [email protected], [email protected])
βββ [email protected] ([email protected])
After opening Xcode on my mac and accepting the user agreement it fixed my problem. I can now successfully use bunyan on OS X Yosemite.
interestingly enough, I don't seem to be getting any build errors. Here's my verbose output:
β loggerTest npm install bunyan
> [email protected] install /Users/howardd/Dev/scratch/loggerTest/node_modules/bunyan/node_modules/dtrace-provider
> scripts/install.js
LD_LIBRARY_PATH=/Users/howardd/Dev/scratch/loggerTest/node_modules/bunyan/node_modules/dtrace-provider/build/Release/lib.host:/Users/howardd/Dev/scratch/loggerTest/node_modules/bunyan/node_modules/dtrace-provider/build/Release/lib.target:$LD_LIBRARY_PATH; export LD_LIBRARY_PATH; cd ../.; sh libusdt-build.sh
Building libusdt for x86_64
rm -f *.gch
rm -f *.o
rm -f libusdt.a
rm -f test_usdt
rm -f test_usdt32
rm -f test_usdt64
rm -f test_mem_usage
gcc -O2 -Wall -arch x86_64 -c -o usdt.o usdt.c
gcc -O2 -Wall -arch x86_64 -c -o usdt_dof_file.o usdt_dof_file.c
gcc -arch x86_64 -o usdt_tracepoints.o -c usdt_tracepoints_x86_64.s
gcc -O2 -Wall -arch x86_64 -c -o usdt_probe.o usdt_probe.c
gcc -O2 -Wall -arch x86_64 -c -o usdt_dof.o usdt_dof.c
gcc -O2 -Wall -arch x86_64 -c -o usdt_dof_sections.o usdt_dof_sections.c
rm -f libusdt.a
ar cru libusdt.a usdt.o usdt_dof_file.o usdt_tracepoints.o usdt_probe.o usdt_dof.o usdt_dof_sections.o
ranlib libusdt.a
touch Release/obj.target/libusdt.stamp
c++ '-D_DARWIN_USE_64_BIT_INODE=1' '-D_LARGEFILE_SOURCE' '-D_FILE_OFFSET_BITS=64' '-DBUILDING_NODE_EXTENSION' -I/Users/howardd/.node-gyp/0.10.35/src -I/Users/howardd/.node-gyp/0.10.35/deps/uv/include -I/Users/howardd/.node-gyp/0.10.35/deps/v8/include -I../libusdt -I../node_modules/nan -Os -gdwarf-2 -mmacosx-version-min=10.5 -arch x86_64 -Wall -Wendif-labels -W -Wno-unused-parameter -fno-rtti -fno-exceptions -fno-threadsafe-statics -fno-strict-aliasing -MMD -MF ./Release/.deps/Release/obj.target/DTraceProviderBindings/dtrace_provider.o.d.raw -c -o Release/obj.target/DTraceProviderBindings/dtrace_provider.o ../dtrace_provider.cc
c++ '-D_DARWIN_USE_64_BIT_INODE=1' '-D_LARGEFILE_SOURCE' '-D_FILE_OFFSET_BITS=64' '-DBUILDING_NODE_EXTENSION' -I/Users/howardd/.node-gyp/0.10.35/src -I/Users/howardd/.node-gyp/0.10.35/deps/uv/include -I/Users/howardd/.node-gyp/0.10.35/deps/v8/include -I../libusdt -I../node_modules/nan -Os -gdwarf-2 -mmacosx-version-min=10.5 -arch x86_64 -Wall -Wendif-labels -W -Wno-unused-parameter -fno-rtti -fno-exceptions -fno-threadsafe-statics -fno-strict-aliasing -MMD -MF ./Release/.deps/Release/obj.target/DTraceProviderBindings/dtrace_probe.o.d.raw -c -o Release/obj.target/DTraceProviderBindings/dtrace_probe.o ../dtrace_probe.cc
c++ '-D_DARWIN_USE_64_BIT_INODE=1' '-D_LARGEFILE_SOURCE' '-D_FILE_OFFSET_BITS=64' '-DBUILDING_NODE_EXTENSION' -I/Users/howardd/.node-gyp/0.10.35/src -I/Users/howardd/.node-gyp/0.10.35/deps/uv/include -I/Users/howardd/.node-gyp/0.10.35/deps/v8/include -I../libusdt -I../node_modules/nan -Os -gdwarf-2 -mmacosx-version-min=10.5 -arch x86_64 -Wall -Wendif-labels -W -Wno-unused-parameter -fno-rtti -fno-exceptions -fno-threadsafe-statics -fno-strict-aliasing -MMD -MF ./Release/.deps/Release/obj.target/DTraceProviderBindings/dtrace_argument.o.d.raw -c -o Release/obj.target/DTraceProviderBindings/dtrace_argument.o ../dtrace_argument.cc
./gyp-mac-tool flock ./Release/linker.lock c++ -bundle -Wl,-search_paths_first -mmacosx-version-min=10.5 -arch x86_64 -L./Release -o Release/DTraceProviderBindings.node Release/obj.target/DTraceProviderBindings/dtrace_provider.o Release/obj.target/DTraceProviderBindings/dtrace_probe.o Release/obj.target/DTraceProviderBindings/dtrace_argument.o -undefined dynamic_lookup -L/Users/howardd/Dev/scratch/loggerTest/node_modules/bunyan/node_modules/dtrace-provider/libusdt -l usdt
SOLINK_MODULE(target) Release/DTraceProviderBindings.node: Finished
[email protected] node_modules/bunyan
βββ [email protected]
βββ [email protected] ([email protected], [email protected], [email protected])
βββ [email protected] ([email protected])
Problem occurs when we use iojs.
@neoziro there is a known issue with the dtrace-provider with io.js that is reported in issue #212.
@howarddierking I'm not sure about the error you're getting. Do you have the latest version of xcode installed?
I have bunyan working on my mac with OS X Yosemite:
Xcode version 6.1.1 (6A2008a)
$ node --version
v0.10.35
$ gcc --version
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
Apple LLVM version 6.0 (clang-600.0.56) (based on LLVM 3.5svn)
Target: x86_64-apple-darwin14.0.0
Thread model: posix
@gregjopa ok, will use node for now
Using node 0.11 it show this. Same issue?
[Error: Cannot find module './build/default/DTraceProviderBindings'] code: 'MODULE_NOT_FOUND'
@neoziro The issue with io.js is fixed with latest. The fix was to update to dtrace-provider 0.4.0.
@kievechua With the latest bunyan (using dtrace-provider 0.4.0) you shouldn't be getting that. I'd need more details (bunyan version, node version, your platform details, etc.) to confirm.
@howarddierking Can you first try with bunyan 1.3.3 that updates to dtrace-provider 0.4.0? Then, does this work:
$ cd .../your/project/dir/that/uses/bunyan
$ npm install bunyan
...
$ cd node_modules/bunyan
$ node
> process.version
'v0.10.28'
> require('dtrace-provider')
{ DTraceProvider: [Function: DTraceProvider],
createDTraceProvider: [Function] }
Still getting the error, but investigating to see if there may be something else going on, because I'm not seeing it in a different project. Will update as I discover more, but here's my verbose output.
β proj git:(dev) β npm install bunyan
> [email protected] install /proj/node_modules/bunyan/node_modules/dtrace-provider
> node scripts/install.js
LD_LIBRARY_PATH=/proj/node_modules/bunyan/node_modules/dtrace-provider/build/Release/lib.host:/proj/node_modules/bunyan/node_modules/dtrace-provider/build/Release/lib.target:$LD_LIBRARY_PATH; export LD_LIBRARY_PATH; cd ../.; sh libusdt-build.sh
Building libusdt for x86_64
rm -f *.gch
rm -f *.o
rm -f libusdt.a
rm -f test_usdt
rm -f test_usdt32
rm -f test_usdt64
rm -f test_mem_usage
gcc -O2 -Wall -arch x86_64 -c -o usdt.o usdt.c
gcc -O2 -Wall -arch x86_64 -c -o usdt_dof_file.o usdt_dof_file.c
gcc -arch x86_64 -o usdt_tracepoints.o -c usdt_tracepoints_x86_64.s
gcc -O2 -Wall -arch x86_64 -c -o usdt_probe.o usdt_probe.c
gcc -O2 -Wall -arch x86_64 -c -o usdt_dof.o usdt_dof.c
gcc -O2 -Wall -arch x86_64 -c -o usdt_dof_sections.o usdt_dof_sections.c
rm -f libusdt.a
ar cru libusdt.a usdt.o usdt_dof_file.o usdt_tracepoints.o usdt_probe.o usdt_dof.o usdt_dof_sections.o
ranlib libusdt.a
touch Release/obj.target/libusdt.stamp
c++ '-D_DARWIN_USE_64_BIT_INODE=1' '-D_LARGEFILE_SOURCE' '-D_FILE_OFFSET_BITS=64' '-DBUILDING_NODE_EXTENSION' -I/Users/howarddierking/.node-gyp/0.10.35/src -I/Users/howarddierking/.node-gyp/0.10.35/deps/uv/include -I/Users/howarddierking/.node-gyp/0.10.35/deps/v8/include -I../libusdt -I../node_modules/nan -Os -gdwarf-2 -mmacosx-version-min=10.5 -arch x86_64 -Wall -Wendif-labels -W -Wno-unused-parameter -fno-rtti -fno-exceptions -fno-threadsafe-statics -fno-strict-aliasing -MMD -MF ./Release/.deps/Release/obj.target/DTraceProviderBindings/dtrace_provider.o.d.raw -c -o Release/obj.target/DTraceProviderBindings/dtrace_provider.o ../dtrace_provider.cc
c++ '-D_DARWIN_USE_64_BIT_INODE=1' '-D_LARGEFILE_SOURCE' '-D_FILE_OFFSET_BITS=64' '-DBUILDING_NODE_EXTENSION' -I/Users/howarddierking/.node-gyp/0.10.35/src -I/Users/howarddierking/.node-gyp/0.10.35/deps/uv/include -I/Users/howarddierking/.node-gyp/0.10.35/deps/v8/include -I../libusdt -I../node_modules/nan -Os -gdwarf-2 -mmacosx-version-min=10.5 -arch x86_64 -Wall -Wendif-labels -W -Wno-unused-parameter -fno-rtti -fno-exceptions -fno-threadsafe-statics -fno-strict-aliasing -MMD -MF ./Release/.deps/Release/obj.target/DTraceProviderBindings/dtrace_probe.o.d.raw -c -o Release/obj.target/DTraceProviderBindings/dtrace_probe.o ../dtrace_probe.cc
c++ '-D_DARWIN_USE_64_BIT_INODE=1' '-D_LARGEFILE_SOURCE' '-D_FILE_OFFSET_BITS=64' '-DBUILDING_NODE_EXTENSION' -I/Users/howarddierking/.node-gyp/0.10.35/src -I/Users/howarddierking/.node-gyp/0.10.35/deps/uv/include -I/Users/howarddierking/.node-gyp/0.10.35/deps/v8/include -I../libusdt -I../node_modules/nan -Os -gdwarf-2 -mmacosx-version-min=10.5 -arch x86_64 -Wall -Wendif-labels -W -Wno-unused-parameter -fno-rtti -fno-exceptions -fno-threadsafe-statics -fno-strict-aliasing -MMD -MF ./Release/.deps/Release/obj.target/DTraceProviderBindings/dtrace_argument.o.d.raw -c -o Release/obj.target/DTraceProviderBindings/dtrace_argument.o ../dtrace_argument.cc
./gyp-mac-tool flock ./Release/linker.lock c++ -bundle -Wl,-search_paths_first -mmacosx-version-min=10.5 -arch x86_64 -L./Release -o Release/DTraceProviderBindings.node Release/obj.target/DTraceProviderBindings/dtrace_provider.o Release/obj.target/DTraceProviderBindings/dtrace_probe.o Release/obj.target/DTraceProviderBindings/dtrace_argument.o -undefined dynamic_lookup -L/proj/node_modules/bunyan/node_modules/dtrace-provider/libusdt -l usdt
SOLINK_MODULE(target) Release/DTraceProviderBindings.node: Finished
[email protected] node_modules/bunyan
βββ [email protected]
βββ [email protected] ([email protected], [email protected], [email protected])
βββ [email protected] ([email protected])
ok - found that the issue in my case was related to using https://github.com/felixge/node-sandboxed-module. When you use sandboxed-module to require a module that has a downstream dependency on Bunyan, sandboxed-module tries to recursively create fakes for all of the descendent modules - and whatever it happens to create for Bunyan doesn't have the proper Dtrace binding dependency. At any rate, I've corrected the issue by switching my approach for plugging in the fakes.
@howarddierking Thanks for getting back on this!
AFAIK the issue here is fixed. Happy for new issues or re-opening if someone has repro details for a failure case.
This is still an issue if you have certain characters in your path on OSX:
LD_LIBRARY_PATH=/Users/aburke/Dropbox (Personal)/...
/bin/sh: -c: line 0: syntax error near unexpected token `('
/bin/sh: -c: line 0: `LD_LIBRARY_PATH=/Users/aburke/Dropbox (Personal)/...
make: *** [.] Error 2
I'm on Mac OSX 10.9.5, XCode 6.2, NodeJS 4.1.2 and I get this:
$ V=/Users/user/project npm i bunyan
npm WARN package.json [email protected] No repository field.
npm WARN package.json [email protected] No README data
> [email protected] install /Users/user/project/node_modules/bunyan/node_modules/dtrace-provider
> node scripts/install.js
gyp WARN install got an error, rolling back install
gyp ERR! configure error
gyp ERR! stack Error: connect ETIMEDOUT 104.20.23.46:443
gyp ERR! stack at Object.exports._errnoException (util.js:849:11)
gyp ERR! stack at exports._exceptionWithHostPort (util.js:872:20)
gyp ERR! stack at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1060:14)
gyp ERR! System Darwin 13.4.0
gyp ERR! command "/usr/local/Cellar/node/4.1.2/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/user/project/node_modules/bunyan/node_modules/dtrace-provider
gyp ERR! node -v v4.1.2
gyp ERR! node-gyp -v v3.0.3
gyp ERR! not ok
[email protected] node_modules/bunyan
βββ [email protected]
βββ [email protected] ([email protected], [email protected], [email protected])
βββ [email protected] ([email protected])
(user name and project names changed - everything else is the same)
$ npm install hexo --no-optional
work for me
ChenJohns-MacBook-Air:hexo JohnChen$ hexo --version
hexo: 3.1.1
os: Darwin 15.0.0 darwin x64
http_parser: 2.5.0
node: 4.2.1
v8: 4.5.103.35
uv: 1.7.5
zlib: 1.2.8
ares: 1.10.1-DEV
icu: 56.1
modules: 46
openssl: 1.0.2d
My error seems to be related to dtrace compiling and node-gyp.js
[email protected] install /Users/Ben/caredox/caredox_util/node_modules/bunyan/node_modules/dtrace-provider
node scripts/install.js
LD_LIBRARY_PATH=/Users/Ben/caredox/caredox_util/node_modules/bunyan/node_modules/dtrace-provider/build/Release/lib.host:/Users/Ben/caredox/caredox_util/node_modules/bunyan/node_modules/dtrace-provider/build/Release/lib.target:$LD_LIBRARY_PATH; export LD_LIBRARY_PATH; cd ../.; sh libusdt-build.sh
Building libusdt for x86_64
rm -f _.gch
rm -f *.o
rm -f libusdt.a
rm -f test_usdt
rm -f test_usdt32
rm -f test_usdt64
rm -f test_mem_usage
gcc -O2 -Wall -arch x86_64 -c -o usdt.o usdt.c
gcc -O2 -Wall -arch x86_64 -c -o usdt_dof_file.o usdt_dof_file.c
gcc -arch x86_64 -o usdt_tracepoints.o -c usdt_tracepoints_x86_64.s
gcc -O2 -Wall -arch x86_64 -c -o usdt_probe.o usdt_probe.c
gcc -O2 -Wall -arch x86_64 -c -o usdt_dof.o usdt_dof.c
gcc -O2 -Wall -arch x86_64 -c -o usdt_dof_sections.o usdt_dof_sections.c
rm -f libusdt.a
ar cru libusdt.a usdt.o usdt_dof_file.o usdt_tracepoints.o usdt_probe.o usdt_dof.o usdt_dof_sections.o
ranlib libusdt.a
touch Release/obj.target/libusdt.stamp
c++ '-DNODE_GYP_MODULE_NAME=DTraceProviderBindings' '-D_DARWIN_USE_64_BIT_INODE=1' '-D_LARGEFILE_SOURCE' '-D_FILE_OFFSET_BITS=64' '-DBUILDING_NODE_EXTENSION' -I/Users/Ben/.node-gyp/4.2.1/include/node -I/Users/Ben/.node-gyp/4.2.1/src -I/Users/Ben/.node-gyp/4.2.1/deps/uv/include -I/Users/Ben/.node-gyp/4.2.1/deps/v8/include -I../libusdt -I../node_modules/nan -Os -gdwarf-2 -mmacosx-version-min=10.5 -arch x86_64 -Wall -Wendif-labels -W -Wno-unused-parameter -std=gnu++0x -fno-rtti -fno-exceptions -fno-threadsafe-statics -fno-strict-aliasing -MMD -MF ./Release/.deps/Release/obj.target/DTraceProviderBindings/dtrace_provider.o.d.raw -c -o Release/obj.target/DTraceProviderBindings/dtrace_provider.o ../dtrace_provider.cc
cc1plus: error: unrecognized command line option "-std=gnu++0x"
make: *_* [Release/obj.target/DTraceProviderBindings/dtrace_provider.o] Error 1
gyp ERR! build error
gyp ERR! stack Error: make failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/Users/Ben/.nvm/versions/node/v4.2.1/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 Darwin 14.5.0
gyp ERR! command "/Users/Ben/.nvm/versions/node/v4.2.1/bin/node" "/Users/Ben/.nvm/versions/node/v4.2.1/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/Ben/caredox/caredox_util/node_modules/bunyan/node_modules/dtrace-provider
gyp ERR! node -v v4.2.1
gyp ERR! node-gyp -v v3.0.3
gyp ERR! not ok
[email protected] node_modules/bunyan
βββ [email protected]
βββ [email protected] ([email protected], [email protected], [email protected])
βββ [email protected] ([email protected])
My issue was not properly installed touch module.
Reinstalling touch and bunyan fixed the problem.
> [email protected] install /Users/parksoon_my/WebstormProjects/pandora/node_modules/dtrace-provider
> node scripts/install.js
---------------
Building dtrace-provider failed with exit code 1 and signal 0
re-run install with environment variable V set to see the build output
---------------
> [email protected] install /Users/parksoon_my/WebstormProjects/pandora/node_modules/utf-8-validate
> node-gyp rebuild
CXX(target) Release/obj.target/validation/src/validation.o
/Users/parksoon_my/WebstormProjects/pandora/node_modules/.bin/touch: line 1: syntax error near unexpected token `('
/Users/parksoon_my/WebstormProjects/pandora/node_modules/.bin/touch: line 1: `var touch = require("../touch")'
make: *** [Release/obj.target/validation/src/validation.o] Error 2
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: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 Darwin 15.0.0
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/parksoon_my/WebstormProjects/pandora/node_modules/utf-8-validate
gyp ERR! node -v v5.0.0
gyp ERR! node-gyp -v v3.0.3
gyp ERR! not ok
npm WARN install:utf-8-validate [email protected] install: `node-gyp rebuild`
npm WARN install:utf-8-validate Exit status 1
For me this was fixed by upgrading my npm. I'm on OS X EL Capitan and went from npm version 1.4.28 to 3.4.0 and the problem went away. (Node.JS version 5.0.0)
rm the node-modules dir and npm install
Same issue here.
OS X El Capitan
npm 3.3.12
node.js 5.4.0
gcc LLVM 6.1.0
Same as @andyburke, bunyan fails if you have parens in the path you attempt to run npm install from. In my case it was /Dropbox (Personal)/. I moved it to a root dir, re-ran install and it worked fine.
I'm having a similar problem, although I don't get compiler errors I do get some warnings:
OS X El Capitan (10.11.2)
node: v4.2.1
npm: 3.5.3
gcc: LLVM version 7.0.2 (clang-700.1.81)
I see this when installing bunyan:
Strelka:test josh$ npm install bunyan
> [email protected] install /private/tmp/test/node_modules/dtrace-provider
> node scripts/install.js
LD_LIBRARY_PATH=/private/tmp/test/node_modules/dtrace-provider/build/Release/lib.host:/private/tmp/test/node_modules/dtrace-provider/build/Release/lib.target:$LD_LIBRARY_PATH; export LD_LIBRARY_PATH; cd ../.; sh libusdt-build.sh
Building libusdt for x86_64
rm -f *.gch
rm -f *.o
rm -f libusdt.a
rm -f test_usdt
rm -f test_usdt32
rm -f test_usdt64
rm -f test_mem_usage
gcc -O2 -Wall -arch x86_64 -c -o usdt.o usdt.c
gcc -O2 -Wall -arch x86_64 -c -o usdt_dof_file.o usdt_dof_file.c
gcc -arch x86_64 -o usdt_tracepoints.o -c usdt_tracepoints_x86_64.s
gcc -O2 -Wall -arch x86_64 -c -o usdt_probe.o usdt_probe.c
gcc -O2 -Wall -arch x86_64 -c -o usdt_dof.o usdt_dof.c
gcc -O2 -Wall -arch x86_64 -c -o usdt_dof_sections.o usdt_dof_sections.c
rm -f libusdt.a
ar cru libusdt.a usdt.o usdt_dof_file.o usdt_tracepoints.o usdt_probe.o usdt_dof.o usdt_dof_sections.o
ranlib libusdt.a
touch Release/obj.target/libusdt.stamp
c++ '-DNODE_GYP_MODULE_NAME=DTraceProviderBindings' '-D_DARWIN_USE_64_BIT_INODE=1' '-D_LARGEFILE_SOURCE' '-D_FILE_OFFSET_BITS=64' '-DBUILDING_NODE_EXTENSION' -I/Users/josh/.node-gyp/4.2.1/include/node -I/Users/josh/.node-gyp/4.2.1/src -I/Users/josh/.node-gyp/4.2.1/deps/uv/include -I/Users/josh/.node-gyp/4.2.1/deps/v8/include -I../libusdt -I../../nan -Os -gdwarf-2 -mmacosx-version-min=10.5 -arch x86_64 -Wall -Wendif-labels -W -Wno-unused-parameter -std=gnu++0x -fno-rtti -fno-exceptions -fno-threadsafe-statics -fno-strict-aliasing -MMD -MF ./Release/.deps/Release/obj.target/DTraceProviderBindings/dtrace_provider.o.d.raw -c -o Release/obj.target/DTraceProviderBindings/dtrace_provider.o ../dtrace_provider.cc
c++ '-DNODE_GYP_MODULE_NAME=DTraceProviderBindings' '-D_DARWIN_USE_64_BIT_INODE=1' '-D_LARGEFILE_SOURCE' '-D_FILE_OFFSET_BITS=64' '-DBUILDING_NODE_EXTENSION' -I/Users/josh/.node-gyp/4.2.1/include/node -I/Users/josh/.node-gyp/4.2.1/src -I/Users/josh/.node-gyp/4.2.1/deps/uv/include -I/Users/josh/.node-gyp/4.2.1/deps/v8/include -I../libusdt -I../../nan -Os -gdwarf-2 -mmacosx-version-min=10.5 -arch x86_64 -Wall -Wendif-labels -W -Wno-unused-parameter -std=gnu++0x -fno-rtti -fno-exceptions -fno-threadsafe-statics -fno-strict-aliasing -MMD -MF ./Release/.deps/Release/obj.target/DTraceProviderBindings/dtrace_probe.o.d.raw -c -o Release/obj.target/DTraceProviderBindings/dtrace_probe.o ../dtrace_probe.cc
c++ '-DNODE_GYP_MODULE_NAME=DTraceProviderBindings' '-D_DARWIN_USE_64_BIT_INODE=1' '-D_LARGEFILE_SOURCE' '-D_FILE_OFFSET_BITS=64' '-DBUILDING_NODE_EXTENSION' -I/Users/josh/.node-gyp/4.2.1/include/node -I/Users/josh/.node-gyp/4.2.1/src -I/Users/josh/.node-gyp/4.2.1/deps/uv/include -I/Users/josh/.node-gyp/4.2.1/deps/v8/include -I../libusdt -I../../nan -Os -gdwarf-2 -mmacosx-version-min=10.5 -arch x86_64 -Wall -Wendif-labels -W -Wno-unused-parameter -std=gnu++0x -fno-rtti -fno-exceptions -fno-threadsafe-statics -fno-strict-aliasing -MMD -MF ./Release/.deps/Release/obj.target/DTraceProviderBindings/dtrace_argument.o.d.raw -c -o Release/obj.target/DTraceProviderBindings/dtrace_argument.o ../dtrace_argument.cc
c++ -bundle -undefined dynamic_lookup -Wl,-search_paths_first -mmacosx-version-min=10.5 -arch x86_64 -L./Release -L/opt/boxen/homebrew/lib -o Release/DTraceProviderBindings.node Release/obj.target/DTraceProviderBindings/dtrace_provider.o Release/obj.target/DTraceProviderBindings/dtrace_probe.o Release/obj.target/DTraceProviderBindings/dtrace_argument.o -L/private/tmp/test/node_modules/dtrace-provider/libusdt -l usdt
ld: warning: object file (/private/tmp/test/node_modules/dtrace-provider/libusdt/libusdt.a(usdt.o)) was built for newer OSX version (10.11) than being linked (10.5)
ld: warning: object file (/private/tmp/test/node_modules/dtrace-provider/libusdt/libusdt.a(usdt_dof_file.o)) was built for newer OSX version (10.11) than being linked (10.5)
ld: warning: object file (/private/tmp/test/node_modules/dtrace-provider/libusdt/libusdt.a(usdt_dof_sections.o)) was built for newer OSX version (10.11) than being linked (10.5)
ld: warning: object file (/private/tmp/test/node_modules/dtrace-provider/libusdt/libusdt.a(usdt_dof.o)) was built for newer OSX version (10.11) than being linked (10.5)
ld: warning: object file (/private/tmp/test/node_modules/dtrace-provider/libusdt/libusdt.a(usdt_probe.o)) was built for newer OSX version (10.11) than being linked (10.5)
ld: warning: object file (/private/tmp/test/node_modules/dtrace-provider/libusdt/libusdt.a(usdt_tracepoints.o)) was built for newer OSX version (10.11) than being linked (10.5)
/private/tmp/test
βββ¬ [email protected]
βββ¬ [email protected]
β βββ [email protected]
βββ¬ [email protected]
β βββ¬ [email protected]
β β βββ [email protected]
β βββ [email protected]
β βββ¬ [email protected]
β βββ¬ [email protected]
β βββ¬ [email protected]
β β βββ [email protected]
β βββ [email protected]
β βββ¬ [email protected]
β β βββ¬ [email protected]
β β βββ [email protected]
β β βββ [email protected]
β βββ [email protected]
β βββ [email protected]
βββ [email protected]
It is Feb 2016, is this still the same? I am getting the same error.
Same error here with npm 3.5.3 and node 5.5.0
Same error with node 4.3.0 and npm 3.7.1...
Same error when I debug or run:
{ [Error: Cannot find module './build/Release/DTraceProviderBindings'] code: 'MODULE_NOT_FOUND' }
node 4.2.6
IOJS 3.31
npm 2.14.12
Using npm install --no-optional seems to fix it, but a permanent solution would be nice.
@andrewmunro : npm install --no-optional worked for me. Thanks for the fix dude.
npm install --no-optional not work for me, i'm getting
{ [Error: Cannot find module './build/Release/DTraceProviderBindings'] code: 'MODULE_NOT_FOUND' }
{ [Error: Cannot find module './build/default/DTraceProviderBindings'] code: 'MODULE_NOT_FOUND' }
while node index.js.
node 5.7.0, npm 3.6.0, os x 10.11.3, xcode 7.2.1, bunyan 1.7.0, restify 4.0.4
same here
[Error: Module version mismatch. Expected 47, got 46.]
{ [Error: Cannot find module './build/default/DTraceProviderBindings'] code: 'MODULE_NOT_FOUND' }
{ [Error: Cannot find module './build/Debug/DTraceProviderBindings'] code: 'MODULE_NOT_FOUND' }
node 5.7.0, npm 3.6.0, bunyan 1.7.1, restify 4.0.3
@geakstr @bennybennet Did you try removing your node-modules folders first?
rm -rf node_modules/ && npm install --no-optional
The reason you are seeing this error is because node-bunyan uses dtrace-provider as an optional dependency which is not supported for mac os x.
IMHO This issue should probably be closed. It's not a problem with node-bunyan, more an issue with the fact that npm installs optional dependencies by default.
@andrewmunro yes, I did rm and install with --no-optional flag
rm -rf node_modules/ && npm install (without --no-optional) worked for me.
@andrewmunro :npm install --no-optional worked for me as well. Thanks for solving this painful thing.
--no-optional doesn't seem like a solution, what if other modules need
optional components?
On Mon, Mar 7, 2016, 4:32 AM chihungsiu [email protected] wrote:
@andrewmunro https://github.com/andrewmunro : npm install --no-optional
worked for me as well. Thanks for solving this painful thing.β
Reply to this email directly or view it on GitHub
https://github.com/trentm/node-bunyan/issues/216#issuecomment-193179737.
@jbcpollak ...Then they wouldn't be optional?
@andrewmunro they might not be optional for the project depending on them right?
For example, let's say my project depends on library-A and library-B:
1) library-A has optional dependencies that aren't necessary to my project
2) library-B has optional dependencies that are necessary to my project
If I run npm install --no-optional
I won't get the optional features of library-B.
I don't have a specific scenario for this, I'm just point it out as a potential problem. I think this is a symptom of npm's weak control of dependencies.
Using NPM 3 instead of 2 also solved the issue for me.
You probably have a globally installed npm library that is incompatible with your node version. Try removing, e.g., npm remove node-gyp -g and reinstalling it along with other globally installed libraries and _then_ try to do your local npm install. Good luck!
After rm -rf node_modules && npm install --no-optionals
β ~/Workspace/continu/continu-api [master|β 1]
19:52 $ npm start
> [email protected] start /Users/user/workspace/company/api
> node server.js
assert.js:90
throw new assert.AssertionError({
^
AssertionError: "rotating-file" stream type is not supported: missing "mv" module
at Logger.addStream (/Users/user/workspace/company/api/node_modules/bunyan/lib/bunyan.js:606:16)
at /Users/user/workspace/company/api/node_modules/bunyan/lib/bunyan.js:469:18
at Array.forEach (native)
at new Logger (/Users/user/workspace/company/api/node_modules/bunyan/lib/bunyan.js:468:25)
at Object.<anonymous> (/Users/user/workspace/company/api/server.js:29:11)
at Module._compile (module.js:541:32)
at Object.Module._extensions..js (module.js:550:10)
at Module.load (module.js:456:32)
at tryModuleLoad (module.js:415:12)
at Function.Module._load (module.js:407:3)
at Function.Module.runMain (module.js:575:10)
at startup (node.js:160:18)
at node.js:445:3
npm ERR! Darwin 15.4.0
npm ERR! argv "/Users/franky/.nvm/versions/node/v6.1.0/bin/node" "/Users/franky/.nvm/versions/node/v6.1.0/bin/npm" "start"
npm ERR! node v6.1.0
npm ERR! npm v3.8.6
npm ERR! code ELIFECYCLE
npm ERR! [email protected] start: `node server.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] start script 'node server.js'.
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 continu-api package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node server.js
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs continu-api
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls continu-api
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! /Users/user/workspace/company/api/npm-debug.log
rm -rf node_modules/ && npm install --no-optional worked for me as well.
Update: rm -rf node_modules/ && npm install without no-optional worked as well.
I just want to say --no-optional seems like a workaround, it isn't a long term solution. Its a global flag for all of npm, which means not only are the optional dependencies for node-bunyan left out, _all_ the optional dependencies of your other dependencies are left out, and that could have unintended consequences.
I'd rather have the console warnings appear than have some unexplained side effect caused by dropping optional dependencies I'm not aware of.
That also makes formatters or streams for restify not work. It is that or some other component not work. Iβll write as soon as I have moment to test back home.
On Jun 2, 2016, at 11:53 AM, Tito Esteves [email protected] wrote:
rm -rf node_modules/ && npm install --no-optional worked for me as well.
+1
On Jun 2, 2016, at 11:55 AM, Joshua Chaitin-Pollak [email protected] wrote:
I just want to say --no-optional seems like a workaround, it isn't a long term solution. Its a global flag for all of npm, which means not only are the optional dependencies for node-bunyan left out, all the optional dependencies of your other dependencies are left out, and that could have unintended consequences.
I'd rather have the console warnings appear than have some unexplained side effect caused by dropping optional dependencies I'm not aware of.
β
You are receiving this because you commented.
Reply to this email directly, view it on GitHub https://github.com/trentm/node-bunyan/issues/216#issuecomment-223370534, or mute the thread https://github.com/notifications/unsubscribe/AKXbtLu7akwhIsdsY4yQQowspDuJzVKUks5qHxktgaJpZM4DTpaW.
@trentm - This issue is closed but it seems a lot of people are still having the same symptoms. Should we create a new issue or can you reopen this one? In this case it seems to be a node 6 issue.
Looks like #416 might be a new Node 6 related issue
The same error occurred on my end because my environment's python pointed to version 3.5 (rather than 2.7, which is dtrace-provider's only supported version). Linking to 2.7 and reinstalling restify fixed the issue for me
Guys if you have this still happening to you would you please + 1 #424 ?
Thanks
Happening after moving to Node 6.3 recently.
happened after moving to nodejs 6.3.1
Happening on node 4.4.7 / macOS (resolved with rm -rf node_modules/ && npm install --no-optional)
@kevinstumpf Ditto for me. Seems that installing any module that relies on node-bunyan while having system python in the 3.x series causes the failure, because bunyan fails to build. Running the npm install for the desired module with system python set to 2.7 worked for me as well.
If you would like to avoid having to type --no-optional all the time (like me). You can set the npm config flag optional to false either with npm config or a local .npmrc or export NPM_CONFIG_OPTIONAL=false.
After upgrading to node 6.6.0 and npm 3 I started to encounter this. I didn't dig into the issue but reinstalling everything installed previously with npm install -g solved it.
β myblog git:(master) node -v
v6.2.1
β myblog git:(master) npm -v
3.9.3
same issue for me
but hexo init works well
@trentm this still seems to be a problem for many people...
@trentm No idea how this can be the case:
ProductName: Mac OS X
ProductVersion: 10.12.1
BuildVersion: 16B2555
node --version
v7.0.0
And for a simple example from the README
{ Error: Cannot find module './build/Release/DTraceProviderBindings'
at Function.Module._resolveFilename (module.js:472:15)
at Function.Module._load (module.js:420:25)
at Module.require (module.js:500:17)
at require (internal/module.js:20:19)
at Object.<anonymous> (/Users/Edgar/Repos/fintech-hackathon/node_modules/bunyan/node_modules/dtrace-provider/dtrace-provider.js:17:23)
at Module._compile (module.js:573:32)
at Object.Module._extensions..js (module.js:582:10)
at Module.load (module.js:490:32)
at tryModuleLoad (module.js:449:12)
at Function.Module._load (module.js:441:3) code: 'MODULE_NOT_FOUND' }
{ Error: Cannot find module './build/default/DTraceProviderBindings'
at Function.Module._resolveFilename (module.js:472:15)
at Function.Module._load (module.js:420:25)
at Module.require (module.js:500:17)
at require (internal/module.js:20:19)
at Object.<anonymous> (/Users/Edgar/Repos/fintech-hackathon/node_modules/bunyan/node_modules/dtrace-provider/dtrace-provider.js:17:23)
at Module._compile (module.js:573:32)
at Object.Module._extensions..js (module.js:582:10)
at Module.load (module.js:490:32)
at tryModuleLoad (module.js:449:12)
at Function.Module._load (module.js:441:3) code: 'MODULE_NOT_FOUND' }
{ Error: Cannot find module './build/Release/DTraceProviderBindings'
at Function.Module._resolveFilename (module.js:472:15)
at Function.Module._load (module.js:420:25)
at Module.require (module.js:500:17)
at require (internal/module.js:20:19)
at Object.<anonymous> (/Users/Edgar/Repos/fintech-hackathon/node_modules/dtrace-provider/dtrace-provider.js:17:23)
at Module._compile (module.js:573:32)
at Object.Module._extensions..js (module.js:582:10)
at Module.load (module.js:490:32)
at tryModuleLoad (module.js:449:12)
at Function.Module._load (module.js:441:3) code: 'MODULE_NOT_FOUND' }
{ Error: Cannot find module './build/default/DTraceProviderBindings'
at Function.Module._resolveFilename (module.js:472:15)
at Function.Module._load (module.js:420:25)
at Module.require (module.js:500:17)
at require (internal/module.js:20:19)
at Object.<anonymous> (/Users/Edgar/Repos/fintech-hackathon/node_modules/dtrace-provider/dtrace-provider.js:17:23)
at Module._compile (module.js:573:32)
at Object.Module._extensions..js (module.js:582:10)
at Module.load (module.js:490:32)
at tryModuleLoad (module.js:449:12)
at Function.Module._load (module.js:441:3) code: 'MODULE_NOT_FOUND' }
Having the same issue with:
$ node --version
v6.9.1
$ npm --version
3.10.8
And the same issue with:
$ node --version
v7.1.0
$ npm --version
3.10.9
I figure it must be something with the default installation process, maybe my fix can help people with the same issue.
https://github.com/tea3/hexo-related-popular-posts/issues/1#issuecomment-263049956
This fixes the error to me on Mac OSX:
rm -rf node_modules/ && npm install --no-optional
tried all the solutions in this thread but still get the error. I'm using;
node v7.1.0
npm 3.10.9
OSX 10.12.1
I did two steps and it solved my same issue
npm install -g build essential
npm rebuild
the problem with that approach (npm install --no-optional) is that it doesnβt install everything you need, and then things like the
var format = require('bunyan-format');
Or the Restify Serializers, Iβm not quite sure which one now.
var bunyanOptions = {
name: 'analyze',
streams: [{stream: formatter, level: 'debug'}, {type: 'rotating-file', path: './logs/analyze.log', level: 'info', period: '1d', count: 7}],
serializers: restify.bunyan.serializers
};
This issue should not happen EVER. IMHO
Is not about installing it differently WITHOUT the package or dependency that makes it fail.
On Dec 17, 2016, at 3:49 AM, Kumar Shubham notifications@github.com wrote:
I did two steps and it solved my same issue
npm install -g build essential npm rebuildβ
You are receiving this because you commented.
Reply to this email directly, view it on GitHub https://github.com/trentm/node-bunyan/issues/216#issuecomment-267756175, or mute the thread https://github.com/notifications/unsubscribe-auth/AKXbtMUU8gQd8kOMw5SxWoMhYIiTICJLks5rI74ngaJpZM4DTpaW.
@trentm this should probably be reopened. It's still happening to me on macOS with Node 7.5.0.
My trace is very similar to: https://github.com/trentm/node-bunyan/issues/216#issuecomment-256996494
Using Node 6.7, this is still happening here as well. The trace is pretty much the same as https://github.com/trentm/node-bunyan/issues/216#issuecomment-256996494
That error message is the one shown when the module has failed to compile. If you reinstall the dependencies with V=1 in your environment, you should be able to see the compilation details and see what's failing. For example, this is what a successful compilation should look like:
% V=1 npm install
> [email protected] install /Users/cody.mello/src/node-bunyan/node_modules/dtrace-provider
> node scripts/install.js
LD_LIBRARY_PATH=/Users/cody.mello/src/node-bunyan/node_modules/dtrace-provider/build/Release/lib.host:/Users/cody.mello/src/node-bunyan/node_modules/dtrace-provider/build/Release/lib.target:$LD_LIBRARY_PATH; export LD_LIBRARY_PATH; cd ../.; sh libusdt-build.sh
Building libusdt for x86_64
gmake[1]: Entering directory '/Users/cody.mello/src/node-bunyan/node_modules/dtrace-provider/libusdt'
rm -f *.gch
rm -f *.o
rm -f libusdt.a
rm -f test_usdt
rm -f test_usdt32
rm -f test_usdt64
rm -f test_mem_usage
gcc -O2 -Wall -arch x86_64 -c -o usdt.o usdt.c
gcc -O2 -Wall -arch x86_64 -c -o usdt_dof_file.o usdt_dof_file.c
gcc -arch x86_64 -o usdt_tracepoints.o -c usdt_tracepoints_x86_64.s
gcc -O2 -Wall -arch x86_64 -c -o usdt_probe.o usdt_probe.c
gcc -O2 -Wall -arch x86_64 -c -o usdt_dof.o usdt_dof.c
gcc -O2 -Wall -arch x86_64 -c -o usdt_dof_sections.o usdt_dof_sections.c
rm -f libusdt.a
ar cru libusdt.a usdt.o usdt_dof_file.o usdt_tracepoints.o usdt_probe.o usdt_dof.o usdt_dof_sections.o
ranlib libusdt.a
gmake[1]: Leaving directory '/Users/cody.mello/src/node-bunyan/node_modules/dtrace-provider/libusdt'
touch Release/obj.target/libusdt.stamp
c++ '-DNODE_GYP_MODULE_NAME=DTraceProviderBindings' '-DUSING_UV_SHARED=1' '-DUSING_V8_SHARED=1' '-DV8_DEPRECATION_WARNINGS=1' '-D_DARWIN_USE_64_BIT_INODE=1' '-D_LARGEFILE_SOURCE' '-D_FILE_OFFSET_BITS=64' '-DBUILDING_NODE_EXTENSION' -I/Users/cody.mello/.node-gyp/7.5.0/include/node -I/Users/cody.mello/.node-gyp/7.5.0/src -I/Users/cody.mello/.node-gyp/7.5.0/deps/uv/include -I/Users/cody.mello/.node-gyp/7.5.0/deps/v8/include -I../libusdt -I../../nan -Os -gdwarf-2 -mmacosx-version-min=10.7 -arch x86_64 -Wall -Wendif-labels -W -Wno-unused-parameter -std=gnu++0x -stdlib=libc++ -fno-rtti -fno-exceptions -fno-threadsafe-statics -fno-strict-aliasing -MMD -MF ./Release/.deps/Release/obj.target/DTraceProviderBindings/dtrace_provider.o.d.raw -c -o Release/obj.target/DTraceProviderBindings/dtrace_provider.o ../dtrace_provider.cc
../dtrace_provider.cc:89:35: warning: 'NewInstance' is deprecated [-Wdeprecated-declarations]
v8::Local<Object> pd = klass->NewInstance();
^
/Users/cody.mello/.node-gyp/7.5.0/include/node/v8.h:3292:52: note: 'NewInstance' has been explicitly marked deprecated here
V8_DEPRECATED("Use maybe version", Local<Object> NewInstance() const);
^
1 warning generated.
c++ '-DNODE_GYP_MODULE_NAME=DTraceProviderBindings' '-DUSING_UV_SHARED=1' '-DUSING_V8_SHARED=1' '-DV8_DEPRECATION_WARNINGS=1' '-D_DARWIN_USE_64_BIT_INODE=1' '-D_LARGEFILE_SOURCE' '-D_FILE_OFFSET_BITS=64' '-DBUILDING_NODE_EXTENSION' -I/Users/cody.mello/.node-gyp/7.5.0/include/node -I/Users/cody.mello/.node-gyp/7.5.0/src -I/Users/cody.mello/.node-gyp/7.5.0/deps/uv/include -I/Users/cody.mello/.node-gyp/7.5.0/deps/v8/include -I../libusdt -I../../nan -Os -gdwarf-2 -mmacosx-version-min=10.7 -arch x86_64 -Wall -Wendif-labels -W -Wno-unused-parameter -std=gnu++0x -stdlib=libc++ -fno-rtti -fno-exceptions -fno-threadsafe-statics -fno-strict-aliasing -MMD -MF ./Release/.deps/Release/obj.target/DTraceProviderBindings/dtrace_probe.o.d.raw -c -o Release/obj.target/DTraceProviderBindings/dtrace_probe.o ../dtrace_probe.cc
c++ '-DNODE_GYP_MODULE_NAME=DTraceProviderBindings' '-DUSING_UV_SHARED=1' '-DUSING_V8_SHARED=1' '-DV8_DEPRECATION_WARNINGS=1' '-D_DARWIN_USE_64_BIT_INODE=1' '-D_LARGEFILE_SOURCE' '-D_FILE_OFFSET_BITS=64' '-DBUILDING_NODE_EXTENSION' -I/Users/cody.mello/.node-gyp/7.5.0/include/node -I/Users/cody.mello/.node-gyp/7.5.0/src -I/Users/cody.mello/.node-gyp/7.5.0/deps/uv/include -I/Users/cody.mello/.node-gyp/7.5.0/deps/v8/include -I../libusdt -I../../nan -Os -gdwarf-2 -mmacosx-version-min=10.7 -arch x86_64 -Wall -Wendif-labels -W -Wno-unused-parameter -std=gnu++0x -stdlib=libc++ -fno-rtti -fno-exceptions -fno-threadsafe-statics -fno-strict-aliasing -MMD -MF ./Release/.deps/Release/obj.target/DTraceProviderBindings/dtrace_argument.o.d.raw -c -o Release/obj.target/DTraceProviderBindings/dtrace_argument.o ../dtrace_argument.cc
c++ -bundle -undefined dynamic_lookup -Wl,-no_pie -Wl,-search_paths_first -mmacosx-version-min=10.7 -arch x86_64 -L./Release -stdlib=libc++ -o Release/DTraceProviderBindings.node Release/obj.target/DTraceProviderBindings/dtrace_provider.o Release/obj.target/DTraceProviderBindings/dtrace_probe.o Release/obj.target/DTraceProviderBindings/dtrace_argument.o -L/Users/cody.mello/src/node-bunyan/node_modules/dtrace-provider/libusdt -l usdt
ld: warning: object file (/Users/cody.mello/src/node-bunyan/node_modules/dtrace-provider/libusdt/libusdt.a(usdt.o)) was built for newer OSX version (10.12) than being linked (10.7)
ld: warning: object file (/Users/cody.mello/src/node-bunyan/node_modules/dtrace-provider/libusdt/libusdt.a(usdt_dof_file.o)) was built for newer OSX version (10.12) than being linked (10.7)
ld: warning: object file (/Users/cody.mello/src/node-bunyan/node_modules/dtrace-provider/libusdt/libusdt.a(usdt_dof_sections.o)) was built for newer OSX version (10.12) than being linked (10.7)
ld: warning: object file (/Users/cody.mello/src/node-bunyan/node_modules/dtrace-provider/libusdt/libusdt.a(usdt_dof.o)) was built for newer OSX version (10.12) than being linked (10.7)
ld: warning: object file (/Users/cody.mello/src/node-bunyan/node_modules/dtrace-provider/libusdt/libusdt.a(usdt_probe.o)) was built for newer OSX version (10.12) than being linked (10.7)
ld: warning: object file (/Users/cody.mello/src/node-bunyan/node_modules/dtrace-provider/libusdt/libusdt.a(usdt_tracepoints.o)) was built for newer OSX version (10.12) than being linked (10.7)
It's possible that you need to agree to the XCode license, like in this comment.
@felipekm it works for me, thank you so much.
my os is macOS 10.12.3
hexo version info:hexo: 3.2.2
hexo-cli: 1.0.2
os: Darwin 16.4.0 darwin x64
http_parser: 2.7.0
node: 6.10.0
v8: 5.1.281.93
uv: 1.9.1
zlib: 1.2.8
ares: 1.10.1-DEV
icu: 58.2
modules: 48
openssl: 1.0.2k
https://github.com/trentm/node-bunyan/issues/216#issuecomment-265519550 fixed it for me also
fwiw, pino, a bunyan-inspired alternative, does not have this issue.
Pino facts:
If you need the Dtrace fanciness, then def. stick with bunyan. If you're running into this issue over and over, and don't need the Dtrace fanciness, then it might be that bunyan isn't the best logger for your use case.
What @melloc said in https://github.com/trentm/node-bunyan/issues/216#issuecomment-279178710 about likely being the result of a failure to build the binary part of dtrace-provider when that module was installed.
Then when bunyan.js does require('dtrace-provider') we get stderr warnings from: https://github.com/chrisa/node-dtrace-provider/blob/a1594b0ea17b6ba2329b0bf4160e91c892777004/dtrace-provider.js#L13-L29
However, that doesn't quite match up with the quoted errors from this comment: https://github.com/trentm/node-bunyan/issues/216#issuecomment-256996494 where we see:
{ Error: Cannot find module './build/Release/DTraceProviderBindings'
...
{ Error: Cannot find module './build/default/DTraceProviderBindings'
...
{ Error: Cannot find module './build/Release/DTraceProviderBindings'
...
{ Error: Cannot find module './build/default/DTraceProviderBindings'
...
I.e. we see warnings from the "Release", then "default", then "Release", then "default". Given the code has:
var builds = ['Release', 'default', 'Debug'];
It feels like we are succeeding to import a debug build at "./build/Debug/DTraceProviderBindings" and also that we are requiring dtrace-provider from two different places.
Some thoughts:
In my case, the problem was python 3.5. Using the --python option to point to python 2.7 solves the issue.
One more case of Python 3.5 on macOS Sierra. Required python version is 2.7
pyenv global 2.7.12
solved my issue
OP doesn't care so I'm unsubscribing
I still have the terrible error.
node v7.9.0
What ended up working for me was:
npm install dtrace-provider
Not sure why I had to do this though.
Getting a similar issue here and adding @protomock your work around doesn't work for me. π
Error log
{ Error: Cannot find module './build/Release/DTraceProviderBindings'
at Function.Module._resolveFilename (module.js:470:15)
at Function.Module._load (module.js:418:25)
at Module.require (module.js:498:17)
at require (internal/module.js:20:19)
at Object.<anonymous> (/Users/xo/code/bitcannon-web/node_modules/dtrace-provider/dtrace-provider.js:17:23)
at Module._compile (module.js:571:32)
at Module._extensions..js (module.js:580:10)
at Object.require.extensions.(anonymous function) [as .js] (/Users/xo/code/bitcannon-web/node_modules/babel-register/lib/node.js:152:7)
at Module.load (module.js:488:32)
at tryModuleLoad (module.js:447:12)
at Function.Module._load (module.js:439:3)
at Module.require (module.js:498:17)
at require (internal/module.js:20:19)
at Object.<anonymous> (/Users/xo/code/bitcannon-web/node_modules/bunyan/lib/bunyan.js:79:18)
at Module._compile (module.js:571:32)
at Module._extensions..js (module.js:580:10)
at Object.require.extensions.(anonymous function) [as .js] (/Users/xo/code/bitcannon-web/node_modules/babel-register/lib/node.js:152:7) code: 'MODULE_NOT_FOUND' }
{ Error: Cannot find module './build/default/DTraceProviderBindings'
at Function.Module._resolveFilename (module.js:470:15)
at Function.Module._load (module.js:418:25)
at Module.require (module.js:498:17)
at require (internal/module.js:20:19)
at Object.<anonymous> (/Users/xo/code/bitcannon-web/node_modules/dtrace-provider/dtrace-provider.js:17:23)
at Module._compile (module.js:571:32)
at Module._extensions..js (module.js:580:10)
at Object.require.extensions.(anonymous function) [as .js] (/Users/xo/code/bitcannon-web/node_modules/babel-register/lib/node.js:152:7)
at Module.load (module.js:488:32)
at tryModuleLoad (module.js:447:12)
at Function.Module._load (module.js:439:3)
at Module.require (module.js:498:17)
at require (internal/module.js:20:19)
at Object.<anonymous> (/Users/xo/code/bitcannon-web/node_modules/bunyan/lib/bunyan.js:79:18)
at Module._compile (module.js:571:32)
at Module._extensions..js (module.js:580:10)
at Object.require.extensions.(anonymous function) [as .js] (/Users/xo/code/bitcannon-web/node_modules/babel-register/lib/node.js:152:7) code: 'MODULE_NOT_FOUND' }
{ Error: Cannot find module './build/Debug/DTraceProviderBindings'
at Function.Module._resolveFilename (module.js:470:15)
at Function.Module._load (module.js:418:25)
at Module.require (module.js:498:17)
at require (internal/module.js:20:19)
at Object.<anonymous> (/Users/xo/code/bitcannon-web/node_modules/dtrace-provider/dtrace-provider.js:17:23)
at Module._compile (module.js:571:32)
at Module._extensions..js (module.js:580:10)
at Object.require.extensions.(anonymous function) [as .js] (/Users/xo/code/bitcannon-web/node_modules/babel-register/lib/node.js:152:7)
at Module.load (module.js:488:32)
at tryModuleLoad (module.js:447:12)
at Function.Module._load (module.js:439:3)
at Module.require (module.js:498:17)
at require (internal/module.js:20:19)
at Object.<anonymous> (/Users/xo/code/bitcannon-web/node_modules/bunyan/lib/bunyan.js:79:18)
at Module._compile (module.js:571:32)
at Module._extensions..js (module.js:580:10)
at Object.require.extensions.(anonymous function) [as .js] (/Users/xo/code/bitcannon-web/node_modules/babel-register/lib/node.js:152:7) code: 'MODULE_NOT_FOUND' }
Looks like yarn doesn't work with --python. π
I'm getting this same issue with [email protected] and [email protected]. I tried to remove my node_modules and install again but that didn't fix the problem. Any suggestions?
+1
$python --version
Python 2.7.10
GNWRALA2063193:demo 430014695
$node -v
v6.11.0
GNWRALA2063193:demo 430014695
$npm -v
3.10.10
{ Error: Cannot find module './build/Release/DTraceProviderBindings'
at Function.Module._resolveFilename (module.js:472:15)
at Function.Module._load (module.js:420:25)
at Module.require (module.js:500:17)
at require (internal/module.js:20:19)
at Object.<anonymous> (/Users/Edgar/Repos/fintech-hackathon/node_modules/bunyan/node_modules/dtrace-provider/dtrace-provider.js:17:23)
at Module._compile (module.js:573:32)
at Object.Module._extensions..js (module.js:582:10)
at Module.load (module.js:490:32)
at tryModuleLoad (module.js:449:12)
at Function.Module._load (module.js:441:3) code: 'MODULE_NOT_FOUND' }
{ Error: Cannot find module './build/default/DTraceProviderBindings'
at Function.Module._resolveFilename (module.js:472:15)
at Function.Module._load (module.js:420:25)
at Module.require (module.js:500:17)
at require (internal/module.js:20:19)
at Object.<anonymous> (/Users/Edgar/Repos/fintech-hackathon/node_modules/bunyan/node_modules/dtrace-provider/dtrace-provider.js:17:23)
at Module._compile (module.js:573:32)
at Object.Module._extensions..js (module.js:582:10)
at Module.load (module.js:490:32)
at tryModuleLoad (module.js:449:12)
at Function.Module._load (module.js:441:3) code: 'MODULE_NOT_FOUND' }
{ Error: Cannot find module './build/Release/DTraceProviderBindings'
at Function.Module._resolveFilename (module.js:472:15)
at Function.Module._load (module.js:420:25)
at Module.require (module.js:500:17)
at require (internal/module.js:20:19)
at Object.<anonymous> (/Users/Edgar/Repos/fintech-hackathon/node_modules/dtrace-provider/dtrace-provider.js:17:23)
at Module._compile (module.js:573:32)
at Object.Module._extensions..js (module.js:582:10)
at Module.load (module.js:490:32)
at tryModuleLoad (module.js:449:12)
I know this is an old issue but I wanted to comment on it in case anyone else has the same issue I had.
My issue was caused by having parentheses in my path.
/users/karlgroves/Dropbox (Personal)/foo/bar/bat/project...
Moving the project to a path without the parens worked for me.
You'll need to wipe out node_modules and reinstall again.
@karlgroves That's a bug in node-gyp, which will be fixed once I finish cleaning up nodejs/node-gyp#1277, and find a Windows machine to test it on.
I was able to resolve this by downloading python 2.7.12 with pyenv by running
CFLAGS="-I$(xcrun --show-sdk-path)/usr/include" pyenv install -v 2.7.12
and then pyenv global 2.7.12, rm -rf node_modules, npm i and the problem was resolved for me.
What worked for me was to re-install node-gyp globally as per https://github.com/yarnpkg/yarn/issues/1915#issuecomment-336789760
yarn global add node-gyp
rm -rf node_modules yarn.lock
yarn install
Then these dtrace warning messages went away
My solution was rm -rf node_modules/dtrace-provider in the package that relies on bunyan.
{ Error: Cannot find module './build/Release/DTraceProviderBindings'
at Function.Module._resolveFilename (module.js:489:15)
at Function.Module._load (module.js:439:25)
at Module.require (module.js:517:17)
at require (internal/module.js:11:18)
at Object.<anonymous> (/Users/yuval/proj/node_modules/dtrace-provider/dtrace-provider.js:18:23)
at Module._compile (module.js:573:30)
at Object.Module._extensions..js (module.js:584:10)
at Module.load (module.js:507:32)
at tryModuleLoad (module.js:470:12)
at Function.Module._load (module.js:462:3)
at Module.require (module.js:517:17)
at require (internal/module.js:11:18)
at Object.<anonymous> (/Users/yuval/proj/node_modules/bunyan/lib/bunyan.js:79:18)
amazingοΌ:sunglasses: rm -rf node_modules/ && npm install --no-optional works for meοΌ cool!
Hi, I think this is the version of node js that causes this issue.
I met this issue after I updated my node from v6.10.0 to v8.1.3.
Here is my solution in my MaxOS:
Firstly I'm using nvm to manage the version of node.js.
Under the version v8.1.1.3, I use $nvm use v6.10.0 to turn my node version back.
Then I took the solution of @felipekm ,
under the root of my hexo project
$ rm -rf node_modules (to remove the previous node_modules directory)
then,
$ npm install --no-optional (to install a new node_modules directory based on the v6.10.0 version node)
As of [email protected], this message will no longer be printed to stderr at runtime, and the stub implementation will be used instead. If you want to use bunyan -p or write your own DTrace scripts to process Bunyan logs, then you can set NODE_DTRACE_PROVIDER_REQUIRE=hard during installation to force the build to fail and see why it failed. For example:
$ NODE_DTRACE_PROVIDER_REQUIRE=hard npm install
There is a list of common failure reasons in dtrace-provider's README. Please take a look there, throughout this ticket, and at trentm/node-bunyan#525 first before opening any bugs.
amazingοΌπ rm -rf node_modules/ && npm install --no-optional works for meοΌ cool!
This worked for me.
Most helpful comment
@geakstr @bennybennet Did you try removing your node-modules folders first?
rm -rf node_modules/ && npm install --no-optionalThe reason you are seeing this error is because
node-bunyanusesdtrace-provideras an optional dependency which is not supported for mac os x.IMHO This issue should probably be closed. It's not a problem with
node-bunyan, more an issue with the fact thatnpminstalls optional dependencies by default.