Comments (7)
@sausman please put some eyeballs on this. just ran into this today myself.
from dwolla-v2-node.
Hey @shellscape,
Yeah I’ll take a look at this. Any info you can provide on your setup to help reproduce would be great!
Are you using Webpack as well?
from dwolla-v2-node.
@sausman yeah I actually work with @brianschardt but I was on another project with a similar setup. Typically shows up when node-fetch >= 2.0.0 gets the module resolution while bundling. Any version less than 2.0.0 doesn't have the issue. This is caused by a breaking change in 2.0.0 that didn't get much fanfare. See https://github.com/node-fetch/node-fetch/blob/master/docs/CHANGELOG.md#v200 and the last point under General changes.
https://www.npmjs.com/package/isomorphic-fetch might be a good option. should tree shake properly for bundlers. or, if the global scope of fetch
doesn't sit well in Node, axios is a fine alternative which plays very nicely with bundlers and Node alike, with a similar syntax.
from dwolla-v2-node.
@shellscape Thanks that helps!
One thing I came across you may be able to use is https://www.npmjs.com/package/webpack-node-externals
It was apparently inspired by this blog post which mentions:
Webpack will load modules from the node_modules folder and bundle them in. This is fine for frontend code, but backend modules typically aren't prepared for this (i.e. using require in weird ways) or even worse are binary dependencies. We simply don't want to bundle in anything from node_modules.
from dwolla-v2-node.
The one thing we do want to avoid is using externals. We're shipping to Lambda (serverless) and tree shaking the bajeezus out of the bundle to reduce the size of the archive. Avoiding shipping a node_modules directory is key.
from dwolla-v2-node.
Hey @shellscape,
We just published 3.1.2
which should fix this!
from dwolla-v2-node.
🙌 and on your day off no less! Very much appreciated!
from dwolla-v2-node.
Related Issues (20)
- No automatic refresh handling? HOT 4
- Add OAuth scopes? HOT 1
- client.Auth() bug giving error: access_denied -- Code required HOT 1
- Current Lodash Version is Low-Severity Security Vulnerability
- UndefinedCredentials HOT 1
- Unexpected token < in JSON at position 0 HOT 3
- Can't parse Json
- Process bank transfers
- Token errors stick
- CORS issue with js sdk HOT 3
- Unable to add document to customer
- Use "files" in package.json, don't publish the world HOT 2
- Support TypeScript generics
- Calling the root HOT 1
- @types/node-fetch should be a dependency HOT 2
- Typescript module is missing all exported definitions on `Client` HOT 3
- indexOf() === 0 vs startsWith() HOT 2
- formurlencoded query array without brackets HOT 3
- Facing CORS issue in token API HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dwolla-v2-node.