tableau / wdc3

Web Data Connector (WDC), connecting to web application data from Tableau.
6 stars 1 forks source link

Taco Toolkit Installation problem #26

Open gitaf opened 10 months ago

gitaf commented 10 months ago

I keep getting this problem whenever I try to install the taco toolkit through this command: npm install -g @tableau/taco-toolkit

Error message is: "npm WARN deprecated stable@0.1.8: Modern JS already guarantees Array#sort() is a stable sort, so this library is deprecated. See the compatibility table on MDN: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort#browser_compatibility npm ERR! code 1 npm ERR! path /Users/Ahmed/.npm-global/lib/node_modules/@tableau/taco-toolkit/node_modules/isolated-vm npm ERR! command failed npm ERR! command sh -c prebuild-install || (node-gyp rebuild --release -j 4 && node-gyp clean) npm ERR! prebuild-install warn install No prebuilt binaries found (target=21.5.0 runtime=node arch=arm64 libc= platform=darwin) npm ERR! gyp info it worked if it ends with ok npm ERR! gyp info using node-gyp@9.4.0 npm ERR! gyp info using node@21.5.0 | darwin | arm64 npm ERR! gyp ERR! find Python npm ERR! gyp ERR! find Python checking Python explicitly set from NODE_GYP_FORCE_PYTHON npm ERR! gyp ERR! find Python - process.env.NODE_GYP_FORCE_PYTHON is "2.7" npm ERR! gyp ERR! find Python - "2.7" is not in PATH or produced an error npm ERR! gyp ERR! find Python npm ERR! gyp ERR! find Python ** npm ERR! gyp ERR! find Python You need to install the latest version of Python. npm ERR! gyp ERR! find Python Node-gyp should be able to find and use Python. If not, npm ERR! gyp ERR! find Python you can try one of the following options: npm ERR! gyp ERR! find Python - Use the switch --python="/path/to/pythonexecutable" npm ERR! gyp ERR! find Python (accepted by both node-gyp and npm) npm ERR! gyp ERR! find Python - Set the environment variable PYTHON npm ERR! gyp ERR! find Python - Set the npm configuration variable python: npm ERR! gyp ERR! find Python npm config set python "/path/to/pythonexecutable" npm ERR! gyp ERR! find Python For more information consult the documentation at: npm ERR! gyp ERR! find Python https://github.com/nodejs/node-gyp#installation npm ERR! gyp ERR! find Python ** npm ERR! gyp ERR! find Python npm ERR! gyp ERR! configure error npm ERR! gyp ERR! stack Error: Could not find any Python installation to use npm ERR! gyp ERR! stack at PythonFinder.fail (/Users/Ahmed/.npm-global/lib/node_modules/@tableau/taco-toolkit/node_modules/node-gyp/lib/find-python.js:330:47) npm ERR! gyp ERR! stack at PythonFinder.runChecks (/Users/Ahmed/.npm-global/lib/node_modules/@tableau/taco-toolkit/node_modules/node-gyp/lib/find-python.js:159:21) npm ERR! gyp ERR! stack at PythonFinder. (/Users/Ahmed/.npm-global/lib/node_modules/@tableau/taco-toolkit/node_modules/node-gyp/lib/find-python.js:202:16) npm ERR! gyp ERR! stack at PythonFinder.execFileCallback (/Users/Ahmed/.npm-global/lib/node_modules/@tableau/taco-toolkit/node_modules/node-gyp/lib/find-python.js:294:16) npm ERR! gyp ERR! stack at exithandler (node:child_process:430:5) npm ERR! gyp ERR! stack at ChildProcess.errorhandler (node:child_process:442:5) npm ERR! gyp ERR! stack at ChildProcess.emit (node:events:519:28) npm ERR! gyp ERR! stack at ChildProcess._handle.onexit (node:internal/child_process:292:12) npm ERR! gyp ERR! stack at onErrorNT (node:internal/child_process:484:16) npm ERR! gyp ERR! stack at process.processTicksAndRejections (node:internal/process/task_queues:82:21) npm ERR! gyp ERR! System Darwin 23.2.0 npm ERR! gyp ERR! command "/usr/local/bin/node" "/Users/Ahmed/.npm-global/lib/node_modules/@tableau/taco-toolkit/node_modules/.bin/node-gyp" "rebuild" "--release" "-j" "4" npm ERR! gyp ERR! cwd /Users/Ahmed/.npm-global/lib/node_modules/@tableau/taco-toolkit/node_modules/isolated-vm npm ERR! gyp ERR! node -v v21.5.0 npm ERR! gyp ERR! node-gyp -v v9.4.0 npm ERR! gyp ERR! not ok

