bun icon indicating copy to clipboard operation
bun copied to clipboard

Bun install fails where pnpm works

Open Tirke opened this issue 6 months ago • 6 comments

What version of Bun is running?

1.0.18+36c316a24

What platform is your computer?

Darwin 23.1.0 arm64 arm

What steps can reproduce the bug?

#7606 was closed but I still get the exact same error on bun 1.0.18

Run bun install in a fresh project with no node_modules and this package.json:

{
  "name": "install",
  "module": "index.ts",
  "type": "module",
  "dependencies": {
    "@anatine/zod-nestjs": "2.0.3",
    "@anatine/zod-openapi": "2.2.1",
    "@aws-sdk/client-dynamodb": "3.454.0",
    "@aws-sdk/client-kinesis": "3.454.0",
    "@aws-sdk/client-lambda": "3.454.0",
    "@aws-sdk/client-s3": "3.454.0",
    "@aws-sdk/client-secrets-manager": "3.454.0",
    "@aws-sdk/client-sfn": "3.454.0",
    "@aws-sdk/client-sqs": "3.454.0",
    "@aws-sdk/credential-provider-node": "3.451.0",
    "@aws-sdk/lib-dynamodb": "3.454.0",
    "@aws-sdk/s3-request-presigner": "3.454.0",
    "@aws-sdk/signature-v4-crt": "3.451.0",
    "@aws-sdk/util-utf8-node": "3.259.0",
    "@badeball/cypress-cucumber-preprocessor": "19.1.0",
    "@datadog/browser-rum": "5.2.0",
    "@emotion/react": "11.11.1",
    "@emotion/server": "11.11.0",
    "@emotion/styled": "11.11.0",
    "@fastify/cookie": "9.1.0",
    "@fastify/multipart": "8.0.0",
    "@fastify/passport": "2.4.0",
    "@fastify/secure-session": "7.1.0",
    "@fastify/static": "6.12.0",
    "@flatten-js/interval-tree": "1.1.1",
    "@googlemaps/js-api-loader": "1.16.2",
    "@hookform/resolvers": "3.3.2",
    "@hublo/serialize-error": "1.0.0",
    "@hublo/swagger-typescript-types": "3.5.2",
    "@isaacs/ttlcache": "1.4.1",
    "@liaoliaots/nestjs-redis": "9.0.5",
    "@mui/icons-material": "5.14.18",
    "@mui/lab": "5.0.0-alpha.153",
    "@mui/material": "5.14.18",
    "@mui/styles": "5.14.18",
    "@mui/x-date-pickers": "6.18.1",
    "@nestjs/axios": "3.0.1",
    "@nestjs/common": "10.2.8",
    "@nestjs/core": "10.2.8",
    "@nestjs/devtools-integration": "0.1.5",
    "@nestjs/jwt": "10.2.0",
    "@nestjs/mongoose": "10.0.2",
    "@nestjs/passport": "10.0.2",
    "@nestjs/platform-fastify": "10.2.8",
    "@nestjs/schedule": "4.0.0",
    "@nestjs/swagger": "7.1.15",
    "@nestjs/terminus": "10.1.1",
    "@nestjs/throttler": "5.0.1",
    "@opentelemetry/api": "1.7.0",
    "@opentelemetry/context-async-hooks": "1.18.1",
    "@opentelemetry/exporter-metrics-otlp-grpc": "0.45.1",
    "@opentelemetry/exporter-metrics-otlp-http": "0.45.1",
    "@opentelemetry/exporter-trace-otlp-grpc": "0.45.1",
    "@opentelemetry/exporter-trace-otlp-http": "0.45.1",
    "@opentelemetry/resources": "1.18.1",
    "@opentelemetry/sdk-metrics": "1.18.1",
    "@opentelemetry/sdk-node": "0.45.1",
    "@opentelemetry/sdk-trace-base": "1.18.1",
    "@opentelemetry/semantic-conventions": "1.18.1",
    "@prisma/client": "5.5.2",
    "@prisma/instrumentation": "5.5.2",
    "@segment/snippet": "4.16.2",
    "@sendgrid/client": "7.7.0",
    "@sendgrid/mail": "7.7.0",
    "@smithy/node-http-handler": "2.1.9",
    "@tanstack/react-query": "5.8.3",
    "@tanstack/react-query-devtools": "5.8.3",
    "@vvo/tzdb": "6.111.0",
    "agentkeepalive": "4.5.0",
    "algoliasearch": "4.20.0",
    "analytics-node": "6.2.0",
    "angular-expressions": "1.1.9",
    "axios": "1.6.1",
    "axios-retry": "3.9.0",
    "bcryptjs": "2.4.3",
    "case-anything": "2.1.13",
    "chalk": "4.1.2",
    "class-transformer": "0.5.1",
    "class-validator": "0.14.0",
    "client-oauth2": "4.3.3",
    "clsx": "2.0.0",
    "compressorjs": "1.2.1",
    "cookie": "0.6.0",
    "cron": "3.1.3",
    "crypto-random-string": "3.3.1",
    "csv-parse": "5.5.2",
    "csv-stringify": "6.4.4",
    "datadog-lambda-js": "7.99.0",
    "dd-trace": "4.18.0",
    "deep-equal": "2.2.3",
    "docxtemplater": "3.41.0",
    "dotenv": "16.3.1",
    "dotenv-flow": "4.0.1",
    "drizzle-orm": "0.29.0",
    "dynamoose": "3.2.1",
    "email-validator": "2.0.4",
    "fast-xml-parser": "4.3.2",
    "fastify": "4.24.3",
    "form-data": "4.0.0",
    "french-ssn": "4.1.0",
    "fs-extra": "11.1.1",
    "google-libphonenumber": "3.2.33",
    "handlebars": "4.7.8",
    "hpagent": "1.2.0",
    "intl-pluralrules": "2.0.1",
    "ioredis": "5.3.2",
    "jsonschema": "1.4.1",
    "jsonwebtoken": "9.0.2",
    "knex": "3.0.1",
    "launchdarkly-node-server-sdk": "7.0.3",
    "libphonenumber-js": "1.10.49",
    "lodash.merge": "4.6.2",
    "luxon": "3.4.4",
    "mongodb": "6.2.0",
    "mongoose": "8.0.0",
    "nanoid": "3.3.6",
    "nest-router": "1.0.9",
    "next": "14.0.2",
    "next-i18next": "15.0.0",
    "ngraph.graph": "20.0.1",
    "ngraph.path": "1.5.0",
    "notistack": "3.0.1",
    "npm-hublo-toolbox": "2.5.8",
    "oauth": "0.10.0",
    "object-path": "0.11.8",
    "openid-client": "5.6.1",
    "opossum": "8.1.3",
    "p-throttle": "4.1.1",
    "passport": "0.6.0",
    "passport-jwt": "4.0.1",
    "passport-oauth2": "1.7.0",
    "pdf-parse": "1.1.1",
    "pdfjs-dist": "=2.7.x",
    "pg": "8.11.3",
    "pino": "8.16.1",
    "pizzip": "3.1.4",
    "postgres": "3.4.3",
    "prisma": "5.5.2",
    "qs": "6.11.2",
    "react": "18.2.0",
    "react-dom": "18.2.0",
    "react-error-boundary": "4.0.11",
    "react-google-recaptcha": "3.1.0",
    "react-hook-form": "7.48.2",
    "react-phone-number-input": "3.3.7",
    "redis": "4.6.10",
    "reflect-metadata": "0.1.13",
    "regenerator-runtime": "0.14.0",
    "remeda": "1.29.0",
    "rxjs": "7.8.1",
    "split2": "4.2.0",
    "sqs-consumer": "7.4.0",
    "ssh2-sftp-client": "9.1.0",
    "styled-jsx": "5.1.2",
    "tough-cookie": "4.1.3",
    "ts-paths-transform": "2.0.3",
    "tslib": "2.6.2",
    "tss-react": "4.9.3",
    "ua-parser-js": "2.0.0-alpha.3",
    "uuid": "9.0.1",
    "zod": "3.22.4"
  },
  "devDependencies": {
    "@aws-sdk/types": "3.451.0",
    "@babel/core": "7.23.3",
    "@babel/preset-env": "7.23.3",
    "@babel/preset-react": "7.23.3",
    "@babel/preset-typescript": "7.23.3",
    "@bahmutov/cypress-esbuild-preprocessor": "2.2.0",
    "@bahmutov/cypress-extends": "1.1.0",
    "@changesets/cli": "2.26.2",
    "@commitlint/config-conventional": "18.4.2",
    "@cypress/browserify-preprocessor": "3.0.2",
    "@deepsquare/cypress-iframe": "2.0.2",
    "@faker-js/faker": "7.6.0",
    "@jest/types": "29.6.3",
    "@mui/system": "5.14.18",
    "@mui/types": "7.2.9",
    "@nestjs/cli": "10.2.1",
    "@nestjs/schematics": "10.0.3",
    "@nestjs/testing": "10.2.8",
    "@next/bundle-analyzer": "14.0.2",
    "@next/env": "14.0.2",
    "@nx/cypress": "17.1.2",
    "@nx/esbuild": "17.1.2",
    "@nx/eslint": "17.1.2",
    "@nx/eslint-plugin": "17.1.2",
    "@nx/jest": "17.1.2",
    "@nx/js": "17.1.2",
    "@nx/nest": "17.1.2",
    "@nx/next": "17.1.2",
    "@nx/node": "17.1.2",
    "@nx/react": "17.1.2",
    "@nx/rollup": "17.1.2",
    "@nx/storybook": "17.1.2",
    "@nx/web": "17.1.2",
    "@nx/webpack": "17.1.2",
    "@nx/workspace": "17.1.2",
    "@pmmmwh/react-refresh-webpack-plugin": "0.5.11",
    "@pulumi/aws": "6.9.0",
    "@pulumi/aws-native": "0.85.0",
    "@pulumi/awsx": "2.1.1",
    "@pulumi/command": "0.9.2",
    "@pulumi/pulumi": "3.94.2",
    "@storybook/addon-essentials": "7.5.3",
    "@storybook/addon-viewport": "7.5.3",
    "@storybook/nextjs": "7.5.3",
    "@storybook/react": "7.5.3",
    "@svgr/webpack": "8.1.0",
    "@svitejs/changesets-changelog-github-compact": "1.1.0",
    "@swc-node/register": "1.6.8",
    "@swc/core": "1.3.96",
    "@swc/jest": "0.2.29",
    "@testing-library/cypress": "8.0.7",
    "@testing-library/dom": "9.3.3",
    "@testing-library/jest-dom": "6.1.4",
    "@testing-library/react": "14.1.2",
    "@testing-library/user-event": "14.5.1",
    "@types/analytics-node": "3.1.14",
    "@types/aws-lambda": "8.10.126",
    "@types/cache-manager": "4.0.5",
    "@types/css-mediaquery": "0.1.4",
    "@types/escape-html": "1.0.4",
    "@types/express": "4.17.21",
    "@types/fs-extra": "11.0.4",
    "@types/google-libphonenumber": "7.4.30",
    "@types/google.maps": "3.54.8",
    "@types/jest": "29.5.8",
    "@types/jest-when": "3.5.5",
    "@types/json2csv": "5.0.6",
    "@types/jsonwebtoken": "9.0.5",
    "@types/lodash.merge": "4.6.9",
    "@types/luxon": "3.3.4",
    "@types/node": "20.9.2",
    "@types/oauth": "0.9.4",
    "@types/object-path": "0.11.4",
    "@types/opossum": "8.1.6",
    "@types/passport-jwt": "3.0.13",
    "@types/passport-oauth2": "1.4.15",
    "@types/pizzip": "3.0.5",
    "@types/qs": "6.9.10",
    "@types/react": "18.2.37",
    "@types/react-dom": "18.2.15",
    "@types/react-google-recaptcha": "2.1.8",
    "@types/segment-analytics": "0.0.37",
    "@types/split2": "4.2.3",
    "@types/ssh2-sftp-client": "9.0.3",
    "@types/tough-cookie": "4.0.5",
    "@types/ua-parser-js": "0.7.39",
    "@types/uuid": "9.0.7",
    "@typescript-eslint/eslint-plugin": "6.11.0",
    "@typescript-eslint/parser": "6.11.0",
    "aws-sdk-client-mock": "3.0.0",
    "babel-jest": "29.7.0",
    "babel-loader": "9.1.3",
    "commitlint": "18.4.2",
    "cross-env": "7.0.3",
    "css-loader": "6.8.1",
    "css-mediaquery": "0.1.2",
    "cypress": "13.5.1",
    "cypress-downloadfile": "1.2.3",
    "cypress-fill-command": "1.0.2",
    "cypress-log-to-output": "1.1.2",
    "cypress-plugin-api": "2.11.1",
    "cypress-recurse": "1.35.2",
    "cypress-terminal-report": "5.3.9",
    "cypress-wait-until": "2.0.1",
    "enquirer": "2.4.1",
    "esbuild": "0.19.6",
    "esbuild-plugin-copy": "2.1.1",
    "esbuild-register": "3.5.0",
    "eslint": "8.53.0",
    "eslint-config-next": "14.0.2",
    "eslint-config-prettier": "9.0.0",
    "eslint-plugin-cypress": "2.15.1",
    "eslint-plugin-import": "2.29.0",
    "eslint-plugin-jest": "27.6.0",
    "eslint-plugin-jest-dom": "5.1.0",
    "eslint-plugin-jsx-a11y": "6.8.0",
    "eslint-plugin-prettier": "5.0.1",
    "eslint-plugin-react": "7.33.2",
    "eslint-plugin-react-hooks": "4.6.0",
    "eslint-plugin-storybook": "0.6.15",
    "husky": "8.0.3",
    "i18next": "23.7.6",
    "i18next-browser-languagedetector": "7.2.0",
    "i18next-http-backend": "2.4.1",
    "identity-obj-proxy": "3.0.0",
    "jest": "29.7.0",
    "jest-canvas-mock": "2.5.2",
    "jest-environment-jsdom": "29.7.0",
    "jest-fail-on-console": "3.1.1",
    "jest-location-mock": "2.0.0",
    "jest-mock-extended": "3.0.5",
    "jest-mock-process": "2.0.0",
    "jest-useragent-mock": "0.1.1",
    "jest-watch-typeahead": "2.2.2",
    "jest-when": "3.6.0",
    "lint-staged": "15.1.0",    
    "mongodb-memory-server": "9.1.1",
    "msw": "1.3.2",
    "msw-storybook-addon": "1.10.0",
    "next-router-mock": "0.9.10",
    "nx": "17.1.2",
    "os-browserify": "0.3.0",
    "pino-pretty": "10.2.3",
    "prettier": "3.1.0",
    "react-i18next": "13.4.1",
    "react-refresh": "0.14.0",
    "storybook": "7.5.3",
    "storybook-addon-swc": "1.2.0",
    "storybook-dark-mode": "3.0.1",
    "storybook-react-i18next": "2.0.9",
    "style-loader": "3.3.3",
    "stylus": "0.62.0",
    "stylus-loader": "7.1.3",
    "ts-jest": "29.1.1",
    "ts-loader": "9.5.1",
    "ts-node": "10.9.1",
    "tsconfig-paths": "4.2.0",
    "tty-browserify": "0.0.1",
    "typescript": "5.2.2",
    "url-loader": "4.1.1",
    "webpack": "5.89.0",
    "webpack-merge": "5.10.0",
    "worker-loader": "3.0.8",
    "zx": "7.2.3"
  }
}

