tamagui: [Windows] Required appropriate loader error when running yarn web

Describe the bug Received a required appropriate loader error when running yarn web on fresh install using npx create-tamagui-app@latest my-app

error - ../packages/app/provider/index.tsx
Module parse failed: Unexpected token (5:46)
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 { TamaguiProviderProps } from '@my/ui'
|
> export function Provider({ children, ...rest }: TamaguiProviderProps) {
|   return (
|     <Tamagui.Provider disableInjectCSS defaultTheme="light" {...rest}>

To Reproduce

  1. Start a new project using npx create-tamagui-app@latest my-app
  2. cd to project
  3. run yarn web

System Info (please complete the following information): Output of npx envinfo --system --npmPackages '{vitest,vite,@vitejs/*}' --binaries --browsers

  System:
    OS: Windows 10 10.0.19044
    CPU: (24) x64 AMD Ryzen 9 3900X 12-Core Processor
    Memory: 15.48 GB / 31.91 GB
  Binaries:
    Node: 16.15.1 - C:\Program Files\nodejs\node.EXE
    Yarn: 3.2.0 - C:\Program Files (x86)\Yarn\bin\yarn.CMD       
    npm: 8.11.0 - C:\Program Files\nodejs\npm.CMD
  Browsers:
    Chrome: 103.0.5060.134
    Edge: Spartan (44.19041.1266.0), Chromium (103.0.1264.77)    
    Internet Explorer: 11.0.19041.1566

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 17 (6 by maintainers)

Most upvoted comments

BTW guys, adding ‘app’ to withTM will disable all optimization! I pushed a change to instead do:

path.includes(join('packages', 'app'))

Which should fix windows support there.

You can test by adding //! debug to the top of any features/* components and see if it outputs stuff at compile time.

Yes! I did it! finally I figured out this problem! now everything works for sure.

  1. To resolve bug with Failed module parsing: image
  2. To fix bug with export is not defined - downgrade next to 12.1.6 version. More - https://github.com/vercel/next.js/issues/38117 image

It definitely should work, I just need to find time to get a Windows VM up and running to figure out what’s going on.

Window support at the moment is not working. I know others have had success with WSL.