-
-
Notifications
You must be signed in to change notification settings - Fork 46
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
With v8.0.0 geo-tz/all and geo-tz/now do not work #165
Comments
I see you're trying this out using TypeScript, but can you share more information about the environment this is occurring in? How is this all being bundled together? Do you have a small example repo that you can share that reproduces this error? |
It's a very simple NestJS application. I'll share a repo soon. Thanks. |
@evansiroky Thanks for your patience. I've created https://github.com/meezaan/node-geo-tz-testing. Clone the repo. Run Then in Thank you! |
Thanks for this! I'll take a detailed look after this weekend. |
This is due to v8 aliasing paths via TS will resolve this if you set |
@shengslogar, I thought it had something to do with the package.json configuration. I'm glad you let us know exactly why. In some testing, I was able to come up with 2 kinda hacky alternatives to make this work out-of-the-box. The first option is to add additional entry points directly to the ".": {
"main": "./dist/find-1970.js",
"import": "./dist/find-1970.js",
"require": "./dist/find-1970.js",
"types": "./dist/find-1970.d.ts"
},
"./all": {
"main": "./dist/find-all.js",
"import": "./dist/find-all.js",
"require": "./dist/find-all.js",
"types": "./dist/find-all.d.ts"
},
"./now": {
"main": "./dist/find-now.js",
"import": "./dist/find-now.js",
"require": "./dist/find-now.js",
"types": "./dist/find-now.d.ts"
},
"./src/find-1970": {
"main": "./dist/find-1970.js",
"import": "./dist/find-1970.js",
"require": "./dist/find-1970.js",
"types": "./dist/find-1970.d.ts"
},
"./src/find-all": {
"main": "./dist/find-all.js",
"import": "./dist/find-all.js",
"require": "./dist/find-all.js",
"types": "./dist/find-all.d.ts"
},
"./src/find-now": {
"main": "./dist/find-now.js",
"import": "./dist/find-now.js",
"require": "./dist/find-now.js",
"types": "./dist/find-now.d.ts"
} The second option would be to create some new directories that match the documented entry point and put the appropriate I'd be curious to hear what people think about either alternative or if changing the |
@evansiroky I like your first option best. Wondering if it would be best to name the aliases Another option would be to place all files directly in the root directory and avoid If all else fails, I think leaving a README note regarding Thanks for making a valuable project! |
🎉 This issue has been resolved in version 8.0.1 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Thanks @evansiroky. Busy week so I could not respond but really appreciate it! |
Thanks, @meezaan, I hope this solution works for you. Feel free to reopen if not. |
I'm unable to get either
geo-tz/all
orgeo-tz/now
to work in my import statements. Justgeo-tz
works fine.When I change my import statement to the following with v8.0.0:
I get
Removing the
/all
works fine./now
throws the same error.Definitely running v8.0.0 as I can see the find-all and find-now .js and .ts files in the dist folder in node_modules.
The text was updated successfully, but these errors were encountered: