-
-
Notifications
You must be signed in to change notification settings - Fork 819
Error: No valid exports main found for '/path/to/nanoid' #215
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
Comments
Now, try to upgrade node. |
Btw, either upgrading to the latest Node, or even downgrading to LTS |
@TrySound see above ^ 😊 |
Thanks for the repo. I will take a look today or tomorrow. |
I was having the same problem using NodeJS 13. I followed the recommendations to go back to NodeJS 12 and it worked. But soon I intend to use it with NodeJS 13. |
@marcelo-michels The latest node 13 should work fine. The problem happens only with early versions. |
@cansin sorry, we do not support old versions of Node.js 13, because they have problems with ESM. You should update to the latest Node.js 13 version. |
I added note about old Node.js 13 versions to Migration Guide https://github.com/ai/nanoid/releases/tag/3.0.0 |
Sure yeah I already did that. I still suggest you to update your engines.node so that any unsupported node version would complain. Obvs. your call. |
@cansin we support Node.js 10 and 12. Do you have an idea of how to specify |
e.g. Let's say >= 13.3 works. I believe something like: "engines": {
"node": "^10 || ^12 || >=13.3"
} would work. |
i.e. it follows the regular semver rules ( https://docs.npmjs.com/files/package.json#dependencies ). |
@cansin we also need to add Do you want to send PR to save your name in the project history? |
I think |
You are right 😅 |
Ok at 13.7 it runs with a warning:
I will draw the line there. |
The warning is OK |
@ai any reason why we don't support ^11 ? |
Because 11 is not supported by Node.js https://nodejs.org/en/about/releases/ |
Ah, right. Makes sense |
As initially described at #206 (comment) , I am getting a
MODULE_NOT_FOUND
error withnode@13.2.0
andyarn@1.22.4
.Here is the repro: https://github.com/cansin/nanoid-module-not-found-repro
And a sample run on my local:
Thanks.
The text was updated successfully, but these errors were encountered: