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

Can't Install opencc in my react native project, My react native version is "react-native": "0.63.3" #667

Open
works4code opened this issue Mar 15, 2022 · 3 comments

Comments

@works4code
Copy link

works4code commented Mar 15, 2022

npm ERR! code 1
npm ERR! path /Users/rakeshthummar/Desktop/Upwork Projects//mobile-frontend/src/frameworks/mobile/node_modules/opencc
npm ERR! command failed
npm ERR! command sh -c node-pre-gyp install --fallback-to-build || node-pre-gyp rebuild
npm ERR! Failed to execute '/usr/local/Cellar/node/17.4.0/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --module=/Users/rakeshthummar/Desktop/Upwork Projects//mobile-frontend/src/frameworks/mobile/node_modules/opencc/build/Release/opencc.node --module_name=opencc --module_path=/Users/rakeshthummar/Desktop/Upwork Projects//mobile-frontend/src/frameworks/mobile/node_modules/opencc/build/Release --napi_version=8 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v102' (1)
npm ERR! Failed to execute '/usr/local/Cellar/node/17.4.0/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js configure --module=/Users/rakeshthummar/Desktop/Upwork Projects//mobile-frontend/src/frameworks/mobile/node_modules/opencc/build/Release/opencc.node --module_name=opencc --module_path=/Users/rakeshthummar/Desktop/Upwork Projects//mobile-frontend/src/frameworks/mobile/node_modules/opencc/build/Release --napi_version=8 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v102' (1)
npm ERR! node-pre-gyp info it worked if it ends with ok
npm ERR! node-pre-gyp info using [email protected]
npm ERR! node-pre-gyp info using [email protected] | darwin | x64
npm ERR! node-pre-gyp WARN Using needle for node-pre-gyp https download
npm ERR! node-pre-gyp info check checked for "/Users/rakeshthummar/Desktop/Upwork Projects//mobile-frontend/src/frameworks/mobile/node_modules/opencc/build/Release/opencc.node" (not found)
npm ERR! node-pre-gyp http GET https://github.com/BYVoid/OpenCC/releases/download/1.1.3/opencc-v1.1.3-node-v102-darwin-x64.tar.gz
npm ERR! node-pre-gyp http 404 https://github.com/BYVoid/OpenCC/releases/download/1.1.3/opencc-v1.1.3-node-v102-darwin-x64.tar.gz
npm ERR! node-pre-gyp WARN Tried to download(404): https://github.com/BYVoid/OpenCC/releases/download/1.1.3/opencc-v1.1.3-node-v102-darwin-x64.tar.gz
npm ERR! node-pre-gyp WARN Pre-built binaries not found for [email protected] and [email protected] (node-v102 ABI, unknown) (falling back to source compile with node-gyp)
npm ERR! node-pre-gyp http 404 status code downloading tarball https://github.com/BYVoid/OpenCC/releases/download/1.1.3/opencc-v1.1.3-node-v102-darwin-x64.tar.gz
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 | x64
npm ERR! gyp info ok
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 | x64
npm ERR! gyp info find Python using Python version 3.9.5 found at "/usr/local/opt/[email protected]/bin/python3.9"
npm ERR! gyp info spawn /usr/local/opt/[email protected]/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/rakeshthummar/Desktop/Upwork Projects//mobile-frontend/src/frameworks/mobile/node_modules/opencc/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/rakeshthummar/Library/Caches/node-gyp/17.4.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/rakeshthummar/Library/Caches/node-gyp/17.4.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/rakeshthummar/Library/Caches/node-gyp/17.4.0/<(target_arch)/node.lib',
npm ERR! gyp info spawn args '-Dmodule_root_dir=/Users/rakeshthummar/Desktop/Upwork Projects//mobile-frontend/src/frameworks/mobile/node_modules/opencc',
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! Traceback (most recent call last):
npm ERR! File "/usr/local/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py", line 45, in
npm ERR! sys.exit(gyp.script_main())
npm ERR! File "/usr/local/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/init.py", line 662, in script_main
npm ERR! return main(sys.argv[1:])
npm ERR! File "/usr/local/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/init.py", line 654, in main
npm ERR! return gyp_main(args)
npm ERR! File "/usr/local/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/init.py", line 639, in gyp_main
npm ERR! generator.GenerateOutput(flat_list, targets, data, params)
npm ERR! File "/usr/local/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/make.py", line 2455, in GenerateOutput
npm ERR! writer.Write(
npm ERR! File "/usr/local/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/make.py", line 798, in Write
npm ERR! self.WriteActions(
npm ERR! File "/usr/local/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/make.py", line 1005, in WriteActions
npm ERR! assert " " not in input, (
npm ERR! AssertionError: Spaces in action input filenames not supported (/Users/rakeshthummar/Desktop/Upwork Projects//mobile-frontend/src/frameworks/mobile/node_modules/opencc/data/dictionary/STCharacters.txt)
npm ERR! gyp ERR! configure error
npm ERR! gyp ERR! stack Error: gyp failed with exit code: 1
npm ERR! gyp ERR! stack at ChildProcess.onCpExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:259:16)
npm ERR! gyp ERR! stack at ChildProcess.emit (node:events:520:28)
npm ERR! gyp ERR! stack at Process.ChildProcess._handle.onexit (node:internal/child_process:291:12)
npm ERR! gyp ERR! System Darwin 21.1.0
npm ERR! gyp ERR! command "/usr/local/Cellar/node/17.4.0/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "configure" "--fallback-to-build" "--module=/Users/rakeshthummar/Desktop/Upwork Projects//mobile-frontend/src/frameworks/mobile/node_modules/opencc/build/Release/opencc.node" "--module_name=opencc" "--module_path=/Users/rakeshthummar/Desktop/Upwork Projects//mobile-frontend/src/frameworks/mobile/node_modules/opencc/build/Release" "--napi_version=8" "--node_abi_napi=napi" "--napi_build_version=0" "--node_napi_label=node-v102"
npm ERR! gyp ERR! cwd /Users/rakeshthummar/Desktop/Upwork Projects//mobile-frontend/src/frameworks/mobile/node_modules/opencc
npm ERR! gyp ERR! node -v v17.4.0
npm ERR! gyp ERR! node-gyp -v v8.4.1
npm ERR! gyp ERR! not ok
npm ERR! node-pre-gyp ERR! build error
npm ERR! node-pre-gyp ERR! stack Error: Failed to execute '/usr/local/Cellar/node/17.4.0/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --module=/Users/rakeshthummar/Desktop/Upwork Projects//mobile-frontend/src/frameworks/mobile/node_modules/opencc/build/Release/opencc.node --module_name=opencc --module_path=/Users/rakeshthummar/Desktop/Upwork Projects//mobile-frontend/src/frameworks/mobile/node_modules/opencc/build/Release --napi_version=8 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v102' (1)
npm ERR! node-pre-gyp ERR! stack at ChildProcess. (/Users/rakeshthummar/Desktop/Upwork Projects//mobile-frontend/src/frameworks/mobile/node_modules/node-pre-gyp/lib/util/compile.js:83:29)
npm ERR! node-pre-gyp ERR! stack at ChildProcess.emit (node:events:520:28)
npm ERR! node-pre-gyp ERR! stack at maybeClose (node:internal/child_process:1090:16)
npm ERR! node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (node:internal/child_process:302:5)
npm ERR! node-pre-gyp ERR! System Darwin 21.1.0
npm ERR! node-pre-gyp ERR! command "/usr/local/Cellar/node/17.4.0/bin/node" "/Users/rakeshthummar/Desktop/Upwork Projects//mobile-frontend/src/frameworks/mobile/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build"
npm ERR! node-pre-gyp ERR! cwd /Users/rakeshthummar/Desktop/Upwork Projects//mobile-frontend/src/frameworks/mobile/node_modules/opencc
npm ERR! node-pre-gyp ERR! node -v v17.4.0
npm ERR! node-pre-gyp ERR! node-pre-gyp -v v0.14.0
npm ERR! node-pre-gyp ERR! not ok
npm ERR! node-pre-gyp info it worked if it ends with ok
npm ERR! node-pre-gyp info using [email protected]
npm ERR! node-pre-gyp info using [email protected] | darwin | x64
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 | x64
npm ERR! gyp info ok
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 | x64
npm ERR! gyp info find Python using Python version 3.9.5 found at "/usr/local/opt/[email protected]/bin/python3.9"
npm ERR! gyp info spawn /usr/local/opt/[email protected]/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/rakeshthummar/Desktop/Upwork Projects//mobile-frontend/src/frameworks/mobile/node_modules/opencc/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/rakeshthummar/Library/Caches/node-gyp/17.4.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/rakeshthummar/Library/Caches/node-gyp/17.4.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/rakeshthummar/Library/Caches/node-gyp/17.4.0/<(target_arch)/node.lib',
npm ERR! gyp info spawn args '-Dmodule_root_dir=/Users/rakeshthummar/Desktop/Upwork Projects//mobile-frontend/src/frameworks/mobile/node_modules/opencc',
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! Traceback (most recent call last):
npm ERR! File "/usr/local/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py", line 45, in
npm ERR! sys.exit(gyp.script_main())
npm ERR! File "/usr/local/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/init.py", line 662, in script_main
npm ERR! return main(sys.argv[1:])
npm ERR! File "/usr/local/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/init.py", line 654, in main
npm ERR! return gyp_main(args)
npm ERR! File "/usr/local/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/init.py", line 639, in gyp_main
npm ERR! generator.GenerateOutput(flat_list, targets, data, params)
npm ERR! File "/usr/local/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/make.py", line 2455, in GenerateOutput
npm ERR! writer.Write(
npm ERR! File "/usr/local/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/make.py", line 798, in Write
npm ERR! self.WriteActions(
npm ERR! File "/usr/local/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/make.py", line 1005, in WriteActions
npm ERR! assert " " not in input, (
npm ERR! AssertionError: Spaces in action input filenames not supported (/Users/rakeshthummar/Desktop/Upwork Projects//mobile-frontend/src/frameworks/mobile/node_modules/opencc/data/dictionary/STCharacters.txt)
npm ERR! gyp ERR! configure error
npm ERR! gyp ERR! stack Error: gyp failed with exit code: 1
npm ERR! gyp ERR! stack at ChildProcess.onCpExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:259:16)
npm ERR! gyp ERR! stack at ChildProcess.emit (node:events:520:28)
npm ERR! gyp ERR! stack at Process.ChildProcess._handle.onexit (node:internal/child_process:291:12)
npm ERR! gyp ERR! System Darwin 21.1.0
npm ERR! gyp ERR! command "/usr/local/Cellar/node/17.4.0/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "configure" "--module=/Users/rakeshthummar/Desktop/Upwork Projects//mobile-frontend/src/frameworks/mobile/node_modules/opencc/build/Release/opencc.node" "--module_name=opencc" "--module_path=/Users/rakeshthummar/Desktop/Upwork Projects//mobile-frontend/src/frameworks/mobile/node_modules/opencc/build/Release" "--napi_version=8" "--node_abi_napi=napi" "--napi_build_version=0" "--node_napi_label=node-v102"
npm ERR! gyp ERR! cwd /Users/rakeshthummar/Desktop/Upwork Projects//mobile-frontend/src/frameworks/mobile/node_modules/opencc
npm ERR! gyp ERR! node -v v17.4.0
npm ERR! gyp ERR! node-gyp -v v8.4.1
npm ERR! gyp ERR! not ok
npm ERR! node-pre-gyp ERR! build error
npm ERR! node-pre-gyp ERR! stack Error: Failed to execute '/usr/local/Cellar/node/17.4.0/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js configure --module=/Users/rakeshthummar/Desktop/Upwork Projects//mobile-frontend/src/frameworks/mobile/node_modules/opencc/build/Release/opencc.node --module_name=opencc --module_path=/Users/rakeshthummar/Desktop/Upwork Projects//mobile-frontend/src/frameworks/mobile/node_modules/opencc/build/Release --napi_version=8 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v102' (1)
npm ERR! node-pre-gyp ERR! stack at ChildProcess. (/Users/rakeshthummar/Desktop/Upwork Projects//mobile-frontend/src/frameworks/mobile/node_modules/node-pre-gyp/lib/util/compile.js:83:29)
npm ERR! node-pre-gyp ERR! stack at ChildProcess.emit (node:events:520:28)
npm ERR! node-pre-gyp ERR! stack at maybeClose (node:internal/child_process:1090:16)
npm ERR! node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (node:internal/child_process:302:5)
npm ERR! node-pre-gyp ERR! System Darwin 21.1.0
npm ERR! node-pre-gyp ERR! command "/usr/local/Cellar/node/17.4.0/bin/node" "/Users/rakeshthummar/Desktop/Upwork Projects//mobile-frontend/src/frameworks/mobile/node_modules/.bin/node-pre-gyp" "rebuild"
npm ERR! node-pre-gyp ERR! cwd /Users/rakeshthummar/Desktop/Upwork Projects//mobile-frontend/src/frameworks/mobile/node_modules/opencc
npm ERR! node-pre-gyp ERR! node -v v17.4.0
npm ERR! node-pre-gyp ERR! node-pre-gyp -v v0.14.0
npm ERR! node-pre-gyp ERR! not ok

npm ERR! A complete log of this run can be found in:
npm ERR! /Users/rakeshthummar/.npm/_logs/2022-03-15T09_15_47_684Z-debug-0.log
rakeshthummar@Rakeshs-Macbook-Pro mobile % ;

@mingyigg
Copy link

me too

@piobmx
Copy link

piobmx commented Jun 26, 2022

Same here. After installing with --legacy-peer-deps lots of errors show up.

@robbiedood
Copy link

robbiedood commented Aug 22, 2022

Great library, especially, supports Nodejs. I got it working using below setup:

Ubuntu 20.04
x64
Node v14.17.6,
npm v8.1.3,
python 3.8 (suggesting sudo apt install python-is-python3)
gcc 10

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

No branches or pull requests

4 participants