chrisa / node-dtrace-provider

Native DTrace probes for node.js apps
Other
319 stars 70 forks source link

error #88

Closed ifgyong closed 6 years ago

ifgyong commented 7 years ago
{ Error: Cannot find module './build/Release/DTraceProviderBindings'
    at Function.Module._resolveFilename (module.js:469:15)
    at Function.Module._load (module.js:417:25)
    at Module.require (module.js:497:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> (/usr/local/lib/node_modules/hexo-cli/node_modules/dtrace-provider/dtrace-provider.js:17:23)
    at Module._compile (module.js:570:32)
    at Object.Module._extensions..js (module.js:579:10)
    at Module.load (module.js:487:32)
    at tryModuleLoad (module.js:446:12)
    at Function.Module._load (module.js:438:3)
    at Module.require (module.js:497:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> (/usr/local/lib/node_modules/hexo-cli/node_modules/bunyan/lib/bunyan.js:79:18)
    at Module._compile (module.js:570:32)
    at Object.Module._extensions..js (module.js:579:10)
    at Module.load (module.js:487:32) code: 'MODULE_NOT_FOUND' }
{ Error: Cannot find module './build/default/DTraceProviderBindings'
    at Function.Module._resolveFilename (module.js:469:15)
    at Function.Module._load (module.js:417:25)
    at Module.require (module.js:497:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> (/usr/local/lib/node_modules/hexo-cli/node_modules/dtrace-provider/dtrace-provider.js:17:23)
    at Module._compile (module.js:570:32)
    at Object.Module._extensions..js (module.js:579:10)
    at Module.load (module.js:487:32)
    at tryModuleLoad (module.js:446:12)
    at Function.Module._load (module.js:438:3)
    at Module.require (module.js:497:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> (/usr/local/lib/node_modules/hexo-cli/node_modules/bunyan/lib/bunyan.js:79:18)
    at Module._compile (module.js:570:32)
    at Object.Module._extensions..js (module.js:579:10)
    at Module.load (module.js:487:32) code: 'MODULE_NOT_FOUND' }
{ Error: Cannot find module './build/Debug/DTraceProviderBindings'
    at Function.Module._resolveFilename (module.js:469:15)
    at Function.Module._load (module.js:417:25)
    at Module.require (module.js:497:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> (/usr/local/lib/node_modules/hexo-cli/node_modules/dtrace-provider/dtrace-provider.js:17:23)
    at Module._compile (module.js:570:32)
    at Object.Module._extensions..js (module.js:579:10)
    at Module.load (module.js:487:32)
    at tryModuleLoad (module.js:446:12)
    at Function.Module._load (module.js:438:3)
    at Module.require (module.js:497:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> (/usr/local/lib/node_modules/hexo-cli/node_modules/bunyan/lib/bunyan.js:79:18)
    at Module._compile (module.js:570:32)
    at Object.Module._extensions..js (module.js:579:10)
    at Module.load (module.js:487:32) code: 'MODULE_NOT_FOUND' }

info:
hexo: 3.2.2
hexo-cli: 1.0.2
os: Darwin 15.5.0 darwin x64
http_parser: 2.7.0
node: 6.9.1
v8: 5.1.281.84
uv: 1.9.1
zlib: 1.2.8
ares: 1.10.1-DEV
icu: 57.1
modules: 48
openssl: 1.0.2j

这个怎么改才能正常不弹出来错误信息呢?
davepacheco commented 7 years ago

Can you paste the output of the build process (whatever "npm install" got you here)?

ifgyong commented 7 years ago

` npm install node npm WARN deprecated node@0.0.0: To update or install node, go to http://nodejs.org/

dtrace-provider@0.8.0 install /Users/Jerry/Desktop/hexoDemo/hexogithub/node_modules/dtrace-provider node scripts/install.js

hexo-site@0.0.0 /Users/Jerry/Desktop/hexoDemo/hexogithub ├─┬ hexo@3.2.2 │ ├─┬ cheerio@0.20.0 │ │ └─┬ jsdom@7.2.2 │ │ ├── abab@1.0.3 │ │ ├── acorn@2.7.0 │ │ ├── acorn-globals@1.0.9 │ │ ├── cssom@0.3.1 │ │ ├── cssstyle@0.2.37 │ │ ├─┬ escodegen@1.8.1 │ │ │ ├── estraverse@1.9.3 │ │ │ ├── esutils@2.0.2 │ │ │ ├─┬ optionator@0.8.2 │ │ │ │ ├── deep-is@0.1.3 │ │ │ │ ├── fast-levenshtein@2.0.5 │ │ │ │ ├── levn@0.3.0 │ │ │ │ ├── prelude-ls@1.1.2 │ │ │ │ ├── type-check@0.3.2 │ │ │ │ └── wordwrap@1.0.0 │ │ │ └── source-map@0.2.0 │ │ ├── nwmatcher@1.3.9 │ │ ├── parse5@1.5.1 │ │ ├─┬ request@2.79.0 │ │ │ ├── aws-sign2@0.6.0 │ │ │ ├── aws4@1.5.0 │ │ │ ├── caseless@0.11.0 │ │ │ ├─┬ combined-stream@1.0.5 │ │ │ │ └── delayed-stream@1.0.0 │ │ │ ├── extend@3.0.0 │ │ │ ├── forever-agent@0.6.1 │ │ │ ├─┬ form-data@2.1.2 │ │ │ │ ├── asynckit@0.4.0 │ │ │ │ └─┬ mime-types@2.1.13 │ │ │ │ └── mime-db@1.25.0 │ │ │ ├─┬ har-validator@2.0.6 │ │ │ │ ├─┬ commander@2.9.0 │ │ │ │ │ └── graceful-readlink@1.0.1 │ │ │ │ ├─┬ is-my-json-valid@2.15.0 │ │ │ │ │ ├── generate-function@2.0.0 │ │ │ │ │ ├─┬ generate-object-property@1.2.0 │ │ │ │ │ │ └── is-property@1.0.2 │ │ │ │ │ ├── jsonpointer@4.0.0 │ │ │ │ │ └── xtend@4.0.1 │ │ │ │ └─┬ pinkie-promise@2.0.1 │ │ │ │ └── pinkie@2.0.4 │ │ │ ├─┬ hawk@3.1.3 │ │ │ │ ├── boom@2.10.1 │ │ │ │ ├── cryptiles@2.0.5 │ │ │ │ ├── hoek@2.16.3 │ │ │ │ └── sntp@1.0.9 │ │ │ ├─┬ http-signature@1.1.1 │ │ │ │ ├── assert-plus@0.2.0 │ │ │ │ ├─┬ jsprim@1.3.1 │ │ │ │ │ ├── extsprintf@1.0.2 │ │ │ │ │ ├── json-schema@0.2.3 │ │ │ │ │ └── verror@1.3.6 │ │ │ │ └─┬ sshpk@1.10.1 │ │ │ │ ├── asn1@0.2.3 │ │ │ │ ├── assert-plus@1.0.0 │ │ │ │ ├── bcrypt-pbkdf@1.0.0 │ │ │ │ ├─┬ dashdash@1.14.0 │ │ │ │ │ └── assert-plus@1.0.0 │ │ │ │ ├── ecc-jsbn@0.1.1 │ │ │ │ ├─┬ getpass@0.1.6 │ │ │ │ │ └── assert-plus@1.0.0 │ │ │ │ ├── jodid25519@1.0.2 │ │ │ │ ├── jsbn@0.1.0 │ │ │ │ └── tweetnacl@0.14.3 │ │ │ ├── is-typedarray@1.0.0 │ │ │ ├── isstream@0.1.2 │ │ │ ├── json-stringify-safe@5.0.1 │ │ │ ├── oauth-sign@0.8.2 │ │ │ ├── qs@6.3.0 │ │ │ ├── stringstream@0.0.5 │ │ │ ├── tunnel-agent@0.4.3 │ │ │ └── uuid@3.0.0 │ │ ├── sax@1.2.1 │ │ ├── symbol-tree@3.1.4 │ │ ├─┬ tough-cookie@2.3.2 │ │ │ └── punycode@1.4.1 │ │ ├── webidl-conversions@2.0.1 │ │ ├─┬ whatwg-url-compat@0.6.5 │ │ │ └── tr46@0.0.3 │ │ └── xml-name-validator@2.0.1 │ └─┬ hexo-log@0.1.2 │ └─┬ bunyan@1.8.5 │ ├─┬ dtrace-provider@0.8.0 │ │ └── nan@2.4.0 │ ├─┬ mv@2.1.1 │ │ ├── ncp@2.0.0 │ │ └─┬ rimraf@2.4.5 │ │ └─┬ glob@6.0.4 │ │ ├─┬ inflight@1.0.6 │ │ │ └── wrappy@1.0.2 │ │ └── once@1.4.0 │ └── safe-json-stringify@1.0.3 └── node@0.0.0 `

davepacheco commented 7 years ago

That does not appear to be output from "npm install".

If you end up running it again, can you set V=1 in the environment to get verbose output?

ifgyong commented 7 years ago

npm install what ? npm install node-dtrace-provider? again?

davepacheco commented 7 years ago

Whatever it is that you installed that pulled in dtrace-provider. It's not the same as installing dtrace-provider because it may requesting a different version.

ifgyong commented 7 years ago
ok,what should i do ?
i am a    novice.,
pl give me codes,thanks.
ifgyong commented 7 years ago
Yong-MacBook-Pro:dtrace-provider Yong$ node ./scripts/install.js V=1
fs.js:809
  return binding.rename(pathModule._makeLong(oldPath),
                 ^

Error: ENOENT: no such file or directory, rename '/Users/Jerry/Desktop/hexoDemo/hexogithub/node_modules/dtrace-provider/compile.py' -> '/Users/Jerry/Desktop/hexoDemo/hexogithub/node_modules/dtrace-provider/binding.gyp'
    at Error (native)
    at Object.fs.renameSync (fs.js:809:18)
    at Object.<anonymous> (/Users/Jerry/Desktop/hexoDemo/hexogithub/node_modules/dtrace-provider/scripts/install.js:14:4)
    at Module._compile (module.js:570:32)
    at Object.Module._extensions..js (module.js:579:10)
    at Module.load (module.js:487:32)
    at tryModuleLoad (module.js:446:12)
    at Function.Module._load (module.js:438:3)
    at Module.runMain (module.js:604:10)
    at run (bootstrap_node.js:394:7)
davepacheco commented 7 years ago

It looks like you ran into this by trying to install hexo-cli somewhere. What would be useful is something like this:

$ mkdir testdir
$ cd testdir
$ V=1 npm install hexo-cli
ifgyong commented 7 years ago
Yong-MacBook-Pro:hexogithub Yong$ V=1 npm install hexo-cli
hexo-site@0.0.0 /Users/Jerry/Desktop/hexoDemo/hexogithub
└─┬ hexo-cli@1.0.2
  ├── bluebird@3.4.6
  ├─┬ chalk@1.1.3
  │ └── ansi-styles@2.2.1
  └── object-assign@4.1.0

but when I run hexo clean

Yong-MacBook-Pro:hexogithub Yong$ hexo clean
{ Error: Cannot find module './build/Release/DTraceProviderBindings'
    at Function.Module._resolveFilename (module.js:469:15)
    at Function.Module._load (module.js:417:25)
    at Module.require (module.js:497:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> (/usr/local/lib/node_modules/hexo-cli/node_modules/dtrace-provider/dtrace-provider.js:17:23)
    at Module._compile (module.js:570:32)
    at Object.Module._extensions..js (module.js:579:10)
    at Module.load (module.js:487:32)
    at tryModuleLoad (module.js:446:12)
    at Function.Module._load (module.js:438:3)
    at Module.require (module.js:497:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> (/usr/local/lib/node_modules/hexo-cli/node_modules/bunyan/lib/bunyan.js:79:18)
    at Module._compile (module.js:570:32)
    at Object.Module._extensions..js (module.js:579:10)
    at Module.load (module.js:487:32) code: 'MODULE_NOT_FOUND' }
{ Error: Cannot find module './build/default/DTraceProviderBindings'
    at Function.Module._resolveFilename (module.js:469:15)
    at Function.Module._load (module.js:417:25)
    at Module.require (module.js:497:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> (/usr/local/lib/node_modules/hexo-cli/node_modules/dtrace-provider/dtrace-provider.js:17:23)
    at Module._compile (module.js:570:32)
    at Object.Module._extensions..js (module.js:579:10)
    at Module.load (module.js:487:32)
    at tryModuleLoad (module.js:446:12)
    at Function.Module._load (module.js:438:3)
    at Module.require (module.js:497:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> (/usr/local/lib/node_modules/hexo-cli/node_modules/bunyan/lib/bunyan.js:79:18)
    at Module._compile (module.js:570:32)
    at Object.Module._extensions..js (module.js:579:10)
    at Module.load (module.js:487:32) code: 'MODULE_NOT_FOUND' }
{ Error: Cannot find module './build/Debug/DTraceProviderBindings'
    at Function.Module._resolveFilename (module.js:469:15)
    at Function.Module._load (module.js:417:25)
    at Module.require (module.js:497:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> (/usr/local/lib/node_modules/hexo-cli/node_modules/dtrace-provider/dtrace-provider.js:17:23)
    at Module._compile (module.js:570:32)
    at Object.Module._extensions..js (module.js:579:10)
    at Module.load (module.js:487:32)
    at tryModuleLoad (module.js:446:12)
    at Function.Module._load (module.js:438:3)
    at Module.require (module.js:497:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> (/usr/local/lib/node_modules/hexo-cli/node_modules/bunyan/lib/bunyan.js:79:18)
    at Module._compile (module.js:570:32)
    at Object.Module._extensions..js (module.js:579:10)
    at Module.load (module.js:487:32) code: 'MODULE_NOT_FOUND' }
INFO  Deleted database.
INFO  Deleted public folder.
melloc commented 6 years ago

With dtrace-provider@0.8.6, these error messages will no longer be printed, and the fallback stub implementation will be used instead. If you do want to use the native binding, please try running the following and reopen the ticket with the output:

$ NODE_DTRACE_PROVIDER_REQUIRE=hard npm install