Help

Re: Unable to install blocks-cli

Solved
Jump to Solution
10918 2
cancel
Showing results for 
Search instead for 
Did you mean: 
Sergey_Royz
4 - Data Explorer
4 - Data Explorer

Hello,
I’m trying to create a new block,
but npm install -g @airtable/blocks-cli is not working
The error log:
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 Darwin 19.3.0
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.0
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 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 -v
6.14.4

node -v
v12.18.0

Mac OS X: 10.15.3

Any help appreciated.

1 Solution

Accepted Solutions
Ronen_Babayoff
7 - App Architect
7 - App Architect

I got the same error on ubuntu 18.04 on WSL trying to install v0.0.53. v0.0.52 installs successfully.

@Sergey_Royz you can install 0.0.52 by:

npm install -g @airtable/blocks-cli@0.0.52

Cheers,
Ronen Babayoff
Superblocks.at

See Solution in Thread

19 Replies 19
Ronen_Babayoff
7 - App Architect
7 - App Architect

I got the same error on ubuntu 18.04 on WSL trying to install v0.0.53. v0.0.52 installs successfully.

@Sergey_Royz you can install 0.0.52 by:

npm install -g @airtable/blocks-cli@0.0.52

Cheers,
Ronen Babayoff
Superblocks.at

Awesome, it worked! Thanks!

Amr
4 - Data Explorer
4 - Data Explorer

There is a known issue with node-gyp & macOS Catalina the solution is to install “Command Line Tools for Xcode” manually from https://developer.apple.com/download/more

Hi, we just released a new version of blocks-cli (0.0.54) which shouldn’t have this problem.

Thanks for reporting this issue!

Hi,

I am trying for the first time to build an app using the exemple “Wikipedia enrichment”
When I try to Install the Blocks CLI (npm install -g @airtable/blocks-cli), I have this message :

Last login: Sat Dec 19 12:24:27 on ttys000

The default interactive shell is now zsh.

To update your account to use zsh, please run `chsh -s /bin/zsh`.

For more details, please visit https://support.apple.com/kb/HT208050.

MacBook-Pro-2:~ thibaud$ npm install -g @airtable/blocks-cli

npm WARN deprecated fsevents@2.1.3: Please update to v 2.2.x

npm WARN deprecated @hapi/joi@15.1.1: Switch to 'npm install joi'

npm WARN deprecated har-validator@5.1.5: this library is no longer supported

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 checkPermissions Missing write access to /usr/local/lib/node_modules

npm ERR! code EACCES

npm ERR! syscall access

npm ERR! path /usr/local/lib/node_modules

npm ERR! errno -13

npm ERR! Error: EACCES: permission denied, access '/usr/local/lib/node_modules'

npm ERR! [Error: EACCES: permission denied, access '/usr/local/lib/node_modules'] {

npm ERR! errno: -13,

npm ERR! code: 'EACCES',

npm ERR! syscall: 'access',

npm ERR! path: '/usr/local/lib/node_modules'

npm ERR! }

npm ERR!

npm ERR! The operation was rejected by your operating system.

npm ERR! It is likely you do not have the permissions to access this file as the current user

npm ERR!

npm ERR! If you believe this might be a permissions issue, please double-check the

npm ERR! permissions of the file and its containing directories, or try running

npm ERR! the command again as root/Administrator.

npm ERR! A complete log of this run can be found in:

npm ERR! /Users/thibaud/.npm/_logs/2020-12-19T11_31_32_994Z-debug.log

MacBook-Pro-2:~ thibaud$

Could anyone help me, I am not a developer :winking_face:
Mac OS Big Sur 11.1 (20C69)
node -v14.15.3
npm -v6.14.9

Thanks in advance !

Thibaud -

Billy_Littlefie
7 - App Architect
7 - App Architect

Hi @Thibaud_Donzier,

Hm, this looks like an npm issue with installing global package (not specific to the blocks-cli). It seems like your user account isn’t the owner of /usr/local/lib/node_modules (or at least can’t modify it).

Could you try either changing the owner of that directory to your account (see this similar stackoverflow issue for steps), or going through the steps listed on this npm help page to manually change the default npm directory?

