-
-
Notifications
You must be signed in to change notification settings - Fork 924
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
[BUG] Node 21 now has a "navigator" object defined on global scope. #2376
Comments
Yes the issue happens on node 21:
|
Causing me build errors even with all Framer Motion components removed from my client side code |
Resolved manually setting Node version |
I tried setting .nvmrc to my node version as well as adding engines property to package.json, this wasn't able to resolve it for me. What did you do? |
Locally, you can switch your Node version using NVM For issues in CI/CD, I had to expressly set the node version in my runner and builder inside my Dockerfile |
Alright, I just did this via nvm install 21.1.0 and nvm use 21.1.0. This doesn't seem to have fixed the issue, I'll probably just wait until the PR gets merged. |
You will need to go down to a version below 21 to get it working. |
this has been fixed in latest release https://github.com/nodejs/node/releases/tag/v21.1.0 [5a52c518ef] - (SEMVER-MINOR) lib: add navigator.userAgent (Yagiz Nizipli) nodejs/node#50200 |
This line no longer works in Node v21 because "navigator" is not on the global scope but it does not have an
userAgent
property.There may be other issues but this is the first one I encountered when upgrading to node 21.
https://github.com/framer/motion/blob/main/packages/framer-motion/src/projection/node/create-projection-node.ts#L2100
The text was updated successfully, but these errors were encountered: