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

can't use "npx remotion upgrade" command in monorepo #4701

Closed
mnlbox opened this issue Jan 6, 2025 · 4 comments · Fixed by #4708
Closed

can't use "npx remotion upgrade" command in monorepo #4701

mnlbox opened this issue Jan 6, 2025 · 4 comments · Fixed by #4708

Comments

@mnlbox
Copy link

mnlbox commented Jan 6, 2025

Hi @JonnyBurger

I have an monorepo for my videos based on pnpm package manager, usually when I'm installing any package I'm using -w parameter to allow pnpm to install packages.

Today I wanted to use npx remotion upgrade command to update my Remotion packages and I realized that it's returning this error and not updating anything but it said ⏫ Remotion has been upgraded! 🤔

This is my terminal output:

npx remotion upgrade
-------------
Version mismatch:
- On version: 4.0.196
  - @remotion/layout-utils
  - @remotion/bundler
  - @remotion/eslint-config
  - @remotion/eslint-plugin
  - @remotion/renderer
  - @remotion/media-utils
  - @remotion/google-fonts
  - @remotion/paths
  - @remotion/zod-types
  - @remotion/tailwind
  - @remotion/animation-utils
  - remotion

- On version: 4.0.194
  - @remotion/cli
  - @remotion/player
  - @remotion/studio
  - @remotion/studio-server
  - @remotion/studio-shared

You may experience breakages such as:
- React context and hooks not working
- Type errors and feature incompatibilities
- Failed renders and unclear errors

To resolve:
- Make sure your package.json has all Remotion packages pointing to the same version.
- Remove the `^` character in front of a version to pin a package.
- Run `npx remotion versions --log=verbose` to see the path of the modules resolved.
-------------

Newest Remotion version is 4.0.245
 ERR_PNPM_ADDING_TO_ROOT  Running this command will add the dependency to the workspace root, which might not be what you want - if you really meant it, make it explicit by running this command again with the -w flag (or --workspace-root). If you don't want to see this warning anymore, you may set the ignore-workspace-root-check setting to true.
⏫ Remotion has been upgraded!
https://remotion.dev/changelog

Look at this section of error:

ERR_PNPM_ADDING_TO_ROOT  Running this command will add the dependency to the workspace root, which might not be what you want - if you really meant it, make it explicit by running this command again with the -w flag (or --workspace-root). If you don't want to see this warning anymore, you may set the ignore-workspace-root-check setting to true.

I also tried something like this npx remotion upgrade -- -w but it didn't pass the -w to PNPM command. How can I use this remotion upgrade command in a monorepo with -w parameter?

@mnlbox
Copy link
Author

mnlbox commented Jan 6, 2025

BTW, I also tried to update my remotion/cli package to same version of other packages (4.0.196) to solve that version mismatch warning in remotion upgrade command output but I'm getting this error:

 ERR_PNPM_NO_MATCHING_VERSION  No matching version found for @remotion/cli@4.0.196

@mnlbox mnlbox changed the title using "Remotion upgrade" command in monorepo can't use "npx remotion upgrade" command in monorepo Jan 6, 2025
@mnlbox
Copy link
Author

mnlbox commented Jan 7, 2025

I updated all of my packages with pnpm up for now but I have these warnings in my terminal, related to @remotion/eslint-config and @remotion/zod-types packages:

├─┬ @remotion/eslint-config 4.0.245
│ ├─┬ @typescript-eslint/parser 6.21.0
│ │ └── ✕ unmet peer eslint@"^7.0.0 || ^8.0.0": found 9.17.0
│ ├─┬ eslint-plugin-react-hooks 4.6.0
│ │ └── ✕ unmet peer eslint@"^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0-0": found 9.17.0
│ ├─┬ @remotion/eslint-plugin 4.0.245
│ │ └─┬ @typescript-eslint/utils 5.19.0
│ │   └── ✕ unmet peer eslint@"^6.0.0 || ^7.0.0 || ^8.0.0": found 9.17.0
│ └─┬ @typescript-eslint/eslint-plugin 6.21.0
│   ├── ✕ unmet peer eslint@"^7.0.0 || ^8.0.0": found 9.17.0
│   └─┬ @typescript-eslint/type-utils 6.21.0
│     ├── ✕ unmet peer eslint@"^7.0.0 || ^8.0.0": found 9.17.0
│     └─┬ @typescript-eslint/utils 6.21.0
│       └── ✕ unmet peer eslint@"^7.0.0 || ^8.0.0": found 9.17.0
└─┬ @remotion/zod-types 4.0.245
  └── ✕ unmet peer zod@3.22.3: found 3.24.1

@mnlbox
Copy link
Author

mnlbox commented Jan 7, 2025

Opps, it seems I can't run my studio command anymore after upgrading with pnpm up to the latest version, because of this error that I have in the terminal:

pnpm exec remotion studio

Server ready - Local: http://localhost:3003, Network: http://192.168.65.3:3003
Built in 2569ms
/mnlbox/node_modules/.pnpm/@remotion+studio-server@4.0.245_@swc+core@1.10.6_@swc+helpers@0.5.15__react-dom@19.0.0_react@_u6duww6jzxvza23lccsarfvheu/node_modules/@remotion/studio-server/dist/helpers/get-installed-dependencies.js:13
    const dependencies = Object.keys(packageJson.dependencies);
                                ^

TypeError: Cannot convert undefined or null to object
    at Function.keys (<anonymous>)
    at getInstalledDependencies (/mnlbox/node_modules/.pnpm/@remotion+studio-server@4.0.245_@swc+core@1.10.6_@swc+helpers@0.5.15__react-dom@19.0.0_react@_u6duww6jzxvza23lccsarfvheu/node_modules/@remotion/studio-server/dist/helpers/get-installed-dependencies.js:13:33)
    at getInstalledInstallablePackages (/mnlbox/node_modules/.pnpm/@remotion+studio-server@4.0.245_@swc+core@1.10.6_@swc+helpers@0.5.15__react-dom@19.0.0_react@_u6duww6jzxvza23lccsarfvheu/node_modules/@remotion/studio-server/dist/helpers/get-installed-installable-packages.js:7:127)
    at handleFallback (/mnlbox/node_modules/.pnpm/@remotion+studio-server@4.0.245_@swc+core@1.10.6_@swc+helpers@0.5.15__react-dom@19.0.0_react@_u6duww6jzxvza23lccsarfvheu/node_modules/@remotion/studio-server/dist/routes.js:58:108)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)

Node.js v20.14.0
Warning: command "pnpm exec remotion studio" exited with non-zero status code

I guess I should downgrade for now until a response from you @JonnyBurger . It seems version 4.0.196 is working without any issues.

@JonnyBurger JonnyBurger linked a pull request Jan 9, 2025 that will close this issue
@JonnyBurger
Copy link
Member

Implementing this and fixing in #4708

But pnpm has a good point, it is uncommon that you add dependencies to the root, I would also suggest adding Remotion to the specific packages instead.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants