Skip to content
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

Warning when using npm package #490

Closed
Gerschtli opened this issue Sep 13, 2023 · 9 comments
Closed

Warning when using npm package #490

Gerschtli opened this issue Sep 13, 2023 · 9 comments

Comments

@Gerschtli
Copy link

When using the index.mjs, I get the following warning

(node:121631) ExperimentalWarning: Import assertions are not a stable feature of the JavaScript language. Avoid relying on their current behavior and syntax as those might change in a future version of Node.js.
(Use `node --trace-warnings ...` to show where the warning was created)
(node:121631) ExperimentalWarning: Importing JSON modules is an experimental feature and might change at any time

current content of index.mjs:

export { default } from './countries.json' assert { type: 'json' };
@mledoze
Copy link
Owner

mledoze commented Sep 13, 2023

Thanks for reporting, do you know a way to fix this?

@Gerschtli
Copy link
Author

Not from the top of my head. Never did npm packages, so would also need to research on that..

@mledoze
Copy link
Owner

mledoze commented Sep 13, 2023

@lunaneff (since you added the file in #469): could you help figure out what to do here?

@Gerschtli
Copy link
Author

I also have this strange issue that with 4.1.1 my vercel deployment can not find the countries.json anymore.. Not sure if this is related, but with 4.0.0 it worked.

@thevuong
Copy link
Contributor

@mledoze Please release the latest version.

@mledoze
Copy link
Owner

mledoze commented Sep 16, 2023

Yes I'd like to but this issue is not resolved. If it's not a problem for your I can release it and provide a fix afterwards.

@mledoze
Copy link
Owner

mledoze commented Sep 17, 2023

Version 5.0.0 is released https://github.com/mledoze/countries/releases/tag/5.0.0

@mledoze
Copy link
Owner

mledoze commented Sep 17, 2023

I looked into the issue here, I reproduced it but was unable to find a solution for it as I am not a NodeJS expert. I really need help to find a fix, if any.

@Gerschtli
Copy link
Author

I don't get this warning anymore. Feel free to reopen, if this is still an issue. Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants