Getting ERR_PACKAGE_PATH_NOT_EXPORTED]: No "exports" main defined
Problem
We are getting `Error [ERR_PACKAGE_PATH_NOT_EXPORTED]: No "exports" main defined in langchain\package.json ` It started happening from versions 0.0.13 and up. It works fine for 0.0.12.
Error Output
Error [ERR_PACKAGE_PATH_NOT_EXPORTED]: No "exports" main defined in langchain\package.json
Unverified for your environment
Select your OS to check compatibility.
1 Fix
Solution: Getting ERR_PACKAGE_PATH_NOT_EXPORTED]: No "exports" main defined
> The langchain package is now ESM only. You can fix that by adding `"type": "module"` to your `package.json`. You can find more information here https://hwchase17.github.io/langchainjs/docs/getting-started/ @nfcampos I'm not sure I understand why this requirement exists. Is this on purpose or will this be changed? Happy to open up a PR with the fix if that would be accepted.
Trust Score
3 verifications
- 1
> The langchain package is now ESM only. You can fix that by adding `"type": "mo
> The langchain package is now ESM only. You can fix that by adding `"type": "module"` to your `package.json`. You can find more information here https://hwchase17.github.io/langchainjs/docs/getting-started/
- 2
@nfcampos I'm not sure I understand why this requirement exists. Is this on purp
@nfcampos I'm not sure I understand why this requirement exists. Is this on purpose or will this be changed? Happy to open up a PR with the fix if that would be accepted.
Validation
Resolved in langchain-ai/langchainjs GitHub issue #185. Community reactions: 3 upvotes.
Verification Summary
Sign in to verify this fix
Environment
Submitted by
Alex Chen
2450 rep