lovell / sharp

High performance Node.js image processing, the fastest module to resize JPEG, PNG, WebP, AVIF and TIFF images. Uses the libvips library.
https://sharp.pixelplumbing.com
Apache License 2.0
29.17k stars 1.3k forks source link

electon,win32,ia32,install ok,but pack and run ,it's error,"The specified procedure could not be found." #4180

Closed xhl592576605 closed 1 month ago

xhl592576605 commented 3 months ago

electron: 22.3.6, use pnpm

{
  "name": "SYMH",
  "version": "1.6.7",
  "description": "美育教学客户端",
  "clientUsage": "mohuan",
  "main": "native-out/main.js",
  "scripts": {
    "start": "tsc && cross-env NODE_ENV=prod electron native-out/main.js",
    "electron:dev": " tsc --declaration  && cross-env DEBUG=* NODE_ENV=devp electron native-out/main.js --inspect --remote-debugging-port=9222",
    "electron:watch": "nodemon --config ./native/config/nodemon.json",
    "electron:build": "cross-env NODE_ENV=prod tsc",
    "fronted:dev": "cd frontend && npm run dev",
    "fronted:build": "cd frontend && npm run build",
    "fronted:copy": "node ./script/frontend-copy.js",
    "lint": "eslint native/**/* --ext .vue,.js,.ts,.jsx,.tsx --fix",
    "build-w": "electron-builder -w=nsis --x64 --config ./script/build/config/window.js ",
    "build-w-32": "electron-builder -w=nsis --ia32 --config ./script/build/config/window.js ",
    "build-w-64": "electron-builder -w=nsis --x64 --config ./script/build/config/window.js ",
    "build-w-arm64": "electron-builder -w=nsis --arm64 --config ./script/build/config/window.js ",
    "build-wz": "electron-builder -w=7z --x64 --config ./script/build/config/window.js ",
    "build-wz-32": "electron-builder -w=7z --ia32 --config ./script/build/config/window.js ",
    "build-wz-64": "electron-builder -w=7z --x64 --config ./script/build/config/window.js ",
    "build-wz-arm64": "electron-builder -w=7z --arm64 --config ./script/build/config/window.js ",
    "build-m": "electron-builder -m --config ./script/build/config/mac.js ",
    "build-m-universal": "electron-builder -m --universal --config ./script/build/config/mac.js ",
    "build-m-arm64": "electron-builder -m --arm64 --config ./script/build/config/mac.js ",
    "build-m-64": "electron-builder -m --x64 --config ./script/build/config/mac.js ",
    "build-l": "electron-builder -l=deb --x64 --config ./script/build/config/mac.js ",
    "build-l-32": "electron-builder -l=deb --ia32 --config ./script/build/config/linux.js ",
    "build-l-64": "electron-builder -l=deb --x64 --config ./script/build/config/linux.js ",
    "build-l-arm64": "electron-builder -l=deb --arm64 --config ./script/build/config/linux.js ",
    "build-l-armv7l": "electron-builder -l=deb --armv7l --config ./script/build/config/linux.js ",
    "build-lr-64": "electron-builder -l=rpm --x64 --config ./script/build/config/linux.js ",
    "build-lp-64": "electron-builder -l=pacman --x64 --config ./script/build/config/linux.js ",
    "cz": "cz",
    "postinstall": "electron-builder install-app-deps",
    "prepare": "husky install",
    "changelog": "conventional-changelog -p conventionalcommits -i CHANGELOG.md -k  -t -s -r 0"
  },
  "keywords": [],
  "license": "ISC",
  "devDependencies": {
    "@commitlint/cli": "^17.5.1",
    "@commitlint/config-conventional": "^17.4.4",
    "@electron/rebuild": "^3.2.9",
    "@types/adm-zip": "^0.5.0",
    "@types/ali-oss": "6.16.0",
    "@types/crypto-js": "^4.1.1",
    "@types/electron": "^1.6.10",
    "@types/emscripten": "^1.39.10",
    "@types/extend": "^3.0.1",
    "@types/js-yaml": "^4.0.5",
    "@types/koa": "^2.13.6",
    "@types/koa-router": "^7.4.6",
    "@types/koa-static": "^4.0.2",
    "@types/koa2-cors": "^2.0.2",
    "@types/lodash": "^4.14.194",
    "@types/node": "^18.15.11",
    "@types/node-schedule": "^2.1.0",
    "@types/ping": "^0.4.1",
    "@types/ps-node": "^0.1.1",
    "@types/shelljs": "^0.8.12",
    "@types/uuid": "^9.0.2",
    "@typescript-eslint/eslint-plugin": "^5.58.0",
    "@typescript-eslint/parser": "^5.58.0",
    "chalk": "^4.1.0",
    "clear-console": "^1.1.0",
    "commitizen": "^4.3.0",
    "conventional-changelog-cli": "^3.0.0",
    "cross-env": "^7.0.3",
    "cz-conventional-changelog": "^3.3.0",
    "cz-customizable": "^7.0.0",
    "electron": "^22.3.6",
    "electron-builder": "^23.6.0",
    "eslint": "^8.37.0",
    "eslint-config-prettier": "^8.8.0",
    "eslint-plugin-prettier": "^5.0.0",
    "husky": "^7.0.0",
    "inquirer": "^8.2.5",
    "lint-staged": "^14.0.1",
    "ncp": "^2.0.0",
    "nodemon": "^2.0.22",
    "prettier": "^3.0.0",
    "shelljs": "^0.8.4",
    "smb2": "^0.2.11",
    "spinnies": "^0.5.1",
    "typescript": "^5.0.3"
  },
  "dependencies": {
    "@evideo/easy-volume-next": "^1.2.1",
    "@evideo/font-list": "^1.5.2",
    "adm-zip": "^0.5.10",
    "ali-oss": "6.16.0",
    "axios": "^1.4.0",
    "cli-table3": "^0.6.5",
    "crypto-js": "^4.1.1",
    "dayjs": "^1.11.7",
    "debug": "^4.3.3",
    "diskinfo": "^0.0.3",
    "electron-log": "^4.4.8",
    "electron-updater": "^6.1.1",
    "fs-extra": "^11.1.1",
    "get-port": "^5.1.1",
    "is-type-of": "^1.2.1",
    "js-yaml": "4.1.0",
    "koa": "^2.14.2",
    "koa-router": "^12.0.1",
    "koa-static": "^5.0.0",
    "koa2-connect-history-api-fallback": "^0.1.3",
    "koa2-cors": "2.0.6",
    "lodash": "^4.17.21",
    "mediainfo.js": "^0.2.1",
    "node-schedule": "^2.1.1",
    "ping": "^0.4.4",
    "pinyin-pro": "^3.17.0",
    "ps-node": "^0.1.6",
    "socket.io": "^4.7.2",
    "sudo-prompt": "^9.2.1",
    "systeminformation": "^5.18.10",
    "sharp": "0.33.4",
    "tapable": "^2.2.1",
    "uuid": "^9.0.0"
  },
  "config": {
    "commitizen": {
      "path": "node_modules/cz-customizable"
    }
  },
  "lint-staged": {
    "*.{js,vue,ts,jsx,tsx}": [
      "prettier --write",
      "npm run lint"
    ],
    "*.{html,css,less,scss,md}": [
      "prettier --write"
    ]
  },
  "pnpm": {
    "supportedArchitectures": {
      "os": [
        "win32",
        "darwin",
        "current"
      ],
      "cpu": [
        "ia32",
        "x64",
        "arm64"
      ]
    }
  }
}

WechatIMG188

Possible install-time or require-time problem

You must confirm both of these before continuing.

Are you using the latest version of sharp?

If you cannot confirm this, please upgrade to the latest version and try again before opening an issue.

If you are using another package which depends on a version of sharp that is not the latest, please open an issue against that package instead.

Are you using a supported runtime?

If you cannot confirm any of these, please upgrade to the latest version and try again before opening an issue.

Are you using a supported package manager and installing optional dependencies?

If you cannot confirm any of these, please upgrade to the latest version of your chosen package manager and ensure you are allowing the installation of optional or multi-platform dependencies before opening an issue.

What is the complete error message, including the full stack trace?

What is the complete output of running npm install --verbose --foreground-scripts sharp in an empty directory?

What is the output of running npx envinfo --binaries --system --npmPackages=sharp --npmGlobalPackages=sharp?

lovell commented 3 months ago

There's a lot going on here. Quick guess would be that if you're using pnpm then you need to ensure you've read the electron-builder documentation relating to this e.g. https://www.electron.build/index.html#note-for-pnpm

If you still require help, please provide a complete repo with minimal dependencies that allows someone else to reproduce.

tangshanghai commented 3 months ago

I also encountered the same problem

lovell commented 2 months ago

@xhl592576605 Were you able to make any progress with this? If you still require help, please provide a complete repo with minimal dependencies that allows someone else to reproduce.

lovell commented 1 month ago

Closing due to inactivity but please feel free to reopen with the requested details if further help is required.