-
Notifications
You must be signed in to change notification settings - Fork 145
Module not found: ESM packages (pocketbase) need to be imported. Use 'import' to reference the package instead. #76
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
I'm not sure how to reproduce it. Could you provide a little more information on your setup (node and TS version, how do you load the SDK, etc.) or minimal reproducible repo? The PocketBase JS SDK is ES module. The above error indicates that you are probably using |
Thank you for your response, I was using the import statement as indicated on the docs, but I was still getting the same error, which was strange. I ended up falling back to the common js module and using that one instead. |
@nimamahmoudi Based only on the If you decide later to give ES modules another try, feel free to comment/open another issue (ideally with a minimal reproducable repo) and I'll try to investigate it more thoroughly. |
Found the issue while trying to set that repo up, thanks! The issue was that in that file I had the following: import ....
...
module.exports = {
....
} And apparently I can't use |
Hi, I'm getting this error, similar to #34 and #52 but the fixes there didn't work for me. I am fairly new to TypeScript and this is probably a mistake on my side, but would appreciate it if you could help me resolve it. Here are my configurations:
package.json
:tsconfig.json
:The text was updated successfully, but these errors were encountered: