TooTallNate / node-bindings

Helper module for loading your native module's `.node` file
MIT License
412 stars 95 forks source link

Can't resolve 'fs' #44

Closed sgehrman closed 6 years ago

sgehrman commented 6 years ago

I'm using a package that includes node-hid which includes bindings, and I get this:

How can I fix this?

ERROR in ./node_modules/bindings/bindings.js Module not found: Error: Can't resolve 'fs' in 'f:\Github\stellar-client-web\node_modules\bindings' @ ./node_modules/bindings/bindings.js 6:9-22 @ ./node_modules/node-hid/nodehid.js @ ./node_modules/@ledgerhq/hw-transport-node-hid/lib/TransportNodeHid.js @ ./node_modules/stellar-js-utils/dist/build.js @ ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib/selector.js?type=script&index=0!./src/pages/CreateToken.vue @ ./src/pages/CreateToken.vue @ ./src/libEntry.js @ ./src/entry.js @ multi (webpack)-dev-server/client?http://localhost:8080 webpack/hot/dev-server ./src/entry.js

WARNING in ./node_modules/bindings/bindings.js 81:22-40 Critical dependency: the request of a dependency is an expression @ ./node_modules/bindings/bindings.js @ ./node_modules/node-hid/nodehid.js @ ./node_modules/@ledgerhq/hw-transport-node-hid/lib/TransportNodeHid.js @ ./node_modules/stellar-js-utils/dist/build.js @ ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib/selector.js?type=script&index=0!./src/pages/CreateToken.vue @ ./src/pages/CreateToken.vue @ ./src/libEntry.js @ ./src/entry.js @ multi (webpack)-dev-server/client?http://localhost:8080 webpack/hot/dev-server ./src/entry.js

WARNING in ./node_modules/bindings/bindings.js 81:43-53 Critical dependency: the request of a dependency is an expression @ ./node_modules/bindings/bindings.js @ ./node_modules/node-hid/nodehid.js @ ./node_modules/@ledgerhq/hw-transport-node-hid/lib/TransportNodeHid.js @ ./node_modules/stellar-js-utils/dist/build.js @ ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib/selector.js?type=script&index=0!./src/pages/CreateToken.vue @ ./src/pages/CreateToken.vue @ ./src/libEntry.js @ ./src/entry.js @ multi (webpack)-dev-server/client?http://localhost:8080 webpack/hot/dev-server ./src/entry.js

sgehrman commented 6 years ago

nevermind, just a webpack warning issue.

junbinku commented 6 years ago

node: { fs: 'empty', net: 'empty', tls: 'empty', },

on webpack.config