Uncaught TypeError: exists is not a function
See original GitHub issueI’m trying to include node-ffi in a simple webpack app.
Uncaught TypeError: exists is not a function
at Function.getRoot (bundle.js:19867)
at bindings (bundle.js:19769)
at Object.<anonymous> (bundle.js:3045)
at Object.<anonymous> (bundle.js:4503)
at __webpack_require__ (bundle.js:1303)
at fn (bundle.js:726)
at Object.exports.byteLength (bundle.js:39099)
at __webpack_require__ (bundle.js:1303)
at fn (bundle.js:726)
at Object.<anonymous> (bundle.js:39072)
I’m fairly certain this is because of an earlier problem I was having with webpack:
ERROR in ./node_modules/ffi/node_modules/bindings/bindings.js
Module not found: Error: Can't resolve 'fs' in '/Users/ethan/Projects/PolyWrite/node_modules/ffi/node_modules/bindings'
@ ./node_modules/ffi/node_modules/bindings/bindings.js 6:9-22
@ ./node_modules/ffi/lib/bindings.js
@ ./node_modules/ffi/lib/ffi.js
@ ./javascript/app/components/Header.js
@ ./javascript/app/App.js
@ ./javascript/start.js
@ multi (webpack)-dev-server/client?http://localhost:8080 webpack/hot/dev-server ./javascript/start.js ./styles/main.scss
ERROR in ./node_modules/ffi/node_modules/ref/node_modules/bindings/bindings.js
Module not found: Error: Can't resolve 'fs' in '/Users/ethan/Projects/PolyWrite/node_modules/ffi/node_modules/ref/node_modules/bindings'
@ ./node_modules/ffi/node_modules/ref/node_modules/bindings/bindings.js 6:9-22
@ ./node_modules/ffi/node_modules/ref/lib/ref.js
@ ./node_modules/ffi/lib/ffi.js
@ ./javascript/app/components/Header.js
@ ./javascript/app/App.js
@ ./javascript/start.js
@ multi (webpack)-dev-server/client?http://localhost:8080 webpack/hot/dev-server ./javascript/start.js ./styles/main.scss
My solution to this was to add these lines to the webpack.config.js:
node: {
fs: 'empty',
},
So now I don’t know where to go from here. I appreciate any help.
Issue Analytics
- State:
- Created 6 years ago
- Reactions:1
- Comments:5 (1 by maintainers)
Top Results From Across the Web
Uncaught TypeError: exists is not a function #1501 - GitHub
I just imported sharp in my react project then it returns this error Uncaught TypeError: exists is not a function Function.
Read more >exists is not a function when attempting to use serial port in ...
1 Answer 1 · I take this mistake : Uncaught TypeError: exists is not a function at Function. · are you calling a...
Read more >Uncaught TypeError: exists is not a function - Google Groups
when working with modules Ceylon from JavaScript the program is running normally but in the console occurs error: Uncaught TypeError: exists is not...
Read more >How to Handle JavaScript Uncaught TypeError: “x” is Not a ...
The Javascript TypeError: "x" is not a function occurs when calling a function on a value or object, which is not actually a...
Read more >TypeError: exists not a function - help - Meteor forums
I just started getting this error, it's breaking my routing but I'm not sure where I need to start looking for troubleshooting it,...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
It eventually ended up running when I tried it without webpack. I don’t think they work very well together, unfortunately. Good luck!
whats the solution of this ? i am also having this issue