Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Windows: ERR_DLOPEN_FAILED: The specified procedure could not be found after ugrading to 0.33.0 with vite-imagetools as dependency #3878

Closed
4 of 10 tasks
mihaipoenaru opened this issue Dec 4, 2023 · 6 comments

Comments

@mihaipoenaru
Copy link

Possible install-time or require-time problem

Are you using the latest version of sharp?

  • I am using the latest version of sharp as reported by npm view sharp dist-tags.latest.

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?

  • I am using Node.js with a version that satisfies ^18.17.0 || ^20.3.0 || >=21.0.0
  • I am using Deno
  • I am using Bun

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?

  • I am using npm >= 9.6.5 with --include=optional
  • I am using yarn >= 3.2.0 and I am not using the "Plug'n'Play" linker
  • I am using pnpm >= 7.1.0 with --no-optional=false
  • I am using Deno
  • I am using Bun

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 dependencies
before opening an issue.

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

PS C:\workspace\immersive-dashboard> npm install --verbose --foreground-scripts sharp
npm verb cli C:\Program Files\nodejs\node.exe C:\Users\mihai.poenaru\AppData\Roaming\npm\node_modules\npm\bin\npm-cli.js
npm info using [email protected]
npm info using [email protected]
npm verb title npm install sharp
npm verb argv "install" "--loglevel" "verbose" "--foreground-scripts" "sharp"
npm verb logfile logs-max:10 dir:C:\Users\mihai.poenaru\AppData\Local\npm-cache_logs\2023-12-04T11_57_33_384Z-
npm verb logfile C:\Users\mihai.poenaru\AppData\Local\npm-cache_logs\2023-12-04T11_57_33_384Z-debug-0.log
npm http fetch GET 200 https://registry.npmjs.org/sharp 149ms (cache hit)
npm verb reify failed optional dependency C:\workspace\immersive-dashboard\node_modules\fsevents
npm verb reify failed optional dependency C:\workspace\immersive-dashboard\node_modules@img\sharp-win32-ia32
npm verb reify failed optional dependency C:\workspace\immersive-dashboard\node_modules@img\sharp-wasm32
npm verb reify failed optional dependency C:\workspace\immersive-dashboard\node_modules@emnapi\runtime
npm verb reify failed optional dependency C:\workspace\immersive-dashboard\node_modules@img\sharp-linuxmusl-x64
npm verb reify failed optional dependency C:\workspace\immersive-dashboard\node_modules@img\sharp-linuxmusl-arm64
npm verb reify failed optional dependency C:\workspace\immersive-dashboard\node_modules@img\sharp-linux-x64
npm verb reify failed optional dependency C:\workspace\immersive-dashboard\node_modules@img\sharp-linux-s390x
npm verb reify failed optional dependency C:\workspace\immersive-dashboard\node_modules@img\sharp-linux-arm64
npm verb reify failed optional dependency C:\workspace\immersive-dashboard\node_modules@img\sharp-linux-arm
npm verb reify failed optional dependency C:\workspace\immersive-dashboard\node_modules@img\sharp-libvips-linuxmusl-x64
npm verb reify failed optional dependency C:\workspace\immersive-dashboard\node_modules@img\sharp-libvips-linuxmusl-arm64
npm verb reify failed optional dependency C:\workspace\immersive-dashboard\node_modules@img\sharp-libvips-linux-x64
npm verb reify failed optional dependency C:\workspace\immersive-dashboard\node_modules@img\sharp-libvips-linux-s390x
npm verb reify failed optional dependency C:\workspace\immersive-dashboard\node_modules@img\sharp-libvips-linux-arm64
npm verb reify failed optional dependency C:\workspace\immersive-dashboard\node_modules@img\sharp-libvips-linux-arm
npm verb reify failed optional dependency C:\workspace\immersive-dashboard\node_modules@img\sharp-libvips-darwin-x64
npm verb reify failed optional dependency C:\workspace\immersive-dashboard\node_modules@img\sharp-libvips-darwin-arm64
npm verb reify failed optional dependency C:\workspace\immersive-dashboard\node_modules@img\sharp-darwin-x64
npm verb reify failed optional dependency C:\workspace\immersive-dashboard\node_modules@img\sharp-darwin-arm64
npm verb reify failed optional dependency C:\workspace\immersive-dashboard\node_modules@esbuild\win32-ia32
npm verb reify failed optional dependency C:\workspace\immersive-dashboard\node_modules@esbuild\win32-arm64
npm verb reify failed optional dependency C:\workspace\immersive-dashboard\node_modules@esbuild\sunos-x64
npm verb reify failed optional dependency C:\workspace\immersive-dashboard\node_modules@esbuild\openbsd-x64
npm verb reify failed optional dependency C:\workspace\immersive-dashboard\node_modules@esbuild\netbsd-x64
npm verb reify failed optional dependency C:\workspace\immersive-dashboard\node_modules@esbuild\linux-x64
npm verb reify failed optional dependency C:\workspace\immersive-dashboard\node_modules@esbuild\linux-s390x
npm verb reify failed optional dependency C:\workspace\immersive-dashboard\node_modules@esbuild\linux-riscv64
npm verb reify failed optional dependency C:\workspace\immersive-dashboard\node_modules@esbuild\linux-ppc64
npm verb reify failed optional dependency C:\workspace\immersive-dashboard\node_modules@esbuild\linux-mips64el
npm verb reify failed optional dependency C:\workspace\immersive-dashboard\node_modules@esbuild\linux-loong64
npm verb reify failed optional dependency C:\workspace\immersive-dashboard\node_modules@esbuild\linux-ia32
npm verb reify failed optional dependency C:\workspace\immersive-dashboard\node_modules@esbuild\linux-arm64
npm verb reify failed optional dependency C:\workspace\immersive-dashboard\node_modules@esbuild\linux-arm
npm verb reify failed optional dependency C:\workspace\immersive-dashboard\node_modules@esbuild\freebsd-x64
npm verb reify failed optional dependency C:\workspace\immersive-dashboard\node_modules@esbuild\freebsd-arm64
npm verb reify failed optional dependency C:\workspace\immersive-dashboard\node_modules@esbuild\darwin-x64
npm verb reify failed optional dependency C:\workspace\immersive-dashboard\node_modules@esbuild\darwin-arm64
npm verb reify failed optional dependency C:\workspace\immersive-dashboard\node_modules@esbuild\android-x64
npm verb reify failed optional dependency C:\workspace\immersive-dashboard\node_modules@esbuild\android-arm64
npm verb reify failed optional dependency C:\workspace\immersive-dashboard\node_modules@esbuild\android-arm
npm http fetch POST 200 https://registry.npmjs.org/-/npm/v1/security/advisories/bulk 931ms

up to date, audited 403 packages in 2s

80 packages are looking for funding
run npm fund for details

found 0 vulnerabilities
npm verb exit 0
npm info ok

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

System:
OS: Windows 10 10.0.19044
CPU: (8) x64 Intel(R) Core(TM) i7-8665U CPU @ 1.90GHz
Memory: 14.80 GB / 31.81 GB
Binaries:
Node: 21.2.0 - C:\Program Files\nodejs\node.EXE
npm: 10.2.4 - C:\Program Files\nodejs\npm.CMD
npmPackages:
sharp: ^0.33.0 => 0.33.0

@mihaipoenaru
Copy link
Author

I'll also paste the entire output from npm run dev:

C:\workspace\immersive-dashboard> npm run dev                                                                                                 

> [email protected] dev
> vite dev

failed to load config from C:\workspace\immersive-dashboard\vite.config.ts
error when starting dev server:
Error: Could not load the "sharp" module using the win32-x64 runtime
ERR_DLOPEN_FAILED: The specified procedure could not be found.
\\?\C:\workspace\immersive-dashboard\node_modules\@img\sharp-win32-x64\lib\sharp-win32-x64.node
Possible solutions:
- Add platform-specific dependencies:
    npm install --os=win32 --cpu=x64 sharp
  or
    npm install --force @img/sharp-win32-x64
