sanity-io / sanity-template-kitchen-sink

A collection of demo examples
105 stars 24 forks source link

NPM Install fails for studio #34

Open AndrewTraub opened 3 years ago

AndrewTraub commented 3 years ago

NPM install fails for the /studio/ directory with this error:

npm ERR! code ERESOLVE npm ERR! ERESOLVE unable to resolve dependency tree npm ERR! npm ERR! While resolving: sanity-rra@1.0.0 npm ERR! Found: react@17.0.2 npm ERR! node_modules/react npm ERR! react@"^17.0.1" from the root project npm ERR! npm ERR! Could not resolve dependency: npm ERR! peer react@"^16.0.0 || ^15.0.0 || ~0.14.0" from react-instagram-embed@1.5.0 npm ERR! node_modules/react-instagram-embed npm ERR! react-instagram-embed@"^1.5.0" from the root project npm ERR! npm ERR! Fix the upstream dependency conflict, or retry npm ERR! this command with --force, or --legacy-peer-deps npm ERR! to accept an incorrect (and potentially broken) dependency resolution. npm ERR! npm ERR! See C:\Users\Andrew\AppData\Local\npm-cache\eresolve-report.txt for a full report.

npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\Andrew\AppData\Local\npm-cache_logs\2021-03-26T14_16_07_266Z-debug.log

Process finished with exit code 1

doublejosh commented 3 years ago

npm install fails for web too

(using node 16.2.0)...

lerna ERR! npm install exited 1 in 'sanity-kitchen-sink-web'
lerna ERR! npm install stdout:

> sharp@0.27.2 install /Users/USER/clones/sanity-template-kitchen-sink/template/web/node_modules/sharp
> (node install/libvips && node install/dll-copy && prebuild-install) || (node-gyp rebuild && node install/dll-copy)

  CC(target) Release/obj.target/nothing/../node-addon-api/nothing.o
  LIBTOOL-STATIC Release/nothing.a
  TOUCH Release/obj.target/libvips-cpp.stamp
  CXX(target) Release/obj.target/sharp/src/common.o

lerna ERR! npm install stderr:
info sharp Downloading https://github.com/lovell/sharp-libvips/releases/download/v8.10.5/libvips-8.10.5-darwin-arm64v8.tar.br
ERR! sharp Prebuilt libvips 8.10.5 binaries are not yet available for darwin-arm64v8
info sharp Attempting to build from source via node-gyp but this may fail due to the above error
info sharp Please see https://sharp.pixelplumbing.com/install for required dependencies
(node:6935) [DEP0150] DeprecationWarning: Setting process.config is deprecated. In the future the property will be read-only.
(Use `node --trace-deprecation ...` to show where the warning was created)
warning: /Library/Developer/CommandLineTools/usr/bin/libtool: archive library: Release/nothing.a the table of contents is empty (no object file members in the library define global symbols)
../src/common.cc:24:10: fatal error: 'vips/vips8' file not found
#include <vips/vips8>
         ^~~~~~~~~~~~
1 error generated.
make: *** [Release/obj.target/sharp/src/common.o] Error 1
gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/opt/homebrew/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:194:23)
gyp ERR! stack     at ChildProcess.emit (node:events:365:28)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (node:internal/child_process:290:12)
gyp ERR! System Darwin 20.3.0
gyp ERR! command "/opt/homebrew/Cellar/node/16.2.0/bin/node" "/opt/homebrew/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/USER/clones/sanity-template-kitchen-sink/template/web/node_modules/sharp
gyp ERR! node -v v16.2.0
gyp ERR! node-gyp -v v7.1.2
gyp ERR! not ok
SpenceDiNicolantonio commented 2 years ago

You can get around this by installing libvips prior to npm install If you have Homebrew, simply run brew install vips (wait for the lengthy install) and then try again.

Reference