-
-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
Express App Crashes due to Error [ERR_PACKAGE_PATH_NOT_EXPORTED] #9573
Comments
Our ESM configuration has no errors, see: |
I am using typescript and sample code of the docs but the same error
|
@solo8116 you need to use ES Modules on your Express project. Here's what you should do if you're using Typescript: tsconfig.json example
also include You'll need also to declare the file extension on every import, you can help yourself to do this enforcing it via eslint .eslintrc
Remember to install also the relevant deps to make eslint and its plugin work. This should be enough, I hope :) |
nope not helping, I tried changing the ts-config and adding in the eslint config as suggested by @asierbayon still no help, I have created a minimal reproduction for prisma and express. it will be great if you take a look, please take a look at this. I couldn't find a fix, will continue on this, i currently think it has something to do with tsconfig: ipfs github I have tried other packages also but can't get it working all give the same error's and only in authjs rest of the packages work as they are. also there are some same issues with different packages: #8597, #8727 edit: it's definitely a ts issue, reverting to js, fixed the issue. |
I got this issue too. to anyone getting it make sure you have |
i cannot upgrade my project to is any other ideas? |
Environment
System:
OS: macOS 13.3.1
CPU: (12) x64 Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz
Memory: 8.91 GB / 64.00 GB
Shell: 5.9 - /bin/zsh
Binaries:
Node: 16.19.1 - ~/.nvm/versions/node/v16.19.1/bin/node
Yarn: 1.22.10 - /usr/local/bin/yarn
npm: 8.19.3 - ~/.nvm/versions/node/v16.19.1/bin/npm
Browsers:
Brave Browser: 119.1.60.114
Chrome: 120.0.6099.129
Safari: 16.4
npmPackages:
@auth/express: ^0.1.2 => 0.1.2
Reproduction URL
https://github.com/asierbayon/auth-express-bug-demo
Describe the issue
Whenever
@auth/express
or even@auth/core
is imported into an Express project, the following error is shown:This happens in Typescript projects once the code is compiled and in Javascript projects too.
How to reproduce
yarn && yarn dev
Expected behavior
The app does not crash.
The text was updated successfully, but these errors were encountered: