Skip to content
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

NPM Workspaces #2474

Closed
jaidetree opened this issue Mar 24, 2022 · 3 comments
Closed

NPM Workspaces #2474

jaidetree opened this issue Mar 24, 2022 · 3 comments
Labels
bug:unverified pm:npm Bugs related to npm

Comments

@jaidetree
Copy link
Contributor

jaidetree commented Mar 24, 2022

What version of Remix are you using?

1.3.3

Steps to Reproduce

  1. Init a npm monorepo setup
  2. Create a remix app directory called packages/remix and generate a remix app in there (we went with the basic setup vs stack)
  3. Make sure the package.json name is something more unique like @some-org/remix so as not to create any obvious conflicts.
  4. In the root dir run npm install
  5. 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.

  1. Rename packages/remix to nearly anything else like packages/my-app
  2. After npm install, be sure to run npm 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.

@machour
Copy link
Collaborator

machour commented Jan 24, 2023

@eccentric-j It have been a long time and a lot have changed.
Is this still an issue for you?

@machour machour added the needs-response We need a response from the original author about this issue/PR label Jan 24, 2023
@jaidetree
Copy link
Contributor Author

Will try creating a mini repro repo and see if edge case still exists

@github-actions github-actions bot removed the needs-response We need a response from the original author about this issue/PR label Jan 24, 2023
@brophdawg11 brophdawg11 added the pm:npm Bugs related to npm label May 5, 2023
@brophdawg11
Copy link
Contributor

Closing this out, but please re-open if you can provide a reproduction!

@brophdawg11 brophdawg11 closed this as not planned Won't fix, can't repro, duplicate, stale Aug 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug:unverified pm:npm Bugs related to npm
Projects
None yet
Development

No branches or pull requests

3 participants