I’m trying to install this for the first time on my Mac (running Catalina). I got past the node_modules permissions issue thanks to your suggestions above, but now I’ve hit a new error:

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 @hapi/joi@15.1.1: Switch to 'npm install joi'
npm WARN deprecated @hapi/hoek@8.5.1: This version has been deprecated and is no longer supported or maintained
npm WARN deprecated @hapi/bourne@1.3.2: This version has been deprecated and is no longer supported or maintained
npm WARN deprecated @hapi/topo@3.1.6: This version has been deprecated and is no longer supported or maintained
npm WARN deprecated @hapi/address@2.1.4: Moved to 'npm install @sideway/address'
npm WARN deprecated har-validator@5.1.5: this library is no longer supported
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 ERR! code EACCES
npm ERR! syscall symlink
npm ERR! path ../lib/node_modules/@airtable/blocks-cli/bin/block
npm ERR! dest /usr/local/bin/block
npm ERR! errno -13
npm ERR! Error: EACCES: permission denied, symlink '../lib/node_modules/@airtable/blocks-cli/bin/block' -> '/usr/local/bin/block'
npm ERR!  [OperationalError: EACCES: permission denied, symlink '../lib/node_modules/@airtable/blocks-cli/bin/block' -> '/usr/local/bin/block'] {
npm ERR!   cause: [Error: EACCES: permission denied, symlink '../lib/node_modules/@airtable/blocks-cli/bin/block' -> '/usr/local/bin/block'] {
npm ERR!     errno: -13,
npm ERR!     code: 'EACCES',
npm ERR!     syscall: 'symlink',
npm ERR!     path: '../lib/node_modules/@airtable/blocks-cli/bin/block',
npm ERR!     dest: '/usr/local/bin/block'
npm ERR!   },
npm ERR!   errno: -13,
npm ERR!   code: 'EACCES',
npm ERR!   syscall: 'symlink',
npm ERR!   path: '../lib/node_modules/@airtable/blocks-cli/bin/block',
npm ERR!   dest: '/usr/local/bin/block'
npm ERR! }
npm ERR! 
npm ERR! The operation was rejected by your operating system.
npm ERR! It is likely you do not have the permissions to access this file as the current user
npm ERR! 
npm ERR! If you believe this might be a permissions issue, please double-check the
npm ERR! permissions of the file and its containing directories, or try running
npm ERR! the command again as root/Administrator.

Thanks to @Kamille_Parks for suggesting that I run the command as sudo. The installation completed after that, but there’s still an error in the output. Is that something to worry about?

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 @hapi/joi@15.1.1: Switch to 'npm install joi'
npm WARN deprecated @hapi/hoek@8.5.1: This version has been deprecated and is no longer supported or maintained
npm WARN deprecated @hapi/bourne@1.3.2: This version has been deprecated and is no longer supported or maintained
npm WARN deprecated @hapi/address@2.1.4: Moved to 'npm install @sideway/address'
npm WARN deprecated @hapi/topo@3.1.6: This version has been deprecated and is no longer supported or maintained
npm WARN deprecated har-validator@5.1.5: this library is no longer supported
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.
/usr/local/bin/block -> /usr/local/lib/node_modules/@airtable/blocks-cli/bin/block
> fsevents@1.2.13 install /usr/local/lib/node_modules/@airtable/blocks-cli/node_modules/watchify/node_modules/fsevents
> node install.js
gyp WARN EACCES current user ("nobody") does not have permission to access the dev dir "/Users/justinbarrett/Library/Caches/node-gyp/14.15.4"
gyp WARN EACCES attempting to reinstall using temporary dev dir "/usr/local/lib/node_modules/@airtable/blocks-cli/node_modules/watchify/node_modules/fsevents/.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/watchify/node_modules/fsevents/.node-gyp'
gyp ERR! System Darwin 19.6.0
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /usr/local/lib/node_modules/@airtable/blocks-cli/node_modules/watchify/node_modules/fsevents
gyp ERR! node -v v14.15.4
gyp ERR! node-gyp -v v5.1.0
gyp ERR! not ok 
> core-js@3.6.4 postinstall /usr/local/lib/node_modules/@airtable/blocks-cli/node_modules/core-js
> node -e "try{require('./postinstall')}catch(e){}"
Thank you for using core-js ( https://github.com/zloirock/core-js ) for polyfilling JavaScript standard library!
The project needs your help! Please consider supporting of core-js on Open Collective or Patreon: 
> https://opencollective.com/core-js 
> https://www.patreon.com/zloirock 
Also, the author of core-js ( https://github.com/zloirock ) is looking for a good job -)
+ @airtable/blocks-cli@0.0.61
added 894 packages from 518 contributors in 20.731s
Evan_Terry
4 - Data Explorer
4 - Data Explorer

Hey all,

The issue was with the dependencies with the NPM version.

  1. npm install 13
  2. npm use 13
  3. npm install -g @airtable/blocks-cli

You should be able to install now.