You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I run npm install --save cld on one of my projects I get the following error:
❯ npm i --save cld
npm ERR! code 1
npm ERR! path /Users/Nacho/Desktop/Fixes algorithm automatic matching/companio_api/node_modules/cld
npm ERR! command failed
npm ERR! command sh -c node-gyp rebuild
npm ERR! CXX(target) Release/obj.target/cld-c/deps/cld/internal/cldutil.o
npm ERR! CXX(target) Release/obj.target/cld-c/deps/cld/internal/cldutil_shared.o
npm ERR! CXX(target) Release/obj.target/cld-c/deps/cld/internal/compact_lang_det.o
npm ERR! CXX(target) Release/obj.target/cld-c/deps/cld/internal/compact_lang_det_hint_code.o
npm ERR! CXX(target) Release/obj.target/cld-c/deps/cld/internal/compact_lang_det_impl.o
npm ERR! CXX(target) Release/obj.target/cld-c/deps/cld/internal/debug.o
npm ERR! CXX(target) Release/obj.target/cld-c/deps/cld/internal/fixunicodevalue.o
npm ERR! CXX(target) Release/obj.target/cld-c/deps/cld/internal/generated_entities.o
npm ERR! CXX(target) Release/obj.target/cld-c/deps/cld/internal/generated_language.o
npm ERR! CXX(target) Release/obj.target/cld-c/deps/cld/internal/generated_ulscript.o
npm ERR! CXX(target) Release/obj.target/cld-c/deps/cld/internal/getonescriptspan.o
npm ERR! CXX(target) Release/obj.target/cld-c/deps/cld/internal/lang_script.o
npm ERR! CXX(target) Release/obj.target/cld-c/deps/cld/internal/offsetmap.o
npm ERR! CXX(target) Release/obj.target/cld-c/deps/cld/internal/scoreonescriptspan.o
npm ERR! CXX(target) Release/obj.target/cld-c/deps/cld/internal/tote.o
npm ERR! CXX(target) Release/obj.target/cld-c/deps/cld/internal/utf8statetable.o
npm ERR! CXX(target) Release/obj.target/cld-c/deps/cld/internal/cld_generated_cjk_uni_prop_80.o
npm ERR! CXX(target) Release/obj.target/cld-c/deps/cld/internal/cld2_generated_cjk_compatible.o
npm ERR! CXX(target) Release/obj.target/cld-c/deps/cld/internal/cld_generated_cjk_delta_bi_32.o
npm ERR! CXX(target) Release/obj.target/cld-c/deps/cld/internal/generated_distinct_bi_0.o
npm ERR! CXX(target) Release/obj.target/cld-c/deps/cld/internal/cld2_generated_quad0122.o
npm ERR! CXX(target) Release/obj.target/cld-c/deps/cld/internal/cld2_generated_deltaocta0122.o
npm ERR! CXX(target) Release/obj.target/cld-c/deps/cld/internal/cld2_generated_deltaoctachrome.o
npm ERR! CXX(target) Release/obj.target/cld-c/deps/cld/internal/cld2_generated_distinctocta0122.o
npm ERR! CXX(target) Release/obj.target/cld-c/deps/cld/internal/cld2_generated_distinctoctachrome.o
npm ERR! CXX(target) Release/obj.target/cld-c/deps/cld/internal/cld2_generated_quadchrome_16.o
npm ERR! CXX(target) Release/obj.target/cld-c/deps/cld/internal/cld2_generated_quadchrome_2.o
npm ERR! CXX(target) Release/obj.target/cld-c/deps/cld/internal/cld_generated_score_quad_octa_0122.o
npm ERR! CXX(target) Release/obj.target/cld-c/deps/cld/internal/cld_generated_score_quad_octa_2.o
npm ERR! LIBTOOL-STATIC Release/cld-c.a
npm ERR! CXX(target) Release/obj.target/cld/src/constants.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 | x64
npm ERR! gyp info find Python using Python version 3.7.2 found at "/usr/local/bin/python3"
npm ERR! gyp info spawn /usr/local/bin/python3
npm ERR! gyp info spawn args [
npm ERR! gyp info spawn args '/Users/Nacho/.nvm/versions/node/v16.14.0/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/Nacho/Desktop/Fixes algorithm automatic matching/companio_api/node_modules/cld/build/config.gypi',
npm ERR! gyp info spawn args '-I',
npm ERR! gyp info spawn args '/Users/Nacho/.nvm/versions/node/v16.14.0/lib/node_modules/npm/node_modules/node-gyp/addon.gypi',
npm ERR! gyp info spawn args '-I',
npm ERR! gyp info spawn args '/Users/Nacho/Library/Caches/node-gyp/16.14.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/Nacho/Library/Caches/node-gyp/16.14.0',
npm ERR! gyp info spawn args '-Dnode_gyp_dir=/Users/Nacho/.nvm/versions/node/v16.14.0/lib/node_modules/npm/node_modules/node-gyp',
npm ERR! gyp info spawn args '-Dnode_lib_file=/Users/Nacho/Library/Caches/node-gyp/16.14.0/<(target_arch)/node.lib',
npm ERR! gyp info spawn args '-Dmodule_root_dir=/Users/Nacho/Desktop/Fixes algorithm automatic matching/companio_api/node_modules/cld',
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! clang: error: no such file or directory: 'algorithm'
npm ERR! clang: error: no such file or directory: 'automatic'
npm ERR! clang: error: no such file or directory: 'matching/companio_api/node_modules/node-addon-api'
npm ERR! make: *** [Release/obj.target/cld/src/constants.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/Nacho/.nvm/versions/node/v16.14.0/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:203:23)
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 23.2.0
npm ERR! gyp ERR! command "/Users/Nacho/.nvm/versions/node/v16.14.0/bin/node" "/Users/Nacho/.nvm/versions/node/v16.14.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
npm ERR! gyp ERR! cwd /Users/Nacho/Desktop/Fixes algorithm automatic matching/companio_api/node_modules/cld
npm ERR! gyp ERR! node -v v16.14.0
npm ERR! gyp ERR! node-gyp -v v9.3.1
npm ERR! gyp ERR! not ok
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/Nacho/.npm/_logs/2024-02-08T13_11_46_214Z-debug-0.log
This seems to be the cause:
610 error clang: error: no such file or directory: 'algorithm'
610 error clang: error: no such file or directory: 'automatic'
610 error clang: error: no such file or directory: 'matching/companio_api/node_modules/node-addon-api'
Things I've tried:
Removing ~/.node-gyp
Installing the latest version of CLD
Re-installing node-gyp, updating to the latest version
Reinstalling Xcode
Updating brew and all packages
Installing cld globally npm i --global cld (this works, but still can't use it in my projects and include it in package.json).
Info:
MacOS Sonoma 14.2.1 (23C71)
Macbook pro Apple M2 Max
❯ npm --version
9.6.2
❯ node --version
v16.14.0
Thanks a lot in advance for your help.
The text was updated successfully, but these errors were encountered:
Ok, I found out what is causing this... The folder was called indeed "Fixes algorithm automatic matching"
So I looked at the error message and it occurred to me that "algorithm", "matching/xxx" looked like broken parts of the directory name. I changed it to something like "fixes_algorithm_automatic_matching" and voilá 🎉 it worked.
So it seems that there is something in the CLD script that is trying to build it without taking into account whitespaces in the directory name. Can you kindly have a look at that when possible?
When I run
npm install --save cld
on one of my projects I get the following error:This seems to be the cause:
Things I've tried:
npm i --global cld
(this works, but still can't use it in my projects and include it in package.json).Info:
Thanks a lot in advance for your help.
The text was updated successfully, but these errors were encountered: