hughsk / envify

:wrench: Selectively replace Node-style environment variables with plain strings.
901 stars 57 forks source link

Unable to run from node_modules/.bin folder #50

Closed davidbarton closed 4 years ago

davidbarton commented 8 years ago

Hello, I can't run envify from node_modules/.bin folder. Throwing this error. Can you please take a look what might be wrong

Error: Unexpected object exported by the "/home/user/Code/frontend/node_modules/.bin/envify" package. Expected a transform function.
    at nr (/home/user/Code/frontend/node_modules/module-deps/index.js:291:27)
    at onfile (/home/user/Code/frontend/node_modules/resolve/lib/async.js:51:21)
    at onex (/home/user/Code/frontend/node_modules/resolve/lib/async.js:93:22)
    at /home/user/Code/frontend/node_modules/resolve/lib/async.js:24:18
    at FSReqWrap.oncomplete (fs.js:123:15)

Here is how to reproduce

npm init -y
npm i --save envify browserify
touch app.js
./node_modules/.bin/browserify app.js -t ./node_modules/.bin/envify > bundle.js