What is the expected behavior?

Bun install completes (hopefully faster than pnpm)

What do you see instead?

bun install v1.0.18 (36c316a2)
  ⚙️  @swc/core [7/29] node:internal/modules/cjs/loader:1147
  throw err;
  ^

Error: Cannot find module '/Users/tirke/node_modules/node-gyp/bin/node-gyp.js'
    at Module._resolveFilename (node:internal/modules/cjs/loader:1144:15)
    at Module._load (node:internal/modules/cjs/loader:985:27)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:135:12)
    at node:internal/main/run_main_module:28:49 {
  code: 'MODULE_NOT_FOUND',
  requireStack: []
}

Node.js v20.10.0

error: install script from "libpq" exited with code 1 (SIGHUP)

Additional information

No response

Tirke avatar Dec 15 '23 15:12 Tirke

image i got a different error

paperdave avatar Dec 16 '23 01:12 paperdave

You need the pulumi cli: https://www.pulumi.com/docs/install/

This is where I get to on linux x64 with bun 1.0.25, it is the last package: image

medv avatar Feb 08 '24 12:02 medv

Might have been on my end last night, a bit unusual for this connection to have issues. Still, today everything installed just fine: image

Will report back on darwin arm next week if this is still open, otherwise please try [email protected] @Tirke

edit: works fine with [email protected], will come back here after updating to latest kernel if there are any issues otherwise does not look like this issue exists anymore. image

medv avatar Feb 09 '24 00:02 medv

@medv

I ran the install again on 1.0.26+c75e768a6 on Darwin 23.2.0 arm64 arm and the install took so much time I had to cancel it was running for more than 9 minutes on building native deps for @pulumi/aws-native [22/22]

Tirke avatar Feb 10 '24 00:02 Tirke

@Tirke installs fine on 1.0.25+a8ff7be64 and 23.3.0 Darwin arm64.

Have not used 1.0.26 due to issues with handling SIGINT and SIGTERM during --watch on at least linux 6.5.13 (downgrading bun fixes it), but if it didn't work for you on bun 1.0.18 as well as 1.0.26 then I'm not sure - just wanted to see if I could replicate this before committing to using bun and I can't. Both of my systems and now 3 kernels install this with no issues.

medv avatar Feb 10 '24 01:02 medv

@medv thanks for reporting :)

Tirke avatar Feb 11 '24 01:02 Tirke