inxilpro / node-app-root-path

Determine the root path to your project
MIT License
604 stars 29 forks source link

Browser Shim Error #22

Closed rafegoldberg closed 6 years ago

rafegoldberg commented 7 years ago

app-root-path throws an error when I try to use it with Browserify:

Uncaught TypeError: Cannot read property 'filename' of undefined
    at Object.require.48.path (browser-shim.js:3)
    at s (_prelude.js:1)
    at _prelude.js:1
    at Object.require.13.Vendor (product.js:9)
    at s (_prelude.js:1)
    at _prelude.js:1
    at Object.require.379.Vendor (product.js:16)
    at s (_prelude.js:1)
    at e (_prelude.js:1)
    at _prelude.js:1

Might this be related to customizing the Browserify paths option?

Bluebie commented 4 years ago

hey why did this issue get closed? is there some way to work around it? i'm experiencing it and pretty confused while trying to use app-root-path, which has a browser shim that tries to use require.main.filename