lquixada / cross-fetch

Universal WHATWG Fetch API for Node, Browsers and React Native.
MIT License
1.67k stars 104 forks source link

dependency issue #114

Closed geco closed 3 years ago

geco commented 3 years ago

Hello, i'm using hivejs lib into a webpack peertube plugin, and hivejs lib uses cross-fetch 3 When building i have this error: Error: ENOENT: no such file or directory, open '/node_modules/cross-fetch/dist/node.js' at @hiveio/hive-js/lib/api/transports/http.js:12:19 at @hiveio/hive-js/lib/api/index.js:23:19 Actually i've checked and that file doesn't exist Do you have any suggestion? Thank you in advance

lquixada commented 3 years ago

Not sure what's going on. cross-fetch doesn't have a node.js file nor any references to it (see https://github.com/lquixada/cross-fetch/blob/main/package.json).

geco commented 3 years ago

I think this issue is similar to this one: https://github.com/lquixada/cross-fetch/issues/110 This is complete log error:

Error: ENOENT: no such file or directory, open '../node_modules/cross-fetch/dist/node.js' at Object.openSync (fs.js:498:3) at Object.readFileSync (fs.js:394:35) at Object.Module._extensions..js (internal/modules/cjs/loader.js:1095:18) at Module.load (internal/modules/cjs/loader.js:933:32) at Function.Module._load (internal/modules/cjs/loader.js:774:14) at Module.require (internal/modules/cjs/loader.js:957:19) at require (internal/modules/cjs/helpers.js:88:18) at Object. (../node_modules/@hiveio/hive-js/lib/api/transports/http.js:12:19) at Module._compile (internal/modules/cjs/loader.js:1068:30) at Object.Module._extensions..js (internal/modules/cjs/loader.js:1097:10) at Module.load (internal/modules/cjs/loader.js:933:32) at Function.Module._load (internal/modules/cjs/loader.js:774:14) at Module.require (internal/modules/cjs/loader.js:957:19) at require (internal/modules/cjs/helpers.js:88:18) at Object. (../node_modules/@hiveio/hive-js/lib/api/transports/index.js:7:13) at Module._compile (internal/modules/cjs/loader.js:1068:30) at Object.Module._extensions..js (internal/modules/cjs/loader.js:1097:10) at Module.load (internal/modules/cjs/loader.js:933:32) at Function.Module._load (internal/modules/cjs/loader.js:774:14) at Module.require (internal/modules/cjs/loader.js:957:19) at require (internal/modules/cjs/helpers.js:88:18) at Object. (../node_modules/@hiveio/hive-js/lib/api/index.js:23:19) at Module._compile (internal/modules/cjs/loader.js:1068:30) at Object.Module._extensions..js (internal/modules/cjs/loader.js:1097:10) at Module.load (internal/modules/cjs/loader.js:933:32) at Function.Module._load (internal/modules/cjs/loader.js:774:14) at Module.require (internal/modules/cjs/loader.js:957:19) at require (internal/modules/cjs/helpers.js:88:18) at Object. (../node_modules/@hiveio/hive-js/lib/index.js:3:11) at Module._compile (internal/modules/cjs/loader.js:1068:30) at Object.Module._extensions..js (internal/modules/cjs/loader.js:1097:10) at Module.load (internal/modules/cjs/loader.js:933:32) at Function.Module._load (internal/modules/cjs/loader.js:774:14) at Module.require (internal/modules/cjs/loader.js:957:19) at require (internal/modules/cjs/helpers.js:88:18) at Object. (../server/queue.js:1:76) at Module._compile (internal/modules/cjs/loader.js:1068:30) at Object.Module._extensions..js (internal/modules/cjs/loader.js:1097:10) at Module.load (internal/modules/cjs/loader.js:933:32) at Function.Module._load (internal/modules/cjs/loader.js:774:14) at Module.require (internal/modules/cjs/loader.js:957:19) at require (internal/modules/cjs/helpers.js:88:18) at Object. (../main.js:6:26) at Module._compile (internal/modules/cjs/loader.js:1068:30) at Object.Module._extensions..js (internal/modules/cjs/loader.js:1097:10) at Module.load (internal/modules/cjs/loader.js:933:32) at Function.Module._load (internal/modules/cjs/loader.js:774:14) at Module.require (internal/modules/cjs/loader.js:957:19) at require (internal/modules/cjs/helpers.js:88:18) at PluginManager. (../peertube-3.2.1/dist/server/lib/plugins/plugin-manager.js:312:29) at Generator.next () at ../peertube-3.2.1/node_modules/tslib/tslib.js:117:75 at new Promise () at Object.__awaiter (../peertube-3.2.1/node_modules/tslib/tslib.js:113:16) at PluginManager.registerPlugin (../peertube-3.2.1/dist/server/lib/plugins/plugin-manager.js:308:24) at PluginManager. (../peertube-3.2.1/dist/server/lib/plugins/plugin-manager.js:282:43) at Generator.next () at fulfilled (../peertube-3.2.1/node_modules/tslib/tslib.js:114:62)

lquixada commented 3 years ago

Sorry, this doesn't look like an issue on the cross-fetch lib. Closing this issue for now. In case others face similar issue, I'll be happy to open it again.