-
Notifications
You must be signed in to change notification settings - Fork 8
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
Error: Package subpath './v4' is not defined by "exports" #9
Comments
Is your package an ES module? |
I am using ES module syntax (import/export) with TypeScript. |
Can you please make a reproduction repo? I haven't used ts-node |
Here is the step-by-step guide to initialize a TypeScript project, install the necessary libraries, and test with 1. Initialize the TypeScript Project and Install DependenciesCreate a directory for your project, initialize it with npm, and install TypeScript, mkdir my-paseto-project
cd my-paseto-project
npm init -y
npm install typescript ts-node @types/node --save-dev
npm install paseto-ts 2. Set up
|
Thanks for the instructions, I'm a bit loaded with work but will take a look at this once I have a moment. You could try removing the typesVersions from the package.json and see if that helps, that was my idea |
As a workaround you can use a dynamic import with a relative path const { sign } = await import(
"../../node_modules/paseto-ts/dist/v4/index.js"
); |
Hi, error appear when i'm testing :
My import is just :
import { encrypt, decrypt, generateKeys } from 'paseto-ts/v4';
I'm testing with ts-node
The text was updated successfully, but these errors were encountered: