Monorepo vite project get 404 error
See original GitHub issueI’m facing the same issue
GET http://localhost:3000/@id/packages/ui/src/Button/button.css.ts$$$dashboard.vanilla.js net::ERR_ABORTED 404 (Not Found)`.
the app is using turborepo. All versions are latest. app’s viteconfig
import { defineConfig } from 'vite'
import react from '@vitejs/plugin-react'
import { vanillaExtractPlugin } from '@vanilla-extract/vite-plugin';
// https://vitejs.dev/config/
export default defineConfig({
plugins: [react(),vanillaExtractPlugin()]
})
package.json
{
"dependencies": {
"ui": "*",
"@vanilla-extract/css": "^1.6.8",
"react": "^17.0.2",
"react-dom": "^17.0.2"
},
"devDependencies": {
"eslint-config": "*",
"@types/react": "^17.0.33",
"@types/react-dom": "^17.0.10",
"@vanilla-extract/vite-plugin": "^3.1.2",
"@vitejs/plugin-react": "^1.0.7",
"eslint": "^8.5.0",
"tsconfig": "*",
"typescript": "^4.4.4",
"vite": "^2.7.2"
}
}
</div>
Issue Analytics
- State:
- Created 2 years ago
- Reactions:5
- Comments:10 (1 by maintainers)
Top Results From Across the Web
Monorepo vite project get 404 error · Discussion #555 - GitHub
the app is using turborepo. All versions are latest. app's viteconfig. import { defineConfig } from 'vite' import react from '@vitejs/plugin-react' import { ......
Read more >React.js (Vite) application returns 404 when refreshed on route
Mistake was related to the codebase (where I'm using monorepo and vercel.json was on the root directory. After moving vercel.js to package with ......
Read more >Introduction to Nxext Vite
Introduction to Nxext Vite #. @nxext/vite is a nx plugin to bring Solid and Svelte to Nx. We at Nxext believe the key...
Read more >404 page not found nextJS - Netlify Support Forums
My site: https://joyful-froyo-cb853f.netlify.app/ I have deployed this site but when I try to access it it gives following error Build ...
Read more >Migrating to Next.js: Incrementally Adopting Next.js
When Next.js matches the dynamic route it stops checking any further routes. Using notFound: true in getStaticProps will return the 404 page without...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Tried it locally and worked like a charm! 👌 Thanks!
(Copy-pasted the changed lines into
dist/vanilla-extract-vite-plugin.cjs.dev.js
)Experiencing the same issue, also with turborepo, better said (npm) workspaces.
What worked for me is indeed putting the site instead of the app folder into the packages next to my ui-kit.
Like:
ui-kit is a dependency in the sites package.json:
„dependencies“: { „ui-kit“: „*“ }
Still, it feels not good, starting a repo with breaking conventions.
It seems to me, the described fix only fixed it ‚one level‘ higher in the folder hierarchy?
@markdalgleish or @mattcompiles Could you provide some assistance?