Cannot find module 'node-darwin-arm64/package.json'
See original GitHub issueHello I am trying to launch a new project on M1 but I get the error below. Perhaps this may be an incompatibility with the M1 chip?
config: MacOS BigSur 11.5.1 M1 chip yarn :1.22.11 node :v15.14.0
[5/5] 🔨 Rebuilding all packages… [1/13] ⠄ fsevents [8/13] ⠄ core-js [7/13] ⠄ sharp [4/13] ⠄ node error /Users/viktoryia_zgirskaya/work/ewave/platypus-pwa/node_modules/node: Command failed. Exit code: 1 Command: node installArchSpecificPackage Arguments: Directory: /Users/viktoryia_zgirskaya/work/ewave/platypus-pwa/node_modules/node Output: npm ERR! code ETARGET npm ERR! notarget No matching version found for node-darwin-arm64@12.22.4. npm ERR! notarget In most cases you or one of your dependencies are requesting npm ERR! notarget a package version that doesn’t exist.
npm ERR! A complete log of this run can be found in: npm ERR! /Users/viktoryia_zgirskaya/.npm/_logs/2021-08-10T05_53_29_116Z-debug.log node:internal/modules/cjs/loader:927 throw err; ^
Error: Cannot find module ‘node-darwin-arm64/package.json’ Require stack:
- /Users/viktoryia_zgirskaya/work/ewave/platypus-pwa/node_modules/node/installArchSpecificPackage.js at Function.Module._resolveFilename (node:internal/modules/cjs/loader:924:15) at Function.resolve (node:internal/modules/cjs/helpers:98:19) at ChildProcess.<anonymous> (/Users/viktoryia_zgirskaya/work/ewave/platypus-pwa/node_modules/node-bin-setup/index.js:18:27) at ChildProcess.emit (node:events:369:20) at maybeClose (node:internal/child_process:1067:16) at Process.ChildProcess._handle.onexit (node:internal/child_process:301:5) { code: ‘MODULE_NOT_FOUND’, requireStack: [ ‘/Users/viktoryia_zgirskaya/work/ewave/platypus-pwa/node_modules/node/installArchSpecificPackage.js’
warning Error running install script for optional dependency: “/Users/viktoryia_zgirskaya/work/ewave/platypus-pwa/node_modules/sharp: Command failed.
Exit code: 1
Command: (node install/libvips && node install/dll-copy && prebuild-install) || (node-gyp rebuild && node install/dll-copy)
Arguments:
Directory: /Users/viktoryia_zgirskaya/work/ewave/platypus-pwa/node_modules/sharp
Output:
info sharp Downloading https://github.com/lovell/sharp-libvips/releases/download/v8.8.1/libvips-8.8.1-darwin-arm64v8.tar.gz
ERR! sharp Prebuilt libvips 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/page/install for required dependencies
gyp info it worked if it ends with ok
gyp info using node-gyp@7.1.2
gyp info using node@15.14.0 | darwin | arm64
gyp info find Python using Python version 2.7.16 found at "/System/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python"
gyp info spawn /System/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python
gyp info spawn args [
gyp info spawn args ‘/Users/viktoryia_zgirskaya/.nvm/versions/node/v15.14.0/lib/node_modules/npm/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/viktoryia_zgirskaya/work/ewave/platypus-pwa/node_modules/sharp/build/config.gypi’,
gyp info spawn args ‘-I’,
gyp info spawn args ‘/Users/viktoryia_zgirskaya/.nvm/versions/node/v15.14.0/lib/node_modules/npm/node_modules/node-gyp/addon.gypi’,
gyp info spawn args ‘-I’,
gyp info spawn args ‘/Users/viktoryia_zgirskaya/Library/Caches/node-gyp/15.14.0/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/viktoryia_zgirskaya/Library/Caches/node-gyp/15.14.0’,
gyp info spawn args ‘-Dnode_gyp_dir=/Users/viktoryia_zgirskaya/.nvm/versions/node/v15.14.0/lib/node_modules/npm/node_modules/node-gyp’,
gyp info spawn args ‘-Dnode_lib_file=/Users/viktoryia_zgirskaya/Library/Caches/node-gyp/15.14.0/<(target_arch)/node.lib’,
gyp info spawn args ‘-Dmodule_root_dir=/Users/viktoryia_zgirskaya/work/ewave/platypus-pwa/node_modules/sharp’,
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 ]
gyp info spawn make
gyp info spawn args [ ‘BUILDTYPE=Release’, ‘-C’, ‘build’ ]
TOUCH Release/obj.target/libvips-cpp.stamp
CXX(target) Release/obj.target/sharp/src/common.o
…/src/common.cc:25: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 (/Users/viktoryia_zgirskaya/.nvm/versions/node/v15.14.0/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:194:23)
gyp ERR! stack at ChildProcess.emit (node:events:369:20)
gyp ERR! stack at Process.ChildProcess._handle.onexit (node:internal/child_process:290:12)
gyp ERR! System Darwin 20.6.0
gyp ERR! command "/Users/viktoryia_zgirskaya/.nvm/versions/node/v15.14.0/bin/node" "/Users/viktoryia_zgirskaya/.nvm/versions/node/v15.14.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/viktoryia_zgirskaya/work/ewave/platypus-pwa/node_modules/sharp
gyp ERR! node -v v15.14.0
gyp ERR! node-gyp -v v7.1.2
gyp ERR! not ok”
info This module is OPTIONAL, you can safely ignore this error
Issue Analytics
- State:
- Created 2 years ago
- Comments:7 (1 by maintainers)
Reinstalling node with this arch flag worked for me
https://stackoverflow.com/questions/68896696/having-trouble-installing-npm-on-mac-m1
I’m getting this same error. I’m also on a M1 chip macbook