npm ERR! A complete log of this run can be found in: /Users/Ahmed/.npm/_logs/2024-01-10T10_22_18_062Z-debug-0.log (base) M2vil:~ Ahmed$ NODE_GYP_FORCE_PYTHON=3.11 npm install -g @tableau/taco-toolkit npm WARN deprecated stable@0.1.8: Modern JS already guarantees Array#sort() is a stable sort, so this library is deprecated. See the compatibility table on MDN: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort#browser_compatibility npm ERR! code 1 npm ERR! path /Users/Ahmed/.npm-global/lib/node_modules/@tableau/taco-toolkit/node_modules/libxmljs2 npm ERR! command failed npm ERR! command sh -c node-pre-gyp install --fallback-to-build --loglevel http npm ERR! Failed to execute '/usr/local/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --loglevel=http --module=/Users/Ahmed/.npm-global/lib/node_modules/@tableau/taco-toolkit/node_modules/libxmljs2/build/Release/xmljs.node --module_name=xmljs --module_path=/Users/Ahmed/.npm-global/lib/node_modules/@tableau/taco-toolkit/node_modules/libxmljs2/build/Release --napi_version=9 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v120' (1) npm ERR! (node:13187) [DEP0040] DeprecationWarning: The punycode module is deprecated. Please use a userland alternative instead. npm ERR! (Use node --trace-deprecation ... to show where the warning was created) npm ERR! node-pre-gyp http GET https://github.com/marudor/libxmljs2/releases/download/v0.31.0/node-v120-darwin-arm64-unknown.tar.gz npm ERR! node-pre-gyp ERR! install response status 404 Not Found on https://github.com/marudor/libxmljs2/releases/download/v0.31.0/node-v120-darwin-arm64-unknown.tar.gz npm ERR! node-pre-gyp WARN Pre-built binaries not installable for libxmljs2@0.31.0 and node@21.5.0 (node-v120 ABI, unknown) (falling back to source compile with node-gyp) npm ERR! node-pre-gyp WARN Hit error response status 404 Not Found on https://github.com/marudor/libxmljs2/releases/download/v0.31.0/node-v120-darwin-arm64-unknown.tar.gz npm ERR! gyp info it worked if it ends with ok npm ERR! gyp info using node-gyp@10.0.1 npm ERR! gyp info using node@21.5.0 | darwin | arm64 npm ERR! gyp info ok npm ERR! gyp ERR! find Python npm ERR! gyp ERR! find Python checking Python explicitly set from NODE_GYP_FORCE_PYTHON npm ERR! gyp ERR! find Python - process.env.NODE_GYP_FORCE_PYTHON is "3.11" npm ERR! gyp ERR! find Python - executable path is "" npm ERR! gyp ERR! find Python - "" could not be run npm ERR! gyp ERR! find Python npm ERR! gyp ERR! find Python ** npm ERR! gyp ERR! find Python You need to install the latest version of Python. npm ERR! gyp ERR! find Python Node-gyp should be able to find and use Python. If not, npm ERR! gyp ERR! find Python you can try one of the following options: npm ERR! gyp ERR! find Python - Use the switch --python="/path/to/pythonexecutable" npm ERR! gyp ERR! find Python (accepted by both node-gyp and npm) npm ERR! gyp ERR! find Python - Set the environment variable PYTHON npm ERR! gyp ERR! find Python - Set the npm configuration variable python: npm ERR! gyp ERR! find Python npm config set python "/path/to/pythonexecutable" npm ERR! gyp ERR! find Python For more information consult the documentation at: npm ERR! gyp ERR! find Python https://github.com/nodejs/node-gyp#installation npm ERR! gyp ERR! find Python ** npm ERR! gyp ERR! find Python npm ERR! gyp ERR! configure error npm ERR! gyp ERR! stack Error: Could not find any Python installation to use npm ERR! gyp ERR! stack at PythonFinder.fail (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/find-python.js:306:11) npm ERR! gyp ERR! stack at PythonFinder.findPython (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/find-python.js:164:17) npm ERR! gyp ERR! stack at process.processTicksAndRejections (node:internal/process/task_queues:95:5) npm ERR! gyp ERR! stack at async configure (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:23:18) npm ERR! gyp ERR! stack at async run (/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js:81:18) npm ERR! gyp ERR! System Darwin 23.2.0 npm ERR! gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "configure" "--fallback-to-build" "--loglevel=http" "--module=/Users/Ahmed/.npm-global/lib/node_modules/@tableau/taco-toolkit/node_modules/libxmljs2/build/Release/xmljs.node" "--module_name=xmljs" "--module_path=/Users/Ahmed/.npm-global/lib/node_modules/@tableau/taco-toolkit/node_modules/libxmljs2/build/Release" "--napi_version=9" "--node_abi_napi=napi" "--napi_build_version=0" "--node_napi_label=node-v120" npm ERR! gyp ERR! cwd /Users/Ahmed/.npm-global/lib/node_modules/@tableau/taco-toolkit/node_modules/libxmljs2 npm ERR! gyp ERR! node -v v21.5.0 npm ERR! gyp ERR! node-gyp -v v10.0.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/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --loglevel=http --module=/Users/Ahmed/.npm-global/lib/node_modules/@tableau/taco-toolkit/node_modules/libxmljs2/build/Release/xmljs.node --module_name=xmljs --module_path=/Users/Ahmed/.npm-global/lib/node_modules/@tableau/taco-toolkit/node_modules/libxmljs2/build/Release --napi_version=9 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v120' (1) npm ERR! node-pre-gyp ERR! stack at ChildProcess. (/Users/Ahmed/.npm-global/lib/node_modules/@tableau/taco-toolkit/node_modules/@mapbox/node-pre-gyp/lib/util/compile.js:89:23) npm ERR! node-pre-gyp ERR! stack at ChildProcess.emit (node:events:519:28) npm ERR! node-pre-gyp ERR! stack at maybeClose (node:internal/child_process:1105:16) npm ERR! node-pre-gyp ERR! stack at ChildProcess._handle.onexit (node:internal/child_process:305:5) npm ERR! node-pre-gyp ERR! System Darwin 23.2.0 npm ERR! node-pre-gyp ERR! command "/usr/local/bin/node" "/Users/Ahmed/.npm-global/lib/node_modules/@tableau/taco-toolkit/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build" "--loglevel" "http" npm ERR! node-pre-gyp ERR! cwd /Users/Ahmed/.npm-global/lib/node_modules/@tableau/taco-toolkit/node_modules/libxmljs2 npm ERR! node-pre-gyp ERR! node -v v21.5.0 npm ERR! node-pre-gyp ERR! node-pre-gyp -v v1.0.11 npm ERR! node-pre-gyp ERR! not ok

npm ERR! A complete log of this run can be found in: /Users/Ahmed/.npm/_logs/2024-01-10T10_22_35_969Z-debug-0.log"

Does anyone have a solution for this please ? :)

james1q2w3e commented 5 months ago

Very late but I recently had to go through the pain of installing this toolkit, so I'll share what helped me.

  1. Ensure you have the latest version of python installed (i think the toolkit is expecting 3.12)
  2. I had to set node=gyp's python version to the new version node-gyp --python=python3.12 configure
  3. I also had to separately install a couple other dependencies, as they were hanging on the toolkit's install: • npm i duckdbnpm i ionic duckdb-asyncnpm i node-sass@8.0.0

I don't know if this will help at all, but it's what worked for me after much trial-and-error.