Nov 11, 2020 05:14 PM
Hello Community,
Trying to create my first Airtable App by following the Hello World example and running into a number of npm errors and issues. If anyone can provide a bit of guidance on how to resolve this it would be greatly appreciated!
The first error occurs when trying to run
➜ Airtable npm install -g @airtable/blocks-cli
npm WARN deprecated urix@0.1.0: P
npm WARN deprecated resolve-url@0.2.1:
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 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 chokidar@2.1.8: Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies.
npm ERR! code ENOENT
npm ERR! syscall chmod
npm ERR! path /usr/local/lib/node_modules/@airtable/blocks-cli/node_modules/loose-envify/cli.js
npm ERR! errno -2
npm ERR! enoent ENOENT: no such file or directory, chmod ‘/usr/local/lib/node_modules/@airtable/blocks-cli/node_modules/loose-envify/cli.js’
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent
If I try to push past this and run
➜ Airtable block init app63J6OIpQdSMMn9/blk1y83B9jm8NXhd2 --template=https://github.com/Airtable/apps-hello-world hello_apps
I received another error “Cannot find module ‘extend’ Require stack…” Unfortunately, I’m unable to paste the full output of the require stack line as the community site limits the number of links I’m allowed to post and won’t allow me to submit my question with the additional information inline.
Solved! Go to Solution.
Nov 12, 2020 06:23 AM
Nov 12, 2020 05:59 AM
Hi Kyle, sorry you’re running into this! Could you let us know your operating system & the version of node and npm you’re using? You can find out your node/npm versions by running node --version
and npm --version
.
Nov 12, 2020 06:01 AM
Hey @somehats thanks for the response! Info below:
macOS Catalina 10.15.7
NPM: 7.0.3
Node: v15.0.1
Please let me know if there is other info I can share.
Nov 12, 2020 06:23 AM
Nov 12, 2020 06:46 AM
No inconvenience at all. If there is a way to update the SDK to output something to check the version and output a message notifying this requirement, you might help other users who run into this =]
Thanks for the help!
Nov 12, 2020 07:05 AM
@somehats A follow-up question for you on this topic. Using NVM I installed Node version 14.15.0 and reinstalled the blocks-cli with success. However, when I tried to run block init, I ran into similar issues with “Cannot find module ‘extend’”.
➜ ~ block init / --template=https://github.com/Airtable/apps-hello-world hello_apps
:x: Error: Cannot find module ‘extend’
Require stack:
Is Node version 14.15.0 supported, or is there something else perhaps that I am missing?
Nov 12, 2020 07:58 AM
Heh, that (or even better just fixing the issue) is definitely the plan :grinning_face_with_sweat:
It looks like your system might still be using the old version of the block
command that didn’t install properly from before… can you try removing the previously installed version? You might need to switch back to a non-nvm version of node before running npm uninstall @airtable/blocks-cli
? Another easier but maybe riskier approach might be to rm -rf /usr/local/lib/node_modules/@airtable/blocks-cli
Nov 12, 2020 09:54 AM
That did the trick, thank you @somehats!
And for anyone else who’s running into this issue: There’s a nice NVM start tutorial at https://itnext.io/nvm-the-easiest-way-to-switch-node-js-environments-on-your-machine-in-a-flash-17ba... Make sure to run the command source ~/.nvm/nvm.sh
after you install NVM to make sure it is fully installed and loaded. From there, just follow the instructions to load Node version 14.15.0, then follow @somehats instructions above to uninstall CLI-Blocks if needed, and finally run through the installation procedure again, and you should be golden.