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

Fix peer dependencies to avoid --legacy-peer-deps #413

Open
wright-luda opened this issue Feb 4, 2023 · 4 comments
Open

Fix peer dependencies to avoid --legacy-peer-deps #413

wright-luda opened this issue Feb 4, 2023 · 4 comments
Labels

Comments

@wright-luda
Copy link

Installation instruction say to simply run npm install.

On my Mac M1 running Venture 13.1, when I run npm install, I get the following:

npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR!
npm ERR! While resolving: [email protected]
npm ERR! Found: [email protected]
npm ERR! node_modules/react
npm ERR! react@"16.12.0" from the root project
npm ERR! peer react@">=16.0.0" from @ant-design/[email protected]
npm ERR! node_modules/@ant-design/icons
npm ERR! @ant-design/icons@"^4.7.0" from [email protected]
npm ERR! node_modules/antd
npm ERR! antd@"4.18.7" from the root project
npm ERR! 47 more (@ant-design/react-slick, @blueprintjs/core, ...)
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer react@"^17.0.2" from [email protected]
npm ERR! node_modules/flexlayout-react
npm ERR! flexlayout-react@"0.6.6" from the root project
npm ERR!
npm ERR! Conflicting peer dependency: [email protected]
npm ERR! node_modules/react
npm ERR! peer react@"^17.0.2" from [email protected]
npm ERR! node_modules/flexlayout-react
npm ERR! flexlayout-react@"0.6.6" 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 /Users/wbagwell/.npm/eresolve-report.txt for a full report.

npm ERR! A complete log of this run can be found in:
npm ERR! /Users/wbagwell/.npm/_logs/2023-02-04T04_42_06_823Z-debug-0.log

Here's the log:
2023-02-04T04_42_06_823Z-debug-0.log

@julien-moreau
Copy link
Contributor

Hey @wright-luda !
I noticed that problem as well and dependencies need to be fixed. For instance you can deal with npm i --legacy-peer-deps so the peer dependencies error does not appear anymore.

@julien-moreau julien-moreau changed the title Npm install does not work on Mac with M1 chip and Ventura 13.1 Fix peer dependencies to avoid --legacy-peer-deps Feb 7, 2023
@johnm
Copy link

johnm commented May 18, 2023

@julien-moreau Note that with the latest version of this repo that npm i --legacy-peer-deps also fails hard:

