turbo
turbo copied to clipboard
[turborepo] Error with vanilla install
What version of Turborepo are you using?
1.6.2
What package manager are you using / does the bug impact?
npm
What operating system are you using?
Mac
Describe the Bug
When I open http://localhost:3000 in the browser I get a Failed to Compile error:
../../packages/ui/Button.tsx
Module parse failed: Unexpected token (3:9)
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders
| import * as React from "react";
| export const Button = () => {
> return <button>Boop</button>;
| };
|
Expected Behavior
http://localhost:3000 should display the web app with the Button component without error.
To Reproduce
- Install a default turborepo with
npx create-turbo@latest - Select default 'my-turborepo' name
- Select 'npm' (though, I also had this error with yarn)
cd my-turboreponpm run dev- Open http://localhost:3000
Reproduction Repo
No response
I just tried running npx [email protected] and npx [email protected] and those worked fine.
Project created with npx create-turbo@latest gives me "next": "12.3.1" in apps/web/package.json, however it seems that the experiment.transpilePackages property doesn't get supported until the 12.3.2 canary versions. My console also emits warnings saying that transpilePackages property is unexpected.
Don't know if this is the right way or not, but changing "next": "12.3.1" to "next": "13.0.0" in both apps/web/package.json and apps/docs/package.json, then run npm install in apps/web and apps/docs, does eliminate the warning and solved the issue.
Don't know if this is the right way or not, but changing
"next": "12.3.1"to"next": "13.0.0"in bothapps/web/package.jsonandapps/docs/package.json, then runnpm installinapps/webandapps/docs, does eliminate the warning and solved the issue.
Worth updating to "eslint-config-next": "13.0.0" in eslint-config-custom too.