- Using the canvas package on Windows? See https://sharp.pixelplumbing.com/install#canvas-and-windows
    at Object.<anonymous> (C:\workspace\immersive-dashboard\node_modules\sharp\lib\sharp.js:85:9)
    at Module._compile (node:internal/modules/cjs/loader:1376:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1435:10)
    at Module.load (node:internal/modules/cjs/loader:1207:32)
    at Module._load (node:internal/modules/cjs/loader:1023:12)
    at Module.require (node:internal/modules/cjs/loader:1235:19)
    at require (node:internal/modules/helpers:176:18)
    at Object.<anonymous> (C:\workspace\immersive-dashboard\node_modules\sharp\lib\constructor.js:10:1)
    at Module._compile (node:internal/modules/cjs/loader:1376:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1435:10)

@lovell
Copy link
Owner

lovell commented Dec 4, 2023

Is canvas also a dependency?

@mihaipoenaru
Copy link
Author

No, here's my package.json

{
	"name": "immersive-dashboard",
	"version": "0.4.0",
	"private": true,
	"scripts": {
		"dev": "vite dev",
		"build": "vite build",
		"preview": "vite preview",
		"test": "playwright test",
		"assemble": "npm run build && playwright test",
		"check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json",
		"check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch",
		"lint": "prettier --plugin-search-dir . --check . && eslint .",
		"format": "prettier --plugin-search-dir . --write ."
	},
	"devDependencies": {
		"@playwright/test": "^1.40.1",
		"@poppanator/sveltekit-svg": "^4.1.3",
		"@sveltejs/adapter-node": "^1.3.1",
		"@sveltejs/kit": "^1.27.6",
		"@typescript-eslint/eslint-plugin": "^6.13.1",
		"@typescript-eslint/parser": "^6.13.1",
		"autoprefixer": "^10.4.16",
		"eslint": "^8.55.0",
		"eslint-config-prettier": "^9.1.0",
		"eslint-plugin-svelte": "^2.35.1",
		"postcss": "^8.4.32",
		"prettier": "^3.1.0",
		"prettier-plugin-svelte": "^3.1.2",
		"sass": "^1.69.5",
		"svelte": "^4.2.8",
		"svelte-check": "^3.6.2",
		"svelte-preprocess": "^5.1.1",
		"tslib": "^2.6.2",
		"typescript": "^5.3.2",
		"vite": "^4.5.0",
		"vite-imagetools": "^6.2.6"
	},
	"type": "module",
	"dependencies": {
		"@badgateway/oauth2-client": "^2.2.4",
		"@google-cloud/storage": "^7.7.0",
		"@img/sharp-win32-x64": "^0.33.0",
		"@popperjs/core": "^2.11.8",
		"@threlte/core": "^7.0.3",
		"@threlte/extras": "^8.0.1",
		"@types/three": "^0.159.0",
		"boosted": "^5.3.2",
		"jwt-decode": "^4.0.0",
		"moment": "^2.29.4",
		"saslprep": "^1.0.3",
		"sharp": "^0.32.6",
		"sveltekit-i18n": "^2.4.2",
		"three": "^0.159.0",
		"vidstack": "^0.6.14"
	}
}

@lovell
Copy link
Owner

lovell commented Dec 4, 2023

There are two conflicting versions of sharp in the dependency tree.

$ npm ls sharp
├── [email protected]
└─┬ [email protected]
  └─┬ [email protected]
    └── [email protected]

You'll need JonasKruckenberg/imagetools#664

@lovell lovell changed the title ERR_DLOPEN_FAILED: The specified procedure could not be found after ugrading to 0.33 Windows: ERR_DLOPEN_FAILED: The specified procedure could not be found after ugrading to 0.33.0 with vite-imagetools as dependency Dec 4, 2023
@mihaipoenaru
Copy link
Author

Ah, I see, makes sense. Thanks. I'll see it's fixed after the release.

@lovell
Copy link
Owner

lovell commented Dec 5, 2023

It looks like a new version of vite-imagetools has now been released.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants