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

@nrwl/workspace@17.2.0 fails with "The punycode module is deprecated. Please use a userland alternative instead." using Yarn 4.0.2 and Node 21.4.0 #20675

Closed
mklueh opened this issue Dec 9, 2023 · 4 comments
Assignees
Labels

Comments

@mklueh
Copy link

mklueh commented Dec 9, 2023

Current Behavior

Install of nx/workspace fails during nx migrate command

Expected Behavior

To work

GitHub Repo

No response

Steps to Reproduce

Node 21.4.0 + Yarn 4.0.2 + nx migrate@17.2.0

See yarnpkg/yarn#9005

Nx Report

Node   : 21.4.0
   OS     : win32-x64
   yarn   : 4.0.2

   nx                 : 17.2.0
   @nx/js             : 17.2.0
   @nx/jest           : 17.2.0
   @nx/linter         : 17.2.0
   @nx/eslint         : 17.2.0
   @nx/workspace      : 17.2.0
   @nx/angular        : 17.2.0
   @nx/cypress        : 17.2.0
   @nx/devkit         : 17.2.0
   @nx/eslint-plugin  : 17.2.0
   @nx/playwright     : 17.2.0
   @nx/react          : 17.2.0
   @nx/storybook      : 17.2.0
   @nrwl/tao          : 15.9.7
   @nx/vite           : 17.2.0
   @nx/web            : 17.2.0
   @nx/webpack        : 17.2.0
   typescript         : 5.3.3
   ---------------------------------------
   Community plugins:
   @jnxplus/nx-gradle                  : 0.17.11
   @jscutlery/semver                   : 4.1.0
   @nxext/vite                         : 15.1.0
   @nxkit/playwright                   : 4.0.0
   @nxkit/style-dictionary             : 4.0.0
   @nxtend/firebase                    : 12.1.0
   @theunderscorer/nx-semantic-release : 2.8.0
   @trumbitta/nx-plugin-openapi        : 1.12.1
   @trumbitta/nx-plugin-unused-deps    : 1.12.1
   nx-vue3-vite                        : 0.26.0
   ---------------------------------------
   The following packages should match the installed version of nx
     - @nrwl/tao@15.9.7

   To fix this, run `nx migrate nx@17.2.0`

Failure Logs

>  NX   The migrate command failed.


 >  NX   Command failed: yarn add -W @nrwl/workspace@17.2.0

   warning package.json: No license field
   warning No license field
   (node:15916) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead.
   (Use `node --trace-deprecation ...` to show where the warning was created)
   error https://registry.yarnpkg.com/@nx/workspace/-/workspace-17.2.0.tgz: Extracting tar content of undefined failed, the file appears to be corrupt: "ENOENT: no such file or directory, stat 'C:\\Users\\User\\AppData\\Local\\Yarn\\Cache\\v6\\npm-@nx-workspace-17.2.0-ef1e399614df0d740529a331ebaab01d6694a1a0-integrity\\node_modules\\@nx\\workspace\\src\\generators\\remove\\schema.json'"
   
   Pass --verbose to see the stacktrace.

Command failed: C:\Users\User\AppData\Local\Temp\tmp-15544-KZSPzLqXSPG7\node_modules\.bin\nx _migrate nx@17.2.0



### Package Manager Version

_No response_

### Operating System

- [ ] macOS
- [ ] Linux
- [X] Windows
- [ ] Other (Please specify)

### Additional Information

_No response_
@mklueh
Copy link
Author

mklueh commented Dec 9, 2023

I could add all failing packages with yarn add without facing this issue. Seems to happen only when using nx migrate.

So better use yarn upgrade-interactive or so and do it without the nx migrate if you facing this issue

@AgentEnder AgentEnder added the scope: core core nx functionality label Dec 21, 2023
@ojemuyiwa
Copy link

ojemuyiwa commented Mar 15, 2024

[DEP0040] DeprecationWarning: The punycode module is deprecated. Please use a userland alternative instead.
This is still an issue in version 18.0.8 and most probably gonna be closed soon. Can you please npm install punycode --save-dev and Replace this: const punycode = require('punycode'); With this: const punycode = require('punycode/'); where needed if needed so we can all continue using Nx. Also version 18 cannot build or serve Next.js websites anymore with all sorts of issues including svgr broken and SyntaxError: Unexpected token '(', "(node:1429"... is not valid JSON

@FrozenPandaz
Copy link
Collaborator

@nx/workspace no longer depends on punycode 🎉

Copy link

This issue has been closed for more than 30 days. If this issue is still occuring, please open a new issue with more recent context.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 14, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

4 participants