Open gonzalofj opened 2 months ago
npx create-react-app --version 5.0.1
npm list consola consola-test.ts@0.1.0 /Users/gferreyra/dev/consola-test.ts └── consola@3.2.3
node --version v21.6.2
npx create-react-app ts-console-module --template typescript npm i consola import {} from 'consola/browser' npm run start
npx create-react-app ts-console-module --template typescript
npm i consola
import {} from 'consola/browser'
npm run start
Trying to use consola/browser module in a typescript react app, the module consola/browser is not found.
This only happens in the Typescript version of the app, in a standar javascript react app the module is correctly found.
No response
Hey there @gonzalofj , if you change the moduleResolution from node to Bundler in your tsconfig.json file, it works perfectly.
moduleResolution
node
Bundler
Environment
npx create-react-app --version 5.0.1
npm list consola consola-test.ts@0.1.0 /Users/gferreyra/dev/consola-test.ts └── consola@3.2.3
node --version v21.6.2
Reproduction
npx create-react-app ts-console-module --template typescript
npm i consola
import {} from 'consola/browser'
npm run start
Describe the bug
Trying to use consola/browser module in a typescript react app, the module consola/browser is not found.
This only happens in the Typescript version of the app, in a standar javascript react app the module is correctly found.
Additional context
No response
Logs
No response