MartinRGB / TweakIt-Desktop

An Android Debugging Application
Apache License 2.0
38 stars 1 forks source link

npm run dev:electron with error that: sh: cross-env: command not found #1

Open michaellee123 opened 2 years ago

michaellee123 commented 2 years ago

There are all the terminal input and print:

TweakIt-Desktop on  main is 📦 v1.0.0 via ⬢ v17.2.0 
➜ npm install --force           
npm WARN using --force Recommended protections disabled.
npm WARN ERESOLVE overriding peer dependency
npm WARN While resolving: react-postprocessing@1.4.0
npm WARN Found: react-three-fiber@5.3.22
npm WARN node_modules/react-three-fiber
npm WARN   dev react-three-fiber@"^5.3.14" from the root project
npm WARN   2 more (@react-three/drei, drei)
npm WARN 
npm WARN Could not resolve dependency:
npm WARN peer react-three-fiber@"^4.2.21" from react-postprocessing@1.4.0
npm WARN node_modules/react-postprocessing
npm WARN   dev react-postprocessing@"^1.4.0" from the root project
npm WARN 
npm WARN Conflicting peer dependency: react-three-fiber@4.2.21
npm WARN node_modules/react-three-fiber
npm WARN   peer react-three-fiber@"^4.2.21" from react-postprocessing@1.4.0
npm WARN   node_modules/react-postprocessing
npm WARN     dev react-postprocessing@"^1.4.0" from the root project
npm WARN ERESOLVE overriding peer dependency
npm WARN While resolving: react-postprocessing@1.4.0
npm WARN Found: three@0.135.0
npm WARN node_modules/three
npm WARN   peer three@">=0.126" from react-three-fiber@5.3.22
npm WARN   node_modules/react-three-fiber
npm WARN     dev react-three-fiber@"^5.3.14" from the root project
npm WARN     2 more (@react-three/drei, drei)
npm WARN   1 more (postprocessing)
npm WARN 
npm WARN Could not resolve dependency:
npm WARN peer three@"^0.120.1" from react-postprocessing@1.4.0
npm WARN node_modules/react-postprocessing
npm WARN   dev react-postprocessing@"^1.4.0" from the root project
npm WARN 
npm WARN Conflicting peer dependency: three@0.120.1
npm WARN node_modules/three
npm WARN   peer three@"^0.120.1" from react-postprocessing@1.4.0
npm WARN   node_modules/react-postprocessing
npm WARN     dev react-postprocessing@"^1.4.0" from the root project
npm WARN ERESOLVE overriding peer dependency
npm WARN While resolving: react-three-fiber@5.3.22
npm WARN Found: react@16.13.1
npm WARN node_modules/react
npm WARN   react@"^16.13.1" from the root project
npm WARN   20 more (@emotion/core, @emotion/styled, @react-three/drei, ...)
npm WARN 
npm WARN Could not resolve dependency:
npm WARN peer react@">=17.0" from react-three-fiber@5.3.22
npm WARN node_modules/react-three-fiber
npm WARN   dev react-three-fiber@"^5.3.14" from the root project
npm WARN   2 more (@react-three/drei, drei)
npm WARN 
npm WARN Conflicting peer dependency: react@17.0.2
npm WARN node_modules/react
npm WARN   peer react@">=17.0" from react-three-fiber@5.3.22
npm WARN   node_modules/react-three-fiber
npm WARN     dev react-three-fiber@"^5.3.14" from the root project
npm WARN     2 more (@react-three/drei, drei)
npm WARN ERESOLVE overriding peer dependency
npm WARN While resolving: react-three-fiber@5.3.22
npm WARN Found: react-dom@16.13.1
npm WARN node_modules/react-dom
npm WARN   react-dom@"^16.13.1" from the root project
npm WARN   10 more (@react-three/drei, @testing-library/react, drei, ...)
npm WARN 
npm WARN Could not resolve dependency:
npm WARN peer react-dom@">=17.0" from react-three-fiber@5.3.22
npm WARN node_modules/react-three-fiber
npm WARN   dev react-three-fiber@"^5.3.14" from the root project
npm WARN   2 more (@react-three/drei, drei)
npm WARN 
npm WARN Conflicting peer dependency: react-dom@17.0.2
npm WARN node_modules/react-dom
npm WARN   peer react-dom@">=17.0" from react-three-fiber@5.3.22
npm WARN   node_modules/react-three-fiber
npm WARN     dev react-three-fiber@"^5.3.14" from the root project
npm WARN     2 more (@react-three/drei, drei)
npm WARN ERESOLVE overriding peer dependency
npm WARN ERESOLVE overriding peer dependency
npm WARN deprecated ini@1.3.5: Please update to ini >=1.3.6 to avoid a prototype pollution issue
npm WARN deprecated request-promise-native@1.0.8: request-promise-native has been deprecated because it extends the now deprecated request package, see https://github.com/request/request/issues/3142
npm WARN deprecated dset@2.0.1: Please use dset@2.1.0 or later for an important security patch
npm WARN deprecated har-validator@5.1.3: this library is no longer supported
npm WARN deprecated urix@0.1.0: Please see https://github.com/lydell/urix#deprecated
npm WARN deprecated fsevents@2.1.3: "Please update to latest v2.3 or v2.2"
npm WARN deprecated resolve-url@0.2.1: https://github.com/lydell/resolve-url#deprecated
npm WARN deprecated debug@3.2.6: 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 sane@4.1.0: some dependency vulnerabilities fixed, support for node < 10 dropped, and newer ECMAScript syntax/features added
npm WARN deprecated debug@3.2.6: 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 fsevents@1.2.13: fsevents 1 will break on node v14+ and could be using insecure binaries. Upgrade to fsevents 2.
npm WARN deprecated chokidar@2.1.8: Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies.
npm WARN deprecated fsevents@1.2.13: fsevents 1 will break on node v14+ and could be using insecure binaries. Upgrade to fsevents 2.
npm WARN deprecated chokidar@2.1.8: Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies.
npm WARN deprecated querystring@0.2.0: The querystring API is considered Legacy. new code should use the URLSearchParams API instead.
npm WARN deprecated uuid@3.4.0: Please upgrade  to version 7 or higher.  Older versions may use Math.random() in certain circumstances, which is known to be problematic.  See https://v8.dev/blog/math-random for details.
npm WARN deprecated uuid@3.4.0: Please upgrade  to version 7 or higher.  Older versions may use Math.random() in certain circumstances, which is known to be problematic.  See https://v8.dev/blog/math-random for details.
npm WARN deprecated uuid@3.4.0: Please upgrade  to version 7 or higher.  Older versions may use Math.random() in certain circumstances, which is known to be problematic.  See https://v8.dev/blog/math-random for details.
npm WARN deprecated react-with-gesture@4.0.8: react-with-gesture is no longer maintained. Please use react-use-gesture https://use-gesture.netlify.com/
npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated react-three-fiber@5.3.22: react-three-fiber has been deprecated, please use @react-three/fiber from now on
npm WARN deprecated drei@2.2.21: drei is now @react-three/drei
npm WARN deprecated core-js@2.6.11: core-js@<3.4 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Please, upgrade your dependencies to the actual version of core-js.
npm ERR! code 1
npm ERR! path /Users/michaellee/WebProjects/TweakIt-Desktop/node_modules/node-pty
npm ERR! command failed
npm ERR! command sh -c node scripts/install.js
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using node-gyp@8.4.0
npm ERR! gyp info using node@17.2.0 | darwin | x64
npm ERR! gyp info find Python using Python version 3.9.9 found at "/usr/local/opt/python@3.9/bin/python3.9"
npm ERR! gyp info spawn /usr/local/opt/python@3.9/bin/python3.9
npm ERR! gyp info spawn args [
npm ERR! gyp info spawn args   '/usr/local/lib/node_modules/npm/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/michaellee/WebProjects/TweakIt-Desktop/node_modules/node-pty/build/config.gypi',
npm ERR! gyp info spawn args   '-I',
npm ERR! gyp info spawn args   '/usr/local/lib/node_modules/npm/node_modules/node-gyp/addon.gypi',
npm ERR! gyp info spawn args   '-I',
npm ERR! gyp info spawn args   '/Users/michaellee/Library/Caches/node-gyp/17.2.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/michaellee/Library/Caches/node-gyp/17.2.0',
npm ERR! gyp info spawn args   '-Dnode_gyp_dir=/usr/local/lib/node_modules/npm/node_modules/node-gyp',
npm ERR! gyp info spawn args   '-Dnode_lib_file=/Users/michaellee/Library/Caches/node-gyp/17.2.0/<(target_arch)/node.lib',
npm ERR! gyp info spawn args   '-Dmodule_root_dir=/Users/michaellee/WebProjects/TweakIt-Desktop/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! xcrun: error: active developer path ("/Applications/Xcode.app/Contents/Developer") does not exist
npm ERR! Use `sudo xcode-select --switch path/to/Xcode.app` to specify the Xcode that you wish to use for command line developer tools, or use `xcode-select --install` to install the standalone command line developer tools.
npm ERR! See `man xcode-select` for more details.
npm ERR! gyp ERR! build error 
npm ERR! gyp ERR! stack Error: `make` failed with exit code: 1
npm ERR! gyp ERR! stack     at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:194: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.2.0
npm ERR! gyp ERR! command "/usr/local/Cellar/node/17.2.0/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
npm ERR! gyp ERR! cwd /Users/michaellee/WebProjects/TweakIt-Desktop/node_modules/node-pty
npm ERR! gyp ERR! node -v v17.2.0
npm ERR! gyp ERR! node-gyp -v v8.4.0
npm ERR! gyp ERR! not ok

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/michaellee/.npm/_logs/2022-01-04T02_44_09_574Z-debug.log

TweakIt-Desktop on  main is 📦 v1.0.0 via ⬢ v17.2.0 took 6m 33s 
➜ npm run dev:electron

> Tweakit@1.0.0 dev:electron
> cross-env NODE_ENV=development webpack --config webpack/electron.webpack.js --mode development && npm run start:electron

sh: cross-env: command not found

Or use npm install --legacy-peer-deps to install, printed same error logs.

And I'm sure the Xcode command line does install.

MartinRGB commented 2 years ago

@michaellee123 you can try the newest update,I did this project 1 years ago,nearly half dependencies is deprecated.I try to fix some recently.but there are still some remaining issues on react-spring react-with-gesture react-three-fiber ws-scrcpy.Luckly the animation list & previewer part is available.

michaellee123 commented 2 years ago

@MartinRGB Thanks for the reply, my local code is all updated, but it's print same logs. I'm an Android Developer, so I don't know much about web development. I wanna try this app, can you package a release version?

michaellee123 commented 2 years ago

@MartinRGB Happy new year!