Skip to content

fix: Fix npm publish error by updating Node.js version in workflow#3921

Merged
mfazekas merged 1 commit into
mainfrom
fix-npm-publish
Aug 8, 2025
Merged

fix: Fix npm publish error by updating Node.js version in workflow#3921
mfazekas merged 1 commit into
mainfrom
fix-npm-publish

Conversation

@mfazekas

@mfazekas mfazekas commented Aug 8, 2025

Copy link
Copy Markdown
Contributor

The publish workflow was using Node.js 14.x which is incompatible with react-native-builder-bob's arktype dependency. This causes the ERR_REQUIRE_ESM error during npm publish.

Changes:

  • Remove duplicate Node.js setup that was overriding the .nvmrc version
  • Update to actions/setup-node@v4 for better compatibility
  • Use yarn install instead of npm install for better module handling
  • Fix deprecated set-output syntax to use GITHUB_OUTPUT

This fixes the "Error [ERR_REQUIRE_ESM]: Must use import to load ES Module" error that was preventing successful npm publishes.

Description

Fixes #

Added your feature that allows ...

Checklist

  • I've read CONTRIBUTING.md
  • I updated the doc/other generated code with running yarn generate in the root folder
  • I have tested the new feature on /example app.
    • In V11 mode/ios
    • In New Architecture mode/ios
    • In V11 mode/android
    • In New Architecture mode/android
  • I added/updated a sample - if a new feature was implemented (/example)

Screenshot OR Video

Component to reproduce the issue you're fixing

The publish workflow was using Node.js 14.x which is incompatible with
react-native-builder-bob's arktype dependency. This causes the
ERR_REQUIRE_ESM error during npm publish.

Changes:
- Remove duplicate Node.js setup that was overriding the .nvmrc version
- Update to actions/setup-node@v4 for better compatibility
- Use yarn install instead of npm install for better module handling
- Fix deprecated set-output syntax to use GITHUB_OUTPUT

This fixes the "Error [ERR_REQUIRE_ESM]: Must use import to load ES Module"
error that was preventing successful npm publishes.
@mfazekas mfazekas merged commit 08463f1 into main Aug 8, 2025
11 checks passed
@mfazekas mfazekas deleted the fix-npm-publish branch August 8, 2025 18:24
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 this pull request may close these issues.

1 participant