-
Notifications
You must be signed in to change notification settings - Fork 6
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
Getting: "Error [ERR_PACKAGE_PATH_NOT_EXPORTED]: No "exports" main defined ...." error #60
Comments
hey @ieazie how come you closed the issue? i'm getting the same error |
We haven't seen this before, but after reading I think I see a way we could test something. Could one of you remove the // Before
"main": "dist/index.js",
"exports": {
"require": "./dist/index.js"
},
"description": "🔀 Replace {{ variables }} in all your files",
// After
"main": "dist/index.js",
"description": "🔀 Replace {{ variables }} in all your files", Also, are you using any tooling to transpile to an ES5 target or Node.js CommonJS? Just asking because it seems some build tool sees the |
Also, if you have a minimal example, that'd be perfect. It'd help us get this solved a bit sooner. |
I was able to resolve it as below:
I suspect it may have something to do with my node version, I'm using version v14.13.1 |
Could you test version 6.0.1? This should be fixed! |
This might be a problem with my setup, however, i keep getting the below error:
internal/process/esm_loader.js:74
internalBinding('errors').triggerUncaughtException(
Error [ERR_PACKAGE_PATH_NOT_EXPORTED]: No "exports" main defined in /Users/john.doe/Documents/Projects/cli/node_modules/template-file/package.json imported from /Users/john.doe/Documents/Projects/cli/lib/config-generator.js
Please could you help point me in the right direction on resolving this?
The text was updated successfully, but these errors were encountered: