google / google/clasp

Punycode Deprecated Error, a Future Major Version of Node.js the Module Will Be Removed

Open
#1,018 6 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
5.8k
Forks
510
Avg merge
5h 27m
Merged PRs (30d)
1

Description

## Expected Behavior

Should not receive a punycode deprecation warning for running `clasp push` or other `clasp` commands that rely on punycode.

## Actual Behavior

When running `clasp push` or other `clasp` commands that rely on punycode, the following deprecation error occurs:

```
(node:79914) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead.
(Use `node --trace-deprecation ...` to show where the warning was created)
```

This issue can be resolved by using the userland-provided `Punycode.js` instead, per the [Node.js v22.9.0 documentation](https://nodejs.org/api/punycode.html#punycode_punycode). Steps to resolve the issue are detailed in the provided documentation.

## Steps to Reproduce the Problem

1. Run `clasp push` or other `clasp` commands that rely on punycode
2. Results in the following error:

```
(node:79914) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead.
(Use `node --trace-deprecation ...` to show where the warning was created)
```

## Specifications

- Node version (`node -v`): 22.9.0
- Version (`clasp -v`): 2.4.2
- OS (Mac/Linux/Windows): Mac

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.