Skip to content
This repository has been archived by the owner on Jan 13, 2024. It is now read-only.

Build failed with 1 error #8

Closed
onemen opened this issue Apr 15, 2023 · 5 comments
Closed

Build failed with 1 error #8

onemen opened this issue Apr 15, 2023 · 5 comments

Comments

@onemen
Copy link
Contributor

onemen commented Apr 15, 2023

Clean install from github

Windows 11
node: 18.15.0
npm 9.5.0

step to reproduce:

  • copy .env.example to .env
  • npm install
  • npm run setup
  • npm run dev

Result:

Build failed with 1 error
 npm run dev

> dev
> cross-env NODE_ENV=development run-p dev:*


> dev:server
> cross-env MOCKS=true tsx watch --clear-screen=false --ignore "app/**" --ignore "build/**" --ignore "node_modules/**" ./index.js


> dev:remix
> cross-env PORT="" remix dev

🔶 Mock server installed
Loading environment variables from .env
🚀  We have liftoff!
Local:            http://localhost:3000
On Your Network:  http://10.100.102.21:3000
Press Ctrl+C to stop

✘ [ERROR] [plugin browser-route-modules] C:\projects\kcd-apps\rocket-rental\app\routes\index.module.css: Unexpected token (1:0)

> 1 | .statsDistance {
    | ^
  2 |   background: linear-gradient(
  3 |           269.6deg,
  4 |           #657cff 13.84%,

  This error came from the "onLoad" callback registered here:

    node_modules/@remix-run/dev/dist/compiler/plugins/browserRouteModulesPlugin_v2.js:122:12:
      122 │       build.onLoad({
          ╵             ~~~~~~

    at setup (C:\projects\kcd-apps\rocket-rental\node_modules\@remix-run\dev\dist\compiler\plugins\browserRouteModulesPlugin_v2.js:122:13)
    at handlePlugins (C:\projects\kcd-apps\rocket-rental\node_modules\esbuild\lib\main.js:1276:21)


Build failed with 1 error:
error: C:\projects\kcd-apps\rocket-rental\app\routes\index.module.css: Unexpected token (1:0)

> 1 | .statsDistance {
    | ^
  2 |   background: linear-gradient(
  3 |           269.6deg,
  4 |           #657cff 13.84%,
💿 Built in 3.1s
@onemen
Copy link
Contributor Author

onemen commented Apr 15, 2023

moving index.module.css out of routes folder fix the issue for me.

maybe something is wrong with remix.config.js ?

@onemen
Copy link
Contributor Author

onemen commented Apr 15, 2023

This issue was fixed by remix-run/remix#6017

@onemen
Copy link
Contributor Author

onemen commented Apr 24, 2023

simple workaround is to move app/routes/index.module.css to app/styles/index.module.css
and fix the link in app/routes/index.tsx to import styles from '../styles/index.module.css'

@kentcdodds
Copy link
Member

Thanks. I guess I'll do that if we don't get a remix release in time for the workshop

@kentcdodds
Copy link
Member

kentcdodds commented Jan 13, 2024

This is no longer actively maintained, so I'm closing this issue. If you want an up-to-date example of a Remix app that builds on top of what was done here, check the Epic Stack.

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

No branches or pull requests

2 participants