How do I get this working with NW.js? #1441
Unanswered
prominentdetail
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I downloaded the v2 (because I couldn't figure out how to get the v3 working) and put the files from the .zip in a node_modules folder, but I'm getting this error:
Uncaught Error: Cannot find module 'pathtomyapp\node_modules\node-fetch\lib\index.js'. Please verify that the package.json has a valid "main" entry
In my code I use: global.fetch = require('node-fetch');
How can I get it imported in NW.js? I don't want to use npm, because I want to distribute my NW.js app without users requireing the npm stuff. Node modules are confusing to me.
btw, I got lead to node-fetch because I'm having issue with three.js and nw.js, if you want to trace my problem : https://discourse.threejs.org/t/fetch-api-cannot-load-file-c-users-name-boxtest-fbx-url-scheme-file-is-not-supported/33267/3
Beta Was this translation helpful? Give feedback.
All reactions