Repository navigation
fix: clean copy_assets output with fs.rm() so it works on Node.js 25+ - #1796
Merged
jorenbroekema merged 1 commit intoOct 28, 2026
Merged
Conversation
The undo step of the copy_assets action removed the copied assets directory with fs.promises.rmdir() and its `recursive` option. Node.js 25 removed that option (DEP0147) and now throws ERR_INVALID_ARG_VALUE, so cleaning a platform with copy_assets failed. Use fs.promises.rm() with `recursive: true` instead, which memfs supports too. Co-Authored-By: Claude Opus 5.5 <[email protected]>
✅ Deploy Preview for styledictionaryjs ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
🦋 Changeset detectedLatest commit: 169adea The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Collaborator
|
Tests also pass on node 22, both linux/windows, so then yeah I'm happy to merge :) thanks |
jorenbroekema
approved these changes
Oct 28, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue #, if available: none
Description of changes:
On Node.js 25 and later, cleaning a platform that uses the
copy_assetsaction fails (cleanPlatform(),cleanAllPlatforms()orstyle-dictionary clean):The undo step removes the copied assets directory with
fs.promises.rmdir(path, { recursive: true }). Node.js 25 moved DEP0147 to end-of-life, sormdir()now throws when it gets therecursiveoption. Node.js 24 only printed a deprecation warning.fs.promises.rm(path, { recursive: true })instead. memfs supports it too, so the browser build keeps working.copy_assetsand checks the assets directory is gone. It fails on Node.js 26 without the fix and passes on 24 and 26 with it.By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
I used Claude Code to write this change.