npm WARN deprecated [email protected]: Debug versions >=3.2.0 <3.2.7 || >=4 <4.3.1 have a low-severity ReDos regression when used in a Node.js environment. It is recommended you upgrade to 3.2.7 or 4.3.1. (https://github.com/visionmedia/debug/issues/797)
npm WARN deprecated [email protected]: Disk image license agreements are deprecated by Apple and will probably be removed in a future macOS release. Discussion at: https://github.com/argv-minus-one/dmg-license/issues/11
npm WARN deprecated [email protected]: This package is unmaintained and deprecated. See the GH Issue 259.
npm WARN deprecated [email protected]: You can find the new Popper v2 at @popperjs/core, this package is dedicated to the legacy v1
npm WARN deprecated [email protected]: "Please update to latest v2.3 or v2.2"
npm WARN deprecated [email protected]: This package is unmaintained and deprecated. See the GH Issue 259.
npm WARN cleanup Failed to remove some directories [
npm WARN cleanup   [
npm WARN cleanup     '/Users/john/Software/john/Luda/BabylonJS/Editor/node_modules/electron-chromedriver',
npm WARN cleanup     [Error: ENOTEMPTY: directory not empty, rmdir '/Users/john/Software/john/Luda/BabylonJS/Editor/node_modules/electron-chromedriver'] {
npm WARN cleanup       errno: -66,
npm WARN cleanup       code: 'ENOTEMPTY',
npm WARN cleanup       syscall: 'rmdir',
npm WARN cleanup       path: '/Users/john/Software/john/Luda/BabylonJS/Editor/node_modules/electron-chromedriver'
npm WARN cleanup     }
npm WARN cleanup   ]
npm WARN cleanup ]
npm ERR! code 1
npm ERR! path /Users/john/Software/john/Luda/BabylonJS/Editor/node_modules/node-pty
npm ERR! command failed
npm ERR! command sh -c node scripts/install.js
npm ERR! CXX(target) Release/obj.target/pty/src/unix/pty.o
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using [email protected]
npm ERR! gyp info using [email protected] | darwin | arm64
npm ERR! gyp info find Python using Python version 3.11.3 found at "/opt/homebrew/opt/[email protected]/bin/python3.11"
npm ERR! gyp info spawn /opt/homebrew/opt/[email protected]/bin/python3.11
npm ERR! gyp info spawn args [
npm ERR! gyp info spawn args   '/Users/john/Software/john/Luda/BabylonJS/Editor/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/john/Software/john/Luda/BabylonJS/Editor/node_modules/node-pty/build/config.gypi',
npm ERR! gyp info spawn args   '-I',
npm ERR! gyp info spawn args   '/Users/john/Software/john/Luda/BabylonJS/Editor/node_modules/node-gyp/addon.gypi',
npm ERR! gyp info spawn args   '-I',
npm ERR! gyp info spawn args   '/Users/john/Library/Caches/node-gyp/20.1.0/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/john/Library/Caches/node-gyp/20.1.0',
npm ERR! gyp info spawn args   '-Dnode_gyp_dir=/Users/john/Software/john/Luda/BabylonJS/Editor/node_modules/node-gyp',
npm ERR! gyp info spawn args   '-Dnode_lib_file=/Users/john/Library/Caches/node-gyp/20.1.0/<(target_arch)/node.lib',
npm ERR! gyp info spawn args   '-Dmodule_root_dir=/Users/john/Software/john/Luda/BabylonJS/Editor/node_modules/node-pty',
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! In file included from ../src/unix/pty.cc:20:
npm ERR! In file included from ../../nan/nan.h:180:
npm ERR! ../../nan/nan_callbacks.h:55:23: error: no member named 'AccessorSignature' in namespace 'v8'
npm ERR! typedef v8::Local<v8::AccessorSignature> Sig;
npm ERR!                   ~~~~^
npm ERR! In file included from ../src/unix/pty.cc:20:
npm ERR! ../../nan/nan.h:686:39: warning: 'IdleNotificationDeadline' is deprecated: Use MemoryPressureNotification() to influence the GC schedule. [-Wdeprecated-declarations]
npm ERR!     return v8::Isolate::GetCurrent()->IdleNotificationDeadline(
npm ERR!                                       ^
npm ERR! /Users/john/Library/Caches/node-gyp/20.1.0/include/node/v8-isolate.h:1291:3: note: 'IdleNotificationDeadline' has been explicitly marked deprecated here
npm ERR!   V8_DEPRECATE_SOON(
npm ERR!   ^
npm ERR! /Users/john/Library/Caches/node-gyp/20.1.0/include/node/v8config.h:550:39: note: expanded from macro 'V8_DEPRECATE_SOON'
npm ERR! # define V8_DEPRECATE_SOON(message) [[deprecated(message)]]
npm ERR!                                       ^
npm ERR! 1 warning and 1 error generated.
npm ERR! make: *** [Release/obj.target/pty/src/unix/pty.o] 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/john/Software/john/Luda/BabylonJS/Editor/node_modules/node-gyp/lib/build.js:194:23)
npm ERR! gyp ERR! stack     at ChildProcess.emit (node:events:511:28)
npm ERR! gyp ERR! stack     at ChildProcess._handle.onexit (node:internal/child_process:293:12)
npm ERR! gyp ERR! System Darwin 21.6.0
npm ERR! gyp ERR! command "/opt/homebrew/Cellar/node/20.1.0/bin/node" "/Users/john/Software/john/Luda/BabylonJS/Editor/node_modules/.bin/node-gyp" "rebuild"
npm ERR! gyp ERR! cwd /Users/john/Software/john/Luda/BabylonJS/Editor/node_modules/node-pty
npm ERR! gyp ERR! node -v v20.1.0
npm ERR! gyp ERR! node-gyp -v v8.4.1
npm ERR! gyp ERR! not ok

@wright-luda
Copy link
Author

I experience a different fatal error when running npm i --legacy-peer-deps :

npm WARN deprecated [email protected]: This package is unmaintained and deprecated. See the GH Issue 259.
npm WARN deprecated [email protected]: You can find the new Popper v2 at @popperjs/core, this package is dedicated to the legacy v1
npm WARN deprecated [email protected]: Disk image license agreements are deprecated by Apple and will probably be removed in a future macOS release. Discussion at: argv-minus-one/dmg-license#11
npm WARN deprecated [email protected]: This package is unmaintained and deprecated. See the GH Issue 259.
npm WARN deprecated [email protected]: "Please update to latest v2.3 or v2.2"
npm WARN deprecated [email protected]: Debug versions >=3.2.0 <3.2.7 || >=4 <4.3.1 have a low-severity ReDos regression when used in a Node.js environment. It is recommended you upgrade to 3.2.7 or 4.3.1. (debug-js/debug#797)

[email protected] postinstall
electron-rebuild && electron-builder install-app-deps && cd module && npm i && cd ../sample-plugin && npm i && cd ../website && npm i && cd ../webpack-extension && npm i && cd ..

⠴ Building module: node-pty, Completed: 0gyp: name 'openssl_fips' is not defined while evaluating condition 'openssl_fips != ""' in binding.gyp while trying to load binding.gyp
✖ Rebuild Failed

An unhandled error occurred inside electron-rebuild
node-gyp failed to rebuild '/Users/wrightbagwell/Documents/GitHub/Editor/node_modules/node-pty'.
For more information, rerun with the DEBUG environment variable set to "electron-rebuild".

Error: gyp failed with exit code: 1

Error: node-gyp failed to rebuild '/Users/wrightbagwell/Documents/GitHub/Editor/node_modules/node-pty'.
For more information, rerun with the DEBUG environment variable set to "electron-rebuild".

Error: gyp failed with exit code: 1

at NodeGyp.rebuildModule (/Users/wrightbagwell/Documents/GitHub/Editor/node_modules/electron-rebuild/lib/src/module-type/node-gyp.js:117:19)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async ModuleRebuilder.rebuildNodeGypModule (/Users/wrightbagwell/Documents/GitHub/Editor/node_modules/electron-rebuild/lib/src/module-rebuilder.js:94:9)
at async ModuleRebuilder.rebuild (/Users/wrightbagwell/Documents/GitHub/Editor/node_modules/electron-rebuild/lib/src/module-rebuilder.js:124:14)
at async Rebuilder.rebuildModuleAt (/Users/wrightbagwell/Documents/GitHub/Editor/node_modules/electron-rebuild/lib/src/rebuild.js:145:13)
at async Rebuilder.rebuild (/Users/wrightbagwell/Documents/GitHub/Editor/node_modules/electron-rebuild/lib/src/rebuild.js:108:17)
at async /Users/wrightbagwell/Documents/GitHub/Editor/node_modules/electron-rebuild/lib/src/cli.js:154:9

npm ERR! code 255
npm ERR! path /Users/wrightbagwell/Documents/GitHub/Editor
npm ERR! command failed
npm ERR! command sh -c -- electron-rebuild && electron-builder install-app-deps && cd module && npm i && cd ../sample-plugin && npm i && cd ../website && npm i && cd ../webpack-extension && npm i && cd ..

@Ksmike
Copy link

Ksmike commented Oct 4, 2023

Not a fix but I found a workaround: I rolled back to Nodev14.21.3 and resolved all the package issues present in future versions. Not Ideal but if you need it to run this works

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

No branches or pull requests

4 participants