-
Notifications
You must be signed in to change notification settings - Fork 2.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[vite] pnpm, remix and monorepo: Cannot resolve asset path outside of root directory #7960
Comments
Likely duplicate of #7722 and fixed in #7913 as I have a monorepo + vite working at remix-nx-monorepo. You could test against nightly to be sure the above fixes the issue for you. |
Thanks, I didn't see the other issue. The nightly release works for me. I'm closing this in favor of the other issue. |
I see this issue present on Windows 11. I'm using node v20.9.0 and npm 10.1.0 and the only things that fixes my issues is going to workspace folder and running On MacOS worked just fine with installing workspace project with:
instead of
Steps to reproduce are simple
|
What version of Remix are you using?
2.2.0
Are all your remix dependencies & dev-dependencies using the same version?
Steps to Reproduce
git clone https://github.com/mrksbnch/remix-vite-monorepo.git
cd remix-vite-monorepo
pnpm install
pnpm run dev
The repository linked above is a bare bones repository that was created using the following steps:
pnpm dlx create-turbo@latest
pnpm dlx create-remix@latest --template remix-run/remix/templates/unstable-vite
(inside /apps/remix)I also deleted some unrelated folders in /apps (Next.js) and /packages to only keep the minimum.
Expected Behavior
Running
pnpm run dev
should run remix at http://localhost:5173/ (default Vite port).Actual Behavior
Running
pnpm run dev
produces the following error:Running
pnpm run build
fails due to the same error.I haven't tested it with other monorepos, e.g. NX, but I assume it will most likely behave the same way. If Vite isn't used, the same setup works out of the box. I tried to set the
root
in thevite.config.ts
file (commented out) but since it already correctly identified the root according to the error message, this was unlikely to work.The text was updated successfully, but these errors were encountered: