opentracing / opentracing-javascript

OpenTracing API for Javascript (both Node and browser). 🛑 This library is DEPRECATED! https://github.com/opentracing/specification/issues/163
http://opentracing.io
Apache License 2.0
1.09k stars 108 forks source link

lodash does not get loaded when installing via npm install #95

Closed AloisReitbauer closed 6 years ago

AloisReitbauer commented 6 years ago

When running the example I get the following error:

npm run example

> opentracing@0.14.1 example /Users/cwat-areitbau/workspace/attic/node_modules/opentracing
> node lib/examples/demo/demo.js

module.js:471
    throw err;
    ^

Error: Cannot find module 'lodash'
    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> (/Users/cwat-areitbau/workspace/attic/node_modules/opentracing/lib/mock_tracer/mock_span.js:14:9)
    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)

npm ERR! Darwin 17.4.0
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "run" "example"
npm ERR! node v6.9.5
npm ERR! npm  v3.10.10
npm ERR! code ELIFECYCLE
npm ERR! opentracing@0.14.1 example: `node lib/examples/demo/demo.js`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the opentracing@0.14.1 example script 'node lib/examples/demo/demo.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 opentracing package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node lib/examples/demo/demo.js
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs opentracing
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls opentracing
npm ERR! There is likely additional logging output above.
npm WARN Local package.json exists, but node_modules missing, did you mean to install?

npm ERR! Please include the following file with any support request:
npm ERR!     /Users/cwat-areitbau/workspace/attic/node_modules/opentracing/npm-debug.log
AloisReitbauer commented 6 years ago

I checked the package.json file and there is no dependency to lodash

"dependencies": {},

rochdev commented 6 years ago

Just got bit by this as well. It's basically the same issue as https://github.com/opentracing/opentracing-javascript/issues/75 but with lodash now. I think the best course of action is again to simply remove lodash as it is only used in a couple places to do things that can be done directly with pure JS.

yurishkuro commented 6 years ago

+1 - can someone add a PR?