opentracing-contrib / javascript-express

OpenTracing middleware for express
Apache License 2.0
39 stars 20 forks source link

Error: Cannot find module 'express-opentracing' #5

Closed nutchalum closed 6 years ago

nutchalum commented 6 years ago

Cannot use module after npm install express-opentracing

Part of error log

Error: Cannot find module 'express-opentracing'
    at Function.Module._resolveFilename (module.js:536:15)
    at Function.Module._load (module.js:466:25)
    at Module.require (module.js:579:17)
    at require (internal/module.js:11:18)

How to reproduce

#in cli
npm install express-opentracing --save

#in application code
require('express-opentracing')

Take a look at package.json where main key is.

{
     .
     .
    "main": "dist/index.js"
     .
     .
     .
}

We don't have dist folder here, Maybe src?

nutchalum commented 6 years ago

So I've take a look more about this. It seems like I have to build it first via npm run build because it needs babel So why dist folder is not include in the repository?

rnburn commented 6 years ago

Thanks. It should be fixed now.