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

Newly generated remix app can't be installed due to peer dependency conflicts #26540

Closed
1 of 4 tasks
thdk opened this issue Jun 13, 2024 · 0 comments · Fixed by #26568
Closed
1 of 4 tasks

Newly generated remix app can't be installed due to peer dependency conflicts #26540

thdk opened this issue Jun 13, 2024 · 0 comments · Fixed by #26568

Comments

@thdk
Copy link
Contributor

thdk commented Jun 13, 2024

Current Behavior

Generating a new remix app in a blank nx workspace gives peer dependency conflicts. (Follow up of #26082 )

Expected Behavior

A generated app should always be able to be installed without any problems.

GitHub Repo

No response

Steps to Reproduce

npx create-nx-workspace@latest --ci skip nx-remix --preset ts
cd nx-remix
npm i -D @nx/remix
npx nx g @nx/remix:application --directory apps/remix-app --name remix-app --projectNameAndRootFormat as-provided --unitTestRunner vitest --e2eTestRunner playwright
npm install

❯ npm i
npm error code ERESOLVE
npm error ERESOLVE could not resolve
npm error
npm error While resolving: eslint-plugin-jest@26.9.0
npm error Found: @typescript-eslint/eslint-plugin@7.13.0
npm error node_modules/@typescript-eslint/eslint-plugin
npm error   dev @typescript-eslint/eslint-plugin@"^7.3.0" from the root project
npm error
npm error Could not resolve dependency:
npm error peerOptional @typescript-eslint/eslint-plugin@"^5.0.0" from eslint-plugin-jest@26.9.0
npm error node_modules/eslint-plugin-jest
npm error   eslint-plugin-jest@"^26.9.0" from @remix-run/eslint-config@2.9.2
npm error   node_modules/@remix-run/eslint-config
npm error     dev @remix-run/eslint-config@"^2.8.1" from the root project
npm error   peerOptional eslint-plugin-jest@">=25" from eslint-plugin-playwright@0.15.3
npm error   node_modules/eslint-plugin-playwright
npm error     dev eslint-plugin-playwright@"^0.15.3" from the root project
npm error
npm error Conflicting peer dependency: @typescript-eslint/eslint-plugin@5.62.0
npm error node_modules/@typescript-eslint/eslint-plugin
npm error   peerOptional @typescript-eslint/eslint-plugin@"^5.0.0" from eslint-plugin-jest@26.9.0
npm error   node_modules/eslint-plugin-jest
npm error     eslint-plugin-jest@"^26.9.0" from @remix-run/eslint-config@2.9.2
npm error     node_modules/@remix-run/eslint-config
npm error       dev @remix-run/eslint-config@"^2.8.1" from the root project
npm error     peerOptional eslint-plugin-jest@">=25" from eslint-plugin-playwright@0.15.3
npm error     node_modules/eslint-plugin-playwright
npm error       dev eslint-plugin-playwright@"^0.15.3" from the root project
npm error
npm error Fix the upstream dependency conflict, or retry
npm error this command with --force or --legacy-peer-deps
npm error to accept an incorrect (and potentially broken) dependency resolution.
npm error
npm error
npm error For a full report see:
npm error /Users/thdk/.npm/_logs/2024-06-13T11_17_25_577Z-eresolve-report.txt
npm error A complete log of this run can be found in: /Users/thdk/.npm/_logs/2024-06-13T11_17_25_577Z-debug-0.log

Nx Report

❯ npx nx report

 NX   Report complete - copy this into the issue template

Node   : 22.2.0
OS     : darwin-arm64
npm    : 10.8.0

nx                 : 19.2.3
@nx/js             : 19.2.3
@nx/linter         : 19.2.3
@nx/eslint         : 19.2.3
@nx/workspace      : 19.2.3
@nx/devkit         : 19.2.3
@nx/eslint-plugin  : 19.2.3
@nx/playwright     : 19.2.3
@nx/react          : 19.2.3
@nx/remix          : 19.2.3
@nrwl/tao          : 19.2.3
@nx/vite           : 19.2.3
@nx/web            : 19.2.3
typescript         : 5.4.5
---------------------------------------
Registered Plugins:
@nx/remix/plugin
@nx/vite/plugin
@nx/eslint/plugin
@nx/playwright/plugin

Failure Logs

No response

Package Manager Version

No response

Operating System

  • macOS
  • Linux
  • Windows
  • Other (Please specify)

Additional Information

I believe the @remix-run/eslint-config can be removed from the dependencies since it's also no longer included when generating a new remix app with npx create-remix@latest remix-blank.

Below is the package.json that gets generated by using create-remix.

{
  "name": "remix-blank",
  "private": true,
  "sideEffects": false,
  "type": "module",
  "scripts": {
    "build": "remix vite:build",
    "dev": "remix vite:dev",
    "lint": "eslint --ignore-path .gitignore --cache --cache-location ./node_modules/.cache/eslint .",
    "start": "remix-serve ./build/server/index.js",
    "typecheck": "tsc"
  },
  "dependencies": {
    "@remix-run/node": "^2.9.2",
    "@remix-run/react": "^2.9.2",
    "@remix-run/serve": "^2.9.2",
    "isbot": "^4.1.0",
    "react": "^18.2.0",
    "react-dom": "^18.2.0"
  },
  "devDependencies": {
    "@remix-run/dev": "^2.9.2",
    "@types/react": "^18.2.20",
    "@types/react-dom": "^18.2.7",
    "@typescript-eslint/eslint-plugin": "^6.7.4",
    "@typescript-eslint/parser": "^6.7.4",
    "autoprefixer": "^10.4.19",
    "eslint": "^8.38.0",
    "eslint-import-resolver-typescript": "^3.6.1",
    "eslint-plugin-import": "^2.28.1",
    "eslint-plugin-jsx-a11y": "^6.7.1",
    "eslint-plugin-react": "^7.33.2",
    "eslint-plugin-react-hooks": "^4.6.0",
    "postcss": "^8.4.38",
    "tailwindcss": "^3.4.4",
    "typescript": "^5.1.6",
    "vite": "^5.1.0",
    "vite-tsconfig-paths": "^4.2.1"
  },
  "engines": {
    "node": ">=20.0.0"
  }
}
@thdk thdk added the type: bug label Jun 13, 2024
FrozenPandaz pushed a commit that referenced this issue Jun 26, 2024
…x apps (#26568)

<!-- Please make sure you have read the submission guidelines before
posting an PR -->
<!--
https://github.com/nrwl/nx/blob/master/CONTRIBUTING.md#-submitting-a-pr
-->

<!-- Please make sure that your commit message follows our format -->
<!-- Example: `fix(nx): must begin with lowercase` -->

<!-- If this is a particularly complex change or feature addition, you
can request a dedicated Nx release for this pull request branch. Mention
someone from the Nx team or the `@nrwl/nx-pipelines-reviewers` and they
will confirm if the PR warrants its own release for testing purposes,
and generate it for you if appropriate. -->

## Current Behavior
<!-- This is the behavior we have today -->

When a new remix app is generated with @nx/remix, it can't be installed
due to peer dependencies that are introduced by
@remix-run/eslint-config. This dependency though is not used in the nx
workspace and has also been removed from the official create-remix
method.

## Expected Behavior
<!-- This is the behavior we should expect with the changes in this PR
-->
Running `npm install` should not throw errors after a remix application
was added to the nx workspace.

## Related Issue(s)
<!-- Please link the issue being fixed so it gets closed when this is
merged. -->

Fixes #26540

(cherry picked from commit 1e41672)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants