airtable의 Custom Block을 개발하기 위해선 npm 라이브러리 blocks-cli를 설치해야 한다.
그러나 위 문구처럼 npm install -g @airtable/blocks-cli
를 했을 뿐인데 아래와 같은 오류가 난다.
우선, 나의 개발환경은 Windows 10 + WSL v2 (Ubuntu 18.04)로 이루어져 있다.
my-blocks [master●] % sudo npm install -g @airtable/blocks-cli
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 resolve-url@0.2.1: https://github.com/lydell/resolve-url#deprecated
npm WARN deprecated urix@0.1.0: Please see https://github.com/lydell/urix#deprecated
npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
/usr/local/bin/block -> /usr/local/lib/node_modules/@airtable/blocks-cli/bin/block
> nodegit@0.26.5 install /usr/local/lib/node_modules/@airtable/blocks-cli/node_modules/nodegit
> node lifecycleScripts/preinstall && node lifecycleScripts/install
[nodegit] Running pre-install script
[nodegit] Running install script
node-pre-gyp
WARN Using request for node-pre-gyp https download
node-pre-gyp
WARN Pre-built binaries not installable for nodegit@0.26.5 and node@12.18.1 (node-v72 ABI, glibc) (falling back to source compile with node-gyp)
node-pre-gyp WARN Hit error EACCES: permission denied, mkdir '/usr/local/lib/node_modules/@airtable/blocks-cli/node_modules/nodegit/build'
gyp
WARN EACCES current user ("nobody") does not have permission to access the dev dir "/home/roharon/.cache/node-gyp/12.18.1"
gyp
WARN EACCES attempting to reinstall using temporary dev dir "/usr/local/lib/node_modules/@airtable/blocks-cli/node_modules/nodegit/.node-gyp"
gyp WARN
install got an error, rolling back install
gyp WARN
install got an error, rolling back install
gyp
ERR! configure error
gyp ERR! stack Error: EACCES: permission denied, mkdir '/usr/local/lib/node_modules/@airtable/blocks-cli/node_modules/nodegit/.node-gyp'
gyp ERR! System Linux 4.19.84-microsoft-standard
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" "--module=/usr/local/lib/node_modules/@airtable/blocks-cli/node_modules/nodegit/build/Release/nodegit.node" "--module_name=nodegit" "--module_path=/usr/local/lib/node_modules/@airtable/blocks-cli/node_modules/nodegit/build/Release" "--napi_version=6" "--node_abi_napi=napi" "--napi_build_version=0" "--node_napi_label=node-v72"
gyp ERR! cwd /usr/local/lib/node_modules/@airtable/blocks-cli/node_modules/nodegit
gyp ERR! node -v v12.18.1
gyp ERR! node-gyp -v v5.1.0
gyp ERR! not ok
node-pre-gyp ERR!
build error
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 --module=/usr/local/lib/node_modules/@airtable/blocks-cli/node_modules/nodegit/build/Release/nodegit.node --module_name=nodegit --module_path=/usr/local/lib/node_modules/@airtable/blocks-cli/node_modules/nodegit/build/Release --napi_version=6 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v72' (1)
node-pre-gyp ERR! stack at ChildProcess.<anonymous> (/usr/local/lib/node_modules/@airtable/blocks-cli/node_modules/node-pre-gyp/lib/util/compile.js:83:29)
node-pre-gyp
ERR! stack at ChildProcess.emit (events.js:315:20)
node-pre-gyp ERR! stack at maybeClose (internal/child_process.js:1021:16)
node-pre-gyp ERR! stack
at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5)
node-pre-gyp
ERR! System Linux 4.19.84-microsoft-standard
node-pre-gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/@airtable/blocks-cli/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp
ERR! cwd /usr/local/lib/node_modules/@airtable/blocks-cli/node_modules/nodegit
node-pre-gyp ERR! node -v v12.18.1
node-pre-gyp ERR! node-pre-gyp -v v0.13.0
node-pre-gyp ERR! not ok
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 --module=/usr/local/lib/node_modules/@airtable/blocks-cli/node_modules/nodegit/build/Release/nodegit.node --module_name=nodegit --module_path=/usr/local/lib/node_modules/@airtable/blocks-cli/node_modules/nodegit/build/Release --napi_version=6 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v72' (1)
[nodegit] ERROR - Could not finish install
[nodegit] ERROR - finished with error code: 1
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.2.7 (node_modules/@airtable/blocks-cli/node_modules/@babel/cli/node_modules/chokidar/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.13: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@~2.1.2 (node_modules/@airtable/blocks-cli/node_modules/chokidar/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.1.3: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! nodegit@0.26.5 install: `node lifecycleScripts/preinstall && node lifecycleScripts/install`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the nodegit@0.26.5 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /home/me/.npm/_logs/2020-06-30T14_46_18_416Z-debug.log
다행히 Airtable Community에서 답을 구할 수 있었다.
기억 상, 내가 처음 blocks-cli를 설치할때는 오류가 나지 않았으나, 재설치하는 과정에서 nodegit
을 포함한 오류가 나오게 되었다.
2020년 6월 26일에 나온 0.0.53 버전에서 wsl환경에선 지원되지 않아 그 이전 버전인 0.0.52 으로 설치하면 해결되는 문제이다
npm install -g @airtable/blocks-cli@0.0.52
위 버전대로 설치하여 해결할 수 있다.
참조한 문서
Airtable Community
'Front-end' 카테고리의 다른 글
Git branch의 push, --set-upstream 설정 생략하기 (0) | 2020.06.25 |
---|---|
React js - Life cycle부터 functional component까지 (0) | 2019.03.01 |
React js - 자식 컴포넌트에서 input 컴포넌트 사용하기 (0) | 2019.01.10 |
React.js state, props관련 (0) | 2019.01.04 |
훕포메이션 리뉴얼 - 카카오i (0) | 2018.12.04 |
댓글