mledoze / countries

World countries in JSON, CSV, XML and Yaml. Any help is welcome!

Home Page:https://mledoze.github.io/countries/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Warning when using npm package

Gerschtli opened this issue · comments

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' };

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

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

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

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.

@mledoze Please release the latest version.

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.

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.

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