Skip to content
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

Nuxt 3 Integration #934

Open
estnml opened this issue Jan 19, 2024 · 1 comment
Open

Nuxt 3 Integration #934

estnml opened this issue Jan 19, 2024 · 1 comment
Labels
help wanted Extra attention is needed

Comments

@estnml
Copy link

estnml commented Jan 19, 2024

Question

Hello, i am trying to use this library in nuxt 3 application. I followed the instructions on the webpage, but i am getting an error.

What i did

  1. pnpm install --save typia
  2. pnpm install --save-dev typescript ts-patch ts-node
  3. added "plugins": [{ "transform": "typia/lib/transform" }] to tsconfig.json
  4. added "prepare": "ts-patch install && typia patch" to package.json
  5. created templates and generated folders in the root.
  6. pnpm typia generate --input templates --output generated --project tsconfig.json
  7. modified nuxt.config.ts to auto import .ts files inside templates folder. added -> imports: {dirs: ["types/.ts", "templates/.ts"]},
  8. Created IRegisterUser interface in the templates folder.
  9. run "pnpm run prepare" command
  10. Inside the register.vue component:
const registerData = ref<IRegisterUser>({
    firstName: "",
    lastName: "",
    email: "",
    password: "",
    confirmPassword: ""
})

assert<IRegisterUser>(registerData.value);
  1. When i go to webpage, it does not open and in the console it says "Uncaught (in promise) Error: Error on typia.assert(): no transform has been configured. Read and follow https://typia.io/docs/setup please.".

I'm probably doing the setup wrong. I would be glad if you help.

@samchon samchon added the help wanted Extra attention is needed label Jan 20, 2024
@Tenrys
Copy link

Tenrys commented Apr 10, 2024

I tried following steps over here as well, and I could not get it to work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants