Skip to content
This repository has been archived by the owner on Sep 12, 2023. It is now read-only.

[Addon] Update preinstall script & bump version to 0.8.3 #4

Merged
merged 2 commits into from
Oct 20, 2021

Conversation

dm4
Copy link
Member

@dm4 dm4 commented Oct 20, 2021

No description provided.

@hydai hydai linked an issue Oct 20, 2021 that may be closed by this pull request
@hydai hydai mentioned this pull request Oct 20, 2021
@dm4 dm4 changed the title [WIP] Update preinstall script & bump version to 0.8.3 [Addon] Update preinstall script & bump version to 0.8.3 Oct 20, 2021
@dm4 dm4 requested a review from hydai October 20, 2021 06:35
@hydai hydai merged commit 848bc68 into master Oct 20, 2021
@hydai hydai deleted the dm4/new-install-script branch October 20, 2021 07:03
@tpmccallum
Copy link
Contributor

Hi @hydai
I get the following error when I try to install wasmedge-extensions

Installation command

npm install --build-from-source https://github.com/second-state/wasmedge-extensions

Error result

npm install --build-from-source https://github.com/second-state/wasmedge-extensions
npm ERR! code 1
npm ERR! git dep preparation failed
npm ERR! command /usr/bin/node /usr/lib/node_modules/npm/bin/npm-cli.js install --force --cache=/home/tpmccallum/.npm --prefer-offline=false --prefer-online=false --offline=false --no-progress --no-save --no-audit
npm ERR! > wasmedge-extensions@0.8.3 preinstall
npm ERR! > ./scripts/preinstall.sh
npm ERR! 
npm ERR! No root permissions.
npm ERR! Installation path found at /home/tpmccallum/.wasmedge
npm ERR! Removing /home/tpmccallum/.wasmedge//bin/wasmedge
npm ERR! Removing /home/tpmccallum/.wasmedge//bin/wasmedgec
npm ERR! Removing /home/tpmccallum/.wasmedge//lib/libwasmedge_c.so
npm ERR! Removing /home/tpmccallum/.wasmedge//include/wasmedge.h
npm ERR! Removing /home/tpmccallum/.wasmedge/lib/libjpeg.so.8.3.0
npm ERR! Removing /home/tpmccallum/.wasmedge/lib/libpng16.so.16.37.0
npm ERR! Removing /home/tpmccallum/.wasmedge/lib/libjpeg.so
npm ERR! Removing /home/tpmccallum/.wasmedge/lib/libjpeg.so.8
npm ERR! Removing /home/tpmccallum/.wasmedge/lib/libpng.so
npm ERR! Removing /home/tpmccallum/.wasmedge/lib/libpng16.so
npm ERR! Removing /home/tpmccallum/.wasmedge/lib/libpng16.so.16
npm ERR! Removing /home/tpmccallum/.wasmedge/include/wasmedge-image.h
npm ERR! Removing /home/tpmccallum/.wasmedge/lib/libwasmedge-image_c.so
npm ERR! Removing /home/tpmccallum/.wasmedge/lib/libtensorflow.so.2.4.0
npm ERR! Removing /home/tpmccallum/.wasmedge/lib/libtensorflow_framework.so.2.4.0
npm ERR! Removing /home/tpmccallum/.wasmedge/lib/libtensorflowlite_c.so
npm ERR! Removing /home/tpmccallum/.wasmedge/lib/libtensorflow.so.2
npm ERR! Removing /home/tpmccallum/.wasmedge/lib/libtensorflow.so
npm ERR! Removing /home/tpmccallum/.wasmedge/lib/libtensorflow_framework.so.2
npm ERR! Removing /home/tpmccallum/.wasmedge/lib/libtensorflow_framework.so
npm ERR! Removing /home/tpmccallum/.wasmedge/include/wasmedge-tensorflow.h
npm ERR! Removing /home/tpmccallum/.wasmedge/lib/libwasmedge-tensorflow_c.so
npm ERR! Removing /home/tpmccallum/.wasmedge/include/wasmedge-tensorflowlite.h
npm ERR! Removing /home/tpmccallum/.wasmedge/lib/libwasmedge-tensorflowlite_c.so
npm ERR! Removing /home/tpmccallum/.wasmedge/bin/show-tflite-tensor
npm ERR! Removing /home/tpmccallum/.wasmedge/bin/wasmedge-tensorflow
npm ERR! Removing /home/tpmccallum/.wasmedge/bin/wasmedge-tensorflow-lite
npm ERR! Removing /home/tpmccallum/.wasmedge/bin/wasmedgec-tensorflow
npm ERR! Removing /home/tpmccallum/.wasmedge/env
npm ERR! Removing /home/tpmccallum/.wasmedge/include
npm ERR! Removing /home/tpmccallum/.wasmedge/lib
npm ERR! Removing /home/tpmccallum/.wasmedge/bin
npm ERR! Removing /home/tpmccallum/.wasmedge
npm ERR! No root permissions.
npm ERR! Detected Linux-x86_64
npm ERR! WasmEdge Installation at /home/tpmccallum/.wasmedge
npm ERR! Fetching WasmEdge-0.8.2
npm ERR! Installing WasmEdge-0.8.2-Linux in /home/tpmccallum/.wasmedge/include 
npm ERR! Installing WasmEdge-0.8.2-Linux in /home/tpmccallum/.wasmedge/lib 
npm ERR! Installing WasmEdge-0.8.2-Linux in /home/tpmccallum/.wasmedge/bin 
npm ERR! Image & Tensorflow extensions
npm ERR! Fetching WasmEdge-image-deps-0.8.2
npm ERR! Fetching WasmEdge-image-0.8.2
npm ERR! Fetching WasmEdge-tensorflow-deps-TF-0.8.0
npm ERR! Fetching WasmEdge-tensorflow-deps-TFLite-0.8.0
npm ERR! Fetching WasmEdge-tensorflow-0.8.2
npm ERR! Fetching WasmEdge-tensorflowlite-0.8.2
npm ERR! Fetching WasmEdge-tensorflow-tools-0.8.2
npm ERR! WasmEdge binaries accessible
npm ERR! 
npm ERR! > wasmedge-extensions@0.8.3 install
npm ERR! > node-pre-gyp install --fallback-to-build
npm ERR! 
npm ERR! make: Entering directory '/home/tpmccallum/.npm/_cacache/tmp/git-clone-32551a12/build'
npm ERR!   CXX(target) Release/obj.target/wasmedge-extensions/wasmedgeaddon.o
npm ERR! make: Leaving directory '/home/tpmccallum/.npm/_cacache/tmp/git-clone-32551a12/build'
npm ERR! Failed to execute '/usr/bin/node /usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/home/tpmccallum/.npm/_cacache/tmp/git-clone-32551a12/lib/binding/linux-x64/wasmedge-extensions.node --module_name=wasmedge-extensions --module_path=/home/tpmccallum/.npm/_cacache/tmp/git-clone-32551a12/lib/binding/linux-x64 --napi_version=8 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v88' (1)
npm ERR! npm WARN using --force Recommended protections disabled.
npm ERR! --2021-10-20 21:08:48--  https://raw.githubusercontent.com/WasmEdge/WasmEdge/master/utils/uninstall.sh
npm ERR! Resolving raw.githubusercontent.com (raw.githubusercontent.com)... 185.199.109.133, 185.199.108.133, 185.199.111.133, ...
npm ERR! Connecting to raw.githubusercontent.com (raw.githubusercontent.com)|185.199.109.133|:443... connected.
npm ERR! HTTP request sent, awaiting response... 200 OK
npm ERR! Length: 10875 (11K) [text/plain]
npm ERR! Saving to: '/tmp/uninstall_wasmedge.sh’
npm ERR! 
npm ERR!      0K ..........                                            100% 8.15M=0.001s
npm ERR! 
npm ERR! 2021-10-20 21:08:48 (8.15 MB/s) - '/tmp/uninstall_wasmedge.sh’ saved [10875/10875]
npm ERR! 
npm ERR! --2021-10-20 21:08:49--  https://raw.githubusercontent.com/WasmEdge/WasmEdge/master/utils/install.sh
npm ERR! Resolving raw.githubusercontent.com (raw.githubusercontent.com)... 185.199.109.133, 185.199.108.133, 185.199.111.133, ...
npm ERR! Connecting to raw.githubusercontent.com (raw.githubusercontent.com)|185.199.109.133|:443... connected.
npm ERR! HTTP request sent, awaiting response... 200 OK
npm ERR! Length: 18305 (18K) [text/plain]
npm ERR! Saving to: '/tmp/install_wasmedge.sh’
npm ERR! 
npm ERR!      0K .......... .......                                    100% 7.43M=0.002s
npm ERR! 
npm ERR! 2021-10-20 21:08:49 (7.43 MB/s) - '/tmp/install_wasmedge.sh’ saved [18305/18305]
...
npm ERR!  28850K .......... .......... .......                         100% 18.8M=2.5snode-pre-gyp info it worked if it ends with ok
npm ERR! node-pre-gyp info using node-pre-gyp@1.0.5
npm ERR! node-pre-gyp info using node@15.14.0 | linux | x64
npm ERR! node-pre-gyp info build requesting source compile
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using node-gyp@7.1.2
npm ERR! gyp info using node@15.14.0 | linux | x64
npm ERR! gyp info ok 
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using node-gyp@7.1.2
npm ERR! gyp info using node@15.14.0 | linux | x64
npm ERR! gyp info find Python using Python version 3.8.10 found at "/usr/bin/python3"
npm ERR! gyp info spawn /usr/bin/python3
npm ERR! gyp info spawn args [
npm ERR! gyp info spawn args   '/usr/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   '/home/tpmccallum/.npm/_cacache/tmp/git-clone-32551a12/build/config.gypi',
npm ERR! gyp info spawn args   '-I',
npm ERR! gyp info spawn args   '/usr/lib/node_modules/npm/node_modules/node-gyp/addon.gypi',
npm ERR! gyp info spawn args   '-I',
npm ERR! gyp info spawn args   '/home/tpmccallum/.cache/node-gyp/15.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=/home/tpmccallum/.cache/node-gyp/15.14.0',
npm ERR! gyp info spawn args   '-Dnode_gyp_dir=/usr/lib/node_modules/npm/node_modules/node-gyp',
npm ERR! gyp info spawn args   '-Dnode_lib_file=/home/tpmccallum/.cache/node-gyp/15.14.0/<(target_arch)/node.lib',
npm ERR! gyp info spawn args   '-Dmodule_root_dir=/home/tpmccallum/.npm/_cacache/tmp/git-clone-32551a12',
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 ok 
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using node-gyp@7.1.2
npm ERR! gyp info using node@15.14.0 | linux | x64
npm ERR! gyp info spawn make
npm ERR! gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
npm ERR! In file included from ../wasmedgeaddon.cc:1:
npm ERR! ../wasmedgeaddon.h:4:10: fatal error: bytecode.h: No such file or directory
npm ERR!     4 | #include "bytecode.h"
npm ERR!       |          ^~~~~~~~~~~~
npm ERR! compilation terminated.
npm ERR! make: *** [wasmedge-extensions.target.mk:119: Release/obj.target/wasmedge-extensions/wasmedgeaddon.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 (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:194:23)
npm ERR! gyp ERR! stack     at ChildProcess.emit (node:events:369:20)
npm ERR! gyp ERR! stack     at Process.ChildProcess._handle.onexit (node:internal/child_process:290:12)
npm ERR! gyp ERR! System Linux 5.11.0-37-generic
npm ERR! gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "build" "--fallback-to-build" "--module=/home/tpmccallum/.npm/_cacache/tmp/git-clone-32551a12/lib/binding/linux-x64/wasmedge-extensions.node" "--module_name=wasmedge-extensions" "--module_path=/home/tpmccallum/.npm/_cacache/tmp/git-clone-32551a12/lib/binding/linux-x64" "--napi_version=8" "--node_abi_napi=napi" "--napi_build_version=0" "--node_napi_label=node-v88"
npm ERR! gyp ERR! cwd /home/tpmccallum/.npm/_cacache/tmp/git-clone-32551a12
npm ERR! gyp ERR! node -v v15.14.0
npm ERR! gyp ERR! node-gyp -v v7.1.2
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/bin/node /usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/home/tpmccallum/.npm/_cacache/tmp/git-clone-32551a12/lib/binding/linux-x64/wasmedge-extensions.node --module_name=wasmedge-extensions --module_path=/home/tpmccallum/.npm/_cacache/tmp/git-clone-32551a12/lib/binding/linux-x64 --napi_version=8 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v88' (1)
npm ERR! node-pre-gyp ERR! stack     at ChildProcess.<anonymous> (/home/tpmccallum/.npm/_cacache/tmp/git-clone-32551a12/node_modules/@mapbox/node-pre-gyp/lib/util/compile.js:89:23)
npm ERR! node-pre-gyp ERR! stack     at ChildProcess.emit (node:events:369:20)
npm ERR! node-pre-gyp ERR! stack     at maybeClose (node:internal/child_process:1067:16)
npm ERR! node-pre-gyp ERR! stack     at Process.ChildProcess._handle.onexit (node:internal/child_process:301:5)
npm ERR! node-pre-gyp ERR! System Linux 5.11.0-37-generic
npm ERR! node-pre-gyp ERR! command "/usr/bin/node" "/home/tpmccallum/.npm/_cacache/tmp/git-clone-32551a12/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build"
npm ERR! node-pre-gyp ERR! cwd /home/tpmccallum/.npm/_cacache/tmp/git-clone-32551a12
npm ERR! node-pre-gyp ERR! node -v v15.14.0
npm ERR! node-pre-gyp ERR! node-pre-gyp -v v1.0.5
npm ERR! node-pre-gyp ERR! not ok 
npm ERR! npm ERR! code 1
npm ERR! npm ERR! path /home/tpmccallum/.npm/_cacache/tmp/git-clone-32551a12
npm ERR! npm ERR! command failed
npm ERR! npm ERR! command sh -c node-pre-gyp install --fallback-to-build

@hydai
Copy link
Member

hydai commented Oct 20, 2021

Hi @tpmccallum
I have a different output, but I also got an error:

npm ERR! code 1
npm ERR! git dep preparation failed
npm ERR! command /home/hydai/.nvm/versions/node/v14.17.3/bin/node /home/hydai/.nvm/versions/node/v14.17.3/lib/node_modules/npm/bin/npm-cli.js install --force --cache=/home/hydai/.npm --prefer-offline=false --prefer-online=false --offline=false --no-progress --no-save --no-audit --include=dev --include=peer --include=optional --no-package-lock-only --no-dry-run
npm ERR! > wasmedge-extensions@0.8.3 preinstall
npm ERR! > ./scripts/preinstall.sh
npm ERR!
npm ERR! No root permissions.
npm ERR! Installation path found at
npm ERR! Uninstallation path invalid
npm ERR! npm WARN using --force Recommended protections disabled.
npm ERR! --2021-10-20 19:39:40--  https://raw.githubusercontent.com/WasmEdge/WasmEdge/master/utils/uninstall.sh
npm ERR! Resolving raw.githubusercontent.com (raw.githubusercontent.com)... 185.199.108.133, 185.199.109.133, 185.199.110.133, ...
npm ERR! Connecting to raw.githubusercontent.com (raw.githubusercontent.com)|185.199.108.133|:443... connected.
npm ERR! HTTP request sent, awaiting response... 200 OK
npm ERR! Length: 10875 (11K) [text/plain]
npm ERR! Saving to: ‘/tmp/uninstall_wasmedge.sh’
npm ERR!
npm ERR!      0K ..........                                            100% 33.7M=0s
npm ERR!
npm ERR! 2021-10-20 19:39:41 (33.7 MB/s) - ‘/tmp/uninstall_wasmedge.sh’ saved [10875/10875]
npm ERR!
npm ERR! npm ERR! code 1
npm ERR! npm ERR! path /home/hydai/.npm/_cacache/tmp/git-clonesRkcfn
npm ERR! npm ERR! command failed
npm ERR! npm ERR! command sh -c ./scripts/preinstall.sh
npm ERR!
npm ERR! npm ERR! A complete log of this run can be found in:
npm ERR! npm ERR!     /home/hydai/.npm/_logs/2021-10-20T11_39_41_269Z-debug.log

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/hydai/.npm/_logs/2021-10-20T11_39_41_458Z-debug.log

@hydai
Copy link
Member

hydai commented Oct 20, 2021

Hi @tpmccallum
After several testing and investigating, we found that:

npm@6 supports git submodule. However, this feature is removed from npm@7 and npm@8.
Related issue: npm/cli#2774

So I would suggest that:

Option 1.

cd <local-path>
git clone --recurse-submodules https://github.com/second-state/wasmedge-extensions.git
cd <target-path>
npm install --build-from-source <local-path/wasmedge-extensions>

Option 2.

npm install --build-from-source wasmedge-extensions

@tpmccallum
Copy link
Contributor

Hi @hydai
Thank you. I am getting a new error now, please see below.

npm install --build-from-source /media/nvme/wasmedge-extensions
npm ERR! code 1
npm ERR! path /media/nvme/wasmedge-extensions
npm ERR! command failed
npm ERR! command sh -c node-pre-gyp install --fallback-to-build
npm ERR! Failed to execute '/usr/bin/node /usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --module=/media/nvme/wasmedge-extensions/lib/binding/linux-x64/wasmedge-extensions.node --module_name=wasmedge-extensions --module_path=/media/nvme/wasmedge-extensions/lib/binding/linux-x64 --napi_version=8 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v88' (1)
npm ERR! node-pre-gyp info it worked if it ends with ok
npm ERR! node-pre-gyp info using node-pre-gyp@0.17.0
npm ERR! node-pre-gyp info using node@15.14.0 | linux | x64
npm ERR! node-pre-gyp WARN Using needle for node-pre-gyp https download 
npm ERR! node-pre-gyp info build requesting source compile
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using node-gyp@7.1.2
npm ERR! gyp info using node@15.14.0 | linux | x64
npm ERR! gyp info ok 
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using node-gyp@7.1.2
npm ERR! gyp info using node@15.14.0 | linux | x64
npm ERR! gyp info find Python using Python version 3.8.10 found at "/usr/bin/python3"
npm ERR! gyp info spawn /usr/bin/python3
npm ERR! gyp info spawn args [
npm ERR! gyp info spawn args   '/usr/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   '/media/nvme/wasmedge-extensions/build/config.gypi',
npm ERR! gyp info spawn args   '-I',
npm ERR! gyp info spawn args   '/usr/lib/node_modules/npm/node_modules/node-gyp/addon.gypi',
npm ERR! gyp info spawn args   '-I',
npm ERR! gyp info spawn args   '/home/tpmccallum/.cache/node-gyp/15.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=/home/tpmccallum/.cache/node-gyp/15.14.0',
npm ERR! gyp info spawn args   '-Dnode_gyp_dir=/usr/lib/node_modules/npm/node_modules/node-gyp',
npm ERR! gyp info spawn args   '-Dnode_lib_file=/home/tpmccallum/.cache/node-gyp/15.14.0/<(target_arch)/node.lib',
npm ERR! gyp info spawn args   '-Dmodule_root_dir=/media/nvme/wasmedge-extensions',
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! node:internal/modules/cjs/loader:927
npm ERR!   throw err;
npm ERR!   ^
npm ERR! 
npm ERR! Error: Cannot find module 'node-addon-api'
npm ERR! Require stack:
npm ERR! - /media/nvme/wasmedge-extensions/[eval]
npm ERR!     at Function.Module._resolveFilename (node:internal/modules/cjs/loader:924:15)
npm ERR!     at Function.Module._load (node:internal/modules/cjs/loader:769:27)
npm ERR!     at Module.require (node:internal/modules/cjs/loader:996:19)
npm ERR!     at require (node:internal/modules/cjs/helpers:92:18)
npm ERR!     at [eval]:1:1
npm ERR!     at Script.runInThisContext (node:vm:131:12)
npm ERR!     at Object.runInThisContext (node:vm:308:38)
npm ERR!     at node:internal/process/execution:77:19
npm ERR!     at [eval]-wrapper:6:22
npm ERR!     at evalScript (node:internal/process/execution:76:60) {
npm ERR!   code: 'MODULE_NOT_FOUND',
npm ERR!   requireStack: [ '/media/nvme/wasmedge-extensions/[eval]' ]
npm ERR! }
npm ERR! gyp: Call to 'node -p "require('node-addon-api').include"' returned exit status 1 while in binding.gyp. while trying to load binding.gyp
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/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:351:16)
npm ERR! gyp ERR! stack     at ChildProcess.emit (node:events:369:20)
npm ERR! gyp ERR! stack     at Process.ChildProcess._handle.onexit (node:internal/child_process:290:12)
npm ERR! gyp ERR! System Linux 5.11.0-37-generic
npm ERR! gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "configure" "--fallback-to-build" "--module=/media/nvme/wasmedge-extensions/lib/binding/linux-x64/wasmedge-extensions.node" "--module_name=wasmedge-extensions" "--module_path=/media/nvme/wasmedge-extensions/lib/binding/linux-x64" "--napi_version=8" "--node_abi_napi=napi" "--napi_build_version=0" "--node_napi_label=node-v88"
npm ERR! gyp ERR! cwd /media/nvme/wasmedge-extensions
npm ERR! gyp ERR! node -v v15.14.0
npm ERR! gyp ERR! node-gyp -v v7.1.2
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/bin/node /usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --module=/media/nvme/wasmedge-extensions/lib/binding/linux-x64/wasmedge-extensions.node --module_name=wasmedge-extensions --module_path=/media/nvme/wasmedge-extensions/lib/binding/linux-x64 --napi_version=8 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v88' (1)
npm ERR! node-pre-gyp ERR! stack     at ChildProcess.<anonymous> (/home/tpmccallum/.npm-global/lib/node_modules/node-pre-gyp/lib/util/compile.js:83:29)
npm ERR! node-pre-gyp ERR! stack     at ChildProcess.emit (node:events:369:20)
npm ERR! node-pre-gyp ERR! stack     at maybeClose (node:internal/child_process:1067:16)
npm ERR! node-pre-gyp ERR! stack     at Process.ChildProcess._handle.onexit (node:internal/child_process:301:5)
npm ERR! node-pre-gyp ERR! System Linux 5.11.0-37-generic
npm ERR! node-pre-gyp ERR! command "/usr/bin/node" "/home/tpmccallum/.npm-global/bin/node-pre-gyp" "install" "--fallback-to-build"
npm ERR! node-pre-gyp ERR! cwd /media/nvme/wasmedge-extensions
npm ERR! node-pre-gyp ERR! node -v v15.14.0
npm ERR! node-pre-gyp ERR! node-pre-gyp -v v0.17.0
npm ERR! node-pre-gyp ERR! not ok

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/tpmccallum/.npm/_logs/2021-10-20T21_28_35_589Z-debug.log

I have additionally installed the following node packages as per the errors, however the above error still persists.

npm install node-pre-gyp
npm install node-addon-api

@tpmccallum
Copy link
Contributor

I also tried installing those packages globally, but error still persists.

@tpmccallum
Copy link
Contributor

Solved

Thanks again @hydai I added a line to your solution (using the option 1 from above). This all works now and the FaaS is back up and running.

cd <local-path>
git clone --recurse-submodules https://github.com/second-state/wasmedge-extensions.git
cd <local-path/wasmedge-extensions>
npm install
cd <target-path>
npm install --build-from-source <local-path/wasmedge-extensions>

As you can see I just added in a stand alone npm install from directly inside the cloned directory called wasmedge-extensions.

Thanks so much for your help. Really appreciate it!

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

Successfully merging this pull request may close these issues.

Installer not working
3 participants