NPM Workspaces
What version of Remix are you using?
1.3.3
Steps to Reproduce
- Init a npm monorepo setup
- Create a remix app directory called
packages/remixand generate a remix app in there (we went with the basic setup vs stack) - Make sure the package.json name is something more unique like
@some-org/remixso as not to create any obvious conflicts. - In the root dir run
npm install - Run
npm run dev -w @some-org/remix
Expected Behavior
Would expect given the above setup that remix runs normally and a remix dev server is started
Actual Behavior
Remix does not like that at all. It will generate a index.d.ts and a index.js file in the packages/remix dir that I think are intended for node_modules/remix.
Running the dev server or building the prod build will produce errors like in #154 about various remix deps missing definitions like MetaFunction or Link, or various generated exports.
Temporary Solution
The good news is I was able to get myself unstuck.
- Rename
packages/remixto nearly anything else likepackages/my-app - After
npm install, be sure to runnpm run postinstall -w @some-org/my-app. For convenience, create a postinstall script in the root package.json that calls the remix my-app one.
That seems to be working correctly thankfully, but I suspect when it generates index.d.ts and index.js in the packages/remix dir, that is an unintended behavior caused by the remix setup naively mistaking that folder for the node_modules remix dir.
@eccentric-j It have been a long time and a lot have changed. Is this still an issue for you?
Will try creating a mini repro repo and see if edge case still exists
Closing this out, but please re-open if you can provide a reproduction!