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

Typebot React Integration Error: Can't resolve @typebot.io/js/dist/web in #561

Closed
mannutech opened this issue Jun 13, 2023 · 1 comment
Closed

Comments

@mannutech
Copy link

mannutech commented Jun 13, 2023

When integrating Typebot.Standard in my CRA Typescript react app, I get the error as explained in screenshot.

My package.json :

"@typebot.io/js": "0.0.63",
    "@typebot.io/react": "0.0.63",
"react": "^18.1.0",
    "react-dom": "^18.1.0",
    "react-icons": "^3.0.0",
    "react-router-dom": "^6.11.2",
    "react-scripts": "5.0.1",
    "revo-calendar": "^3.2.3",
    "typescript": "^4.6.3",

My tsconfig.json

  "compilerOptions": {
    "target": "es5",
    "lib": [
      "dom",
      "dom.iterable",
      "esnext"
    ],
    "allowJs": true,
    "skipLibCheck": true,
    "esModuleInterop": true,
    "allowSyntheticDefaultImports": true,
    "strict": true,
    "downlevelIteration": true,
    "forceConsistentCasingInFileNames": true,
    "noFallthroughCasesInSwitch": true,
    "module": "esnext",
    "moduleResolution": "node",
    "resolveJsonModule": true,
    "isolatedModules": true,
    "noEmit": true,
    "jsx": "react-jsx"
  },
  "include": [
    "src"
  ]
}

Attaching a screenshot:
image

@baptisteArno
Copy link
Owner

That's a known error with CRA (facebook/create-react-app#11865).

This fixes the issue: https://stackoverflow.com/questions/70964723/webpack-5-in-ceate-react-app-cant-resolve-not-fully-specified-routes/75109686#75109686

On a side note, I would not advise anyone to use CRA anymore as it is "dying" and is not suggested by React officially anymore (https://react.dev/learn/start-a-new-react-project#production-grade-react-frameworks)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants