Comments (15)
Just for context, I am using next.js which handles a significant part of the build process, including what's conflicting with this version. It is a specific way of configuring a project but I would definitely not consider it an outlier considering its wide adoption. My solution will be to stick with 0.3.0
since I would like to avoid patch-package.
from i18n-postal-address.
Same Problem, same Environment. Just wanted to emphasize that this is a standard Next.js/Vercel Scenario.
from i18n-postal-address.
@saiichihashimoto , can you share a bit of your code? How are you importing the module? I can't seem to reproduce this issue.
from i18n-postal-address.
from i18n-postal-address.
@saiichihashimoto thank you for sharing! Everything seems alright... What's the node version on your system?
from i18n-postal-address.
from i18n-postal-address.
@saiichihashimoto , can you try removing the lock file and re-installing the dependencies?
# Yarn
rm yarn.lock && yarn install
# npm
rm package-lock.json && npm install
If that doesn't work, try removing the engines
key from your package.json
file or changing it to:
"engines": {
"node": ">=12",
"npm": "6.14.6"
}
from i18n-postal-address.
I removed my package-lock and reinstalled, and the failure remained. For environment reasons I need to stay on node version 12.0, does 0.4.0 not work for 12 anymore?
from i18n-postal-address.
I can't think of a reason why that should be a problem. I recently changed the package.json
to include an exports
directive for better usage as an ESM module and that might be in conflict with the engines
directive. Try removing that and see if it works. Edit the following file and remove the exports
key entry:
node_modules/i18n-postal-address/package.json
If that works, you can make the changes permanent with patch-package.
from i18n-postal-address.
patch-package helps me avoid a problem, not solve it, correct? We should figure out a more long term solution that works here.
from i18n-postal-address.
This is more of a configuration issue which patch-package
can resolve easily.
I'll close this issue for now.
from i18n-postal-address.
@joaocarmo I don't understand how a consumer's ability to rewrite the package means the issue is resolved. patch-package
exists to fix broken node modules, indicating that the package is broken, not working-as-intended.
I would label this as wont-fix
since that's more accurate.
from i18n-postal-address.
@saiichihashimoto , you are correct and I've labeled this as wontfix
for now.
The reason behind my decision is that the recent changes makes the package more compatible with modern distribution channels such as CDNs.
It's unfortunate that it might break your application but, since it's due to a very particular configuration within your project, I believe patch-package
is a good solution. It allows you to keep receiving the latest version without having to change anything.
Even though it might be described as a helper for broken packages, it also allows you to customize packages without having to fork them — which then would require you to maintain the fork to keep up with the updates.
from i18n-postal-address.
That's great to have documented, thanks for sharing your information!
Regarding your original issue (#11), since v.0.4.0
only adds custom formats, you can pass useTransforms: false
in the options and it will not apply any transforms — that means no capitalisation.
from i18n-postal-address.
@hubcards which version are you using? TypeScript or plain JavaScript?
Edit: I built a proof of concept app using Next.js and cannot replicate the problem. Check it here and feel free to make a pull request with your configuration. To me, everything works as expected. I cannot fix this unless I can replicate the issue.
Also, @saiichihashimoto.
from i18n-postal-address.
Related Issues (15)
- Spread operator in dist causes bundling failure in Webpack version < 4 HOT 2
- Capitalized "UNITED STATES" HOT 3
- Hi i tried you package but somehow we cannot get the constructor running in node env. HOT 2
- Latin America: firstLastName, secondLastName and lastName HOT 2
- addCommaAfter on custom format HOT 3
- self is not defined HOT 2
- Types aren't a module HOT 1
- Wrong default for Canada HOT 3
- Question - Address Standardization HOT 3
- Allow adding custom format for countries not supported by default in library HOT 3
- Consider making `node-postal` an optional peer dependency. HOT 2
- Module not found: Error: Package path . is not exported from package HOT 3
- Allow access to Address Formats?
- US address missing comma after city HOT 2
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 i18n-postal-address.