You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
$ pnpm i
WARN 2 deprecated subdependencies found: [email protected], [email protected]
Packages: +843
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Progress: resolved 912, reused 844, downloaded 0, added 24, done
node_modules/.pnpm/[email protected]/node_modules/sharp: Running install script, failed in 5.1s
.../[email protected]/node_modules/sharp install$ node install/check
│ sharp: Detected globally-installed libvips v8.15.2
│ sharp: Attempting to build from source via node-gyp
│ sharp: Found node-addon-api
│ sharp: Found node-gyp version 10.1.0
│ sharp: See https://sharp.pixelplumbing.com/install#building-from-source
│ gyp info it worked if it ends with ok
│ gyp info using [email protected]
│ gyp info using [email protected] | darwin | arm64
│ gyp info chdir src
│ gyp info find Python using Python version 3.12.2 found at "/opt/homebrew/opt/[email protected]/bin/python3.12"
│ gyp info spawn /opt/homebrew/opt/[email protected]/bin/python3.12
│ gyp info spawn args [
│ gyp info spawn args '/Users/k/.cache/node/corepack/v1/pnpm/9.0.0-beta.3/dist/node_modules/node-gyp/gyp/gyp_main.py',
│ gyp info spawn args 'binding.gyp',
│ gyp info spawn args '-f',
│ gyp info spawn args 'make',
│ gyp info spawn args '-I',
│ gyp info spawn args '/Users/k/p/next-js-example-winter-2024-atvie/node_modules/.pnpm/[email protected]/node_modules/sharp/src/build/config.gypi',
│ gyp info spawn args '-I',
│ gyp info spawn args '/Users/k/.cache/node/corepack/v1/pnpm/9.0.0-beta.3/dist/node_modules/node-gyp/addon.gypi',
│ gyp info spawn args '-I',
│ gyp info spawn args '/Users/k/Library/Caches/node-gyp/20.12.1/include/node/common.gypi',
│ gyp info spawn args '-Dlibrary=shared_library',
│ gyp info spawn args '-Dvisibility=default',
│ gyp info spawn args '-Dnode_root_dir=/Users/k/Library/Caches/node-gyp/20.12.1',
│ gyp info spawn args '-Dnode_gyp_dir=/Users/k/.cache/node/corepack/v1/pnpm/9.0.0-beta.3/dist/node_modules/node-gyp',
│ gyp info spawn args '-Dnode_lib_file=/Users/k/Library/Caches/node-gyp/20.12.1/<(target_arch)/node.lib',
│ gyp info spawn args '-Dmodule_root_dir=/Users/k/p/next-js-example-winter-2024-atvie/node_modules/.pnpm/[email protected]/node_modules/sharp/src',
│ gyp info spawn args '-Dnode_engine=v8',
│ gyp info spawn args '--depth=.',
│ gyp info spawn args '--no-parallel',
│ gyp info spawn args '--generator-output',
│ gyp info spawn args 'build',
│ gyp info spawn args '-Goutput_dir=.'
│ gyp info spawn args ]
│ <string>:114: SyntaxWarning: invalid escape sequence '\/'
│ gyp info spawn make
│ gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
│ CC(target) Release/obj.target/nothing/../../../../[email protected]/node_modules/node-addon-api/nothing.o
│ LIBTOOL-STATIC Release/nothing.a
│ warning: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool: archive library: Release/nothing.a the table of contents i…
│ TOUCH Release/obj.target/libvips-cpp.stamp
│ CXX(target) Release/obj.target/sharp-darwin-arm64/common.o
│ CXX(target) Release/obj.target/sharp-darwin-arm64/metadata.o
│ ../metadata.cc:233:46: error: no member named 'NewOrCopy' in 'Napi::Buffer<char>'
│ info.Set("exif", Napi::Buffer<char>::NewOrCopy(env, baton->exif, baton->exifLength, sharp::FreeCallback));
│ ~~~~~~~~~~~~~~~~~~~~^
│ ../metadata.cc:236:45: error: no member named 'NewOrCopy' in 'Napi::Buffer<char>'
│ info.Set("icc", Napi::Buffer<char>::NewOrCopy(env, baton->icc, baton->iccLength, sharp::FreeCallback));
│ ~~~~~~~~~~~~~~~~~~~~^
│ ../metadata.cc:239:46: error: no member named 'NewOrCopy' in 'Napi::Buffer<char>'
│ info.Set("iptc", Napi::Buffer<char>::NewOrCopy(env, baton->iptc, baton->iptcLength, sharp::FreeCallback));
│ ~~~~~~~~~~~~~~~~~~~~^
│ ../metadata.cc:242:45: error: no member named 'NewOrCopy' in 'Napi::Buffer<char>'
│ info.Set("xmp", Napi::Buffer<char>::NewOrCopy(env, baton->xmp, baton->xmpLength, sharp::FreeCallback));
│ ~~~~~~~~~~~~~~~~~~~~^
│ ../metadata.cc:246:31: error: no member named 'NewOrCopy' in 'Napi::Buffer<char>'
│ Napi::Buffer<char>::NewOrCopy(env, baton->tifftagPhotoshop,
│ ~~~~~~~~~~~~~~~~~~~~^
│ 5 errors generated.
│ make: *** [Release/obj.target/sharp-darwin-arm64/metadata.o] Error 1
│ gyp ERR! build error
│ gyp ERR! stack Error: `make` failed with exit code: 2
│ gyp ERR! stack at ChildProcess.<anonymous> (/Users/k/.cache/node/corepack/v1/pnpm/9.0.0-beta.3/dist/node_modules/node-gyp/lib/build.js:209:23)
│ gyp ERR! System Darwin 23.4.0
│ gyp ERR! command "/opt/homebrew/Cellar/node@20/20.12.1/bin/node" "/Users/k/.cache/node/corepack/v1/pnpm/9.0.0-beta.3/dist/node_modules/node-gyp/bin/node-gyp.js" "r…
│ gyp ERR! cwd /Users/k/p/next-js-example-winter-2024-atvie/node_modules/.pnpm/[email protected]/node_modules/sharp/src
│ gyp ERR! node -v v20.12.1
│ gyp ERR! node-gyp -v v10.0.1
│ gyp ERR! not ok
└─ Failed in 5.1s at /Users/k/p/next-js-example-winter-2024-atvie/node_modules/.pnpm/[email protected]/node_modules/sharp
ELIFECYCLE Command failed with exit code 1.
Upon further investigation, there is an older version of node-addon-api (version 5.1.0) in the pnpm lockfile, which appears to be causing the issue (sharp requires node-addon-api@>=7.0.0):
What went wrong?
Installing
[email protected]
and[email protected]
together causesno member named
errors:Error logs:
Upon further investigation, there is an older version of
node-addon-api
(version5.1.0
) in the pnpm lockfile, which appears to be causing the issue (sharp
requiresnode-addon-api@>=7.0.0
):Also visible in the
bcrypt
package.json
:node.bcrypt.js/package.json
Line 33 in d8195c6
Removing the
bcrypt
from thepackage.json
appears to make the error go away again.What did you expect to happen?
[email protected]
should be able to coexist with[email protected]
without causingsharp
build failuresWhich version of nodejs and OS?
Node.js: v20.12.1
Package manager: pnpm (latest and v9 beta)
macOS: Sonoma 14.4.1 (23E224)
The text was updated successfully, but these errors were encountered: