question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Sharp not installing on mbp m1

See original GitHub issue

I have installed VIPs and GCC but sharp is not installing, help is appreciated. here is the error log

npm ERR! code 1 npm ERR! path /Users/salishkumar/Desktop/Desktop/freelannce/gorin systems/sub-backend/node_modules/strapi-plugin-upload/node_modules/sharp npm ERR! command failed npm ERR! command sh -c (node install/libvips && node install/dll-copy && prebuild-install) || (node-gyp rebuild && node install/dll-copy) npm ERR! sharp: Using cached /Users/salishkumar/.npm/_libvips/libvips-8.10.6-darwin-arm64v8.tar.br npm ERR! CC(target) Release/obj.target/nothing/…/node-addon-api/nothing.o npm ERR! LIBTOOL-STATIC Release/nothing.a npm ERR! prebuild-install WARN install No prebuilt binaries found (target=3 runtime=napi arch=arm64 libc= platform=darwin) npm ERR! gyp info it worked if it ends with ok npm ERR! gyp info using node-gyp@3.8.0 npm ERR! gyp info using node@16.11.1 | darwin | arm64 npm ERR! (node:6132) [DEP0150] DeprecationWarning: Setting process.config is deprecated. In the future the property will be read-only. npm ERR! (Use node --trace-deprecation ... to show where the warning was created) npm ERR! gyp info spawn /usr/bin/python2 npm ERR! gyp info spawn args [ npm ERR! gyp info spawn args ‘/Users/salishkumar/Desktop/Desktop/freelannce/gorin systems/sub-backend/node_modules/node-gyp/gyp/gyp_main.py’, npm ERR! gyp info spawn args ‘binding.gyp’, npm ERR! gyp info spawn args ‘-f’, npm ERR! gyp info spawn args ‘make’, npm ERR! gyp info spawn args ‘-I’, npm ERR! gyp info spawn args ‘/Users/salishkumar/Desktop/Desktop/freelannce/gorin systems/sub-backend/node_modules/strapi-plugin-upload/node_modules/sharp/build/config.gypi’, npm ERR! gyp info spawn args ‘-I’, npm ERR! gyp info spawn args ‘/Users/salishkumar/Desktop/Desktop/freelannce/gorin systems/sub-backend/node_modules/node-gyp/addon.gypi’, npm ERR! gyp info spawn args ‘-I’, npm ERR! gyp info spawn args ‘/Users/salishkumar/.node-gyp/16.11.1/include/node/common.gypi’, npm ERR! gyp info spawn args ‘-Dlibrary=shared_library’, npm ERR! gyp info spawn args ‘-Dvisibility=default’, npm ERR! gyp info spawn args ‘-Dnode_root_dir=/Users/salishkumar/.node-gyp/16.11.1’, npm ERR! gyp info spawn args ‘-Dnode_gyp_dir=/Users/salishkumar/Desktop/Desktop/freelannce/gorin systems/sub-backend/node_modules/node-gyp’, npm ERR! gyp info spawn args ‘-Dnode_lib_file=/Users/salishkumar/.node-gyp/16.11.1/<(target_arch)/node.lib’, npm ERR! gyp info spawn args ‘-Dmodule_root_dir=/Users/salishkumar/Desktop/Desktop/freelannce/gorin systems/sub-backend/node_modules/strapi-plugin-upload/node_modules/sharp’, npm ERR! gyp info spawn args ‘-Dnode_engine=v8’, npm ERR! gyp info spawn args ‘–depth=.’, npm ERR! gyp info spawn args ‘–no-parallel’, npm ERR! gyp info spawn args ‘–generator-output’, npm ERR! gyp info spawn args ‘build’, npm ERR! gyp info spawn args ‘-Goutput_dir=.’ npm ERR! gyp info spawn args ] npm ERR! gyp info spawn make npm ERR! gyp info spawn args [ ‘BUILDTYPE=Release’, ‘-C’, ‘build’ ] npm ERR! Traceback (most recent call last): npm ERR! File “./gyp-mac-tool”, line 611, in <module> npm ERR! sys.exit(main(sys.argv[1:])) npm ERR! File “./gyp-mac-tool”, line 28, in main npm ERR! exit_code = executor.Dispatch(args) npm ERR! File “./gyp-mac-tool”, line 43, in Dispatch npm ERR! return getattr(self, method)(*args[1:]) npm ERR! File “./gyp-mac-tool”, line 246, in ExecFilterLibtool npm ERR! if not libtool_re.match(line) and not libtool_re5.match(line): npm ERR! TypeError: cannot use a string pattern on a bytes-like object npm ERR! make: *** [Release/nothing.a] Error 1 npm ERR! gyp ERR! build error npm ERR! gyp ERR! stack Error: make failed with exit code: 2 npm ERR! gyp ERR! stack at ChildProcess.onExit (/Users/salishkumar/Desktop/Desktop/freelannce/gorin systems/sub-backend/node_modules/node-gyp/lib/build.js:262:23) npm ERR! gyp ERR! stack at ChildProcess.emit (node:events:390:28) npm ERR! gyp ERR! stack at Process.ChildProcess._handle.onexit (node:internal/child_process:290:12) npm ERR! gyp ERR! System Darwin 21.1.0 npm ERR! gyp ERR! command “/Users/salishkumar/.nvm/versions/node/v16.11.1/bin/node” “/Users/salishkumar/Desktop/Desktop/freelannce/gorin systems/sub-backend/node_modules/.bin/node-gyp” “rebuild” npm ERR! gyp ERR! cwd /Users/salishkumar/Desktop/Desktop/freelannce/gorin systems/sub-backend/node_modules/strapi-plugin-upload/node_modules/sharp npm ERR! gyp ERR! node -v v16.11.1 npm ERR! gyp ERR! node-gyp -v v3.8.0 npm ERR! gyp ERR! not ok

npm ERR! A complete log of this run can be found in: npm ERR! /Users/salishkumar/.npm/_logs/2021-11-29T15_23_05_505Z-debug.log

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:11 (6 by maintainers)

github_iconTop GitHub Comments

3reactions
lovellcommented, Dec 1, 2021

Please can you confirm that you have completely removed use of the strapi-plugin-upload module and replaced it with @strapi/plugin-upload v4.0.0 (or later).

As an aside, when you’re asking for free, unpaid help from volunteers, please re-consider your use of the “thumbs down” reaction against what they believe is a genuinely useful answer.

0reactions
lovellcommented, Dec 12, 2021

I hope this information helped. Please feel free to re-open with more details if further assistance is required.

Read more comments on GitHub >

github_iconTop Results From Across the Web

MAC M1 Something went wrong installing the "sharp" module
Following these steps from this discussion solved my problem. xcode-select --install; brew install gcc; brew reinstall vips; brew info vips ...
Read more >
Apple M1 cannot install 0.25.4 #3115 - lovell/sharp - GitHub
Possible install-time or require-time problem. [x ] I have read the documentation relating to installation.
Read more >
Sharp error mac m1 - nvh95 Handbook
When running command yarn to install dependencies for a Gatsby project on Mac M1, I encounter this error with sharp:
Read more >
Fixing npm install on an M1 Mac - AJ's Blog
Run xcode-select --install . Homebrew for installing command line utilities on Mac. nvm for installing node, npm, and switching node versions.
Read more >
Installation - High performance Node.js image processing
Check the output of running npm install --verbose --foreground-scripts sharp for useful error messages. Apple M1. Prebuilt sharp and libvips binaries have been ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found