netlify/cli

bug: import `execa` not found `bun install` failed for `postinstall` script

Closed this issue ยท 3 comments

Describe the bug

  ๐Ÿšš @netlify/build... file:///Volumes/N/Reclaim/zauth/node_modules/@netlify/config/lib/env/git.js:1
import { execa } from 'execa';
         ^^^^^
SyntaxError: Named export 'execa' not found. The requested module 'execa' is a CommonJS module, which may not support all module.exports as named exports.
CommonJS modules can always be imported via the default export, for example using:

import pkg from 'execa';
const { execa } = pkg;

    at ModuleJob._instantiate (node:internal/modules/esm/module_job:132:21)
    at async ModuleJob.run (node:internal/modules/esm/module_job:214:5)
    at async ModuleLoader.import (node:internal/modules/esm/loader:329:24)
    at async loadESM (node:internal/process/esm_loader:28:7)
    at async handleMainPromise (node:internal/modules/run_main:113:12)


Steps to reproduce

    "netlify-cli": "^17.23.1",

bun.lockb.zip

bun install with the bun.lockb attached

Configuration

No response

Environment

System:
OS: macOS 14.5
CPU: (8) arm64 Apple M1
Memory: 100.30 MB / 8.00 GB
Shell: 5.9 - /bin/zsh
Binaries:
Node: 20.11.0 - /usr/local/bin/node
Yarn: 1.22.19 - /opt/homebrew/bin/yarn
npm: 9.8.1 - /opt/homebrew/bin/npm
pnpm: 9.1.0 - /opt/homebrew/bin/pnpm
bun: 1.1.7 - /opt/homebrew/bin/bun
npmPackages:
netlify-cli: ^17.23.1 => 17.27.0
npmGlobalPackages:
netlify-cli: 17.23.1

Note to set:

  "trustedDependencies": [
    "netlify-cli",
]

This is a bug in Bun - please upgrade to Bun v1.1.13

thanks @Jarred-Sumner it worked