-
-
Notifications
You must be signed in to change notification settings - Fork 238
Cannot import request-promise
#823
Comments
Just a side note why don’t you isolate dependencies for server? Are u deploying it to amazon lambda or something? |
We are deploying with Docker, so we can definitely install dependencies. Would just be nice to deploy a bundle and not have to install dependencies. For now I'll bundle it without deps. |
I have this use-case also when deploying apps with nexe (node) |
I don't think it's a good idea tho
But I will take a look anyway P.S it's not in |
Thanks for taking a look :) To give a little more context:
|
@dgreif @calebboyd
I think you can package it in Quantum and deploy elsewhere. |
Hmm... Any idea why it doesn't work without quantum? |
yes I've got an idea, Quantum removes conditions with Long story short, it executes |
I don't follow. The library has no references to any dom apis. |
Sorry man, I had it with hmr() lol. Now I am getting that error with |
Aye, Thats the original error.. Weird right? |
I might have an idea, MIGHT be a circular dependency with this line
wherease there is no |
Oh.. basePath is so wrong... |
I may have seen this before... Does it work if you change Edit: no.. nvm |
I remember somebody modified the loader, was it you? ;-) but it definitely fails to resolve that require("../") whereas there is no Changing it to
It's really weird cuz there isn't any candidate it could reference to correctly. https://github.com/request/promise-core/blob/master/configure/request2.js#L3 That one leads it to Any ideas? |
Yeah, I had this base case covered but after discussion we decided to narrow it. I think its safe to probably bring back... We can change fuse-box/src/loader/LoaderAPI.ts Lines 300 to 302 in 0646063
To if (!file && isRelative.test(filePath)) {
file = pkg.f[pkg.s && pkg.s.entry];
} Where isRelative is the same regex from PathMaster fuse-box/src/core/PathMaster.ts Line 15 in 0646063
|
Am I looking in the right place? It sounds like filePath is |
line ~ 5791ish |
@calebboyd that didn't help (( |
I wonder if it has to do with requiring a partial node_module from within a node_module, such that when looking up |
This is where it failes |
Ok, that was easy.. I am not sure how that was working before
validPath was never set, therefore couldn't get resolved @dgreif @calebboyd |
🎆 ✌️ |
request-promise
usesrequest-promise-core
, which does some interesting import paths internally. One of the imports is just a relativerequire('./errors.js')
, which is breaking when bundled with fuse-box. Still an issue after #797. Here is an example using2.3.1-beta.15
: https://github.com/dgreif/request-promise-fuseThe text was updated successfully, but these errors were encountered: