There have been issues (#5, #9) reported with this generator not properly seeing globally installed versions of clasp. The original code actually was trying to pull the package.json of clasp from NODE_PATH, which often times is unreliable -- i.e. the developer could be running nvm, n, etc
This PR changes the way this dependency is checked. It does a straight execSync('clasp --version') which should cover the cases above as well as for people who just have one version of Node installed.
This will also make the README.md more consistent, as the direction can just be to do an npm i -g @google/clasp or yarn add global @google/clasp
Summary
There have been issues (#5, #9) reported with this generator not properly seeing globally installed versions of
clasp
. The original code actually was trying to pull thepackage.json
of clasp from NODE_PATH, which often times is unreliable -- i.e. the developer could be running nvm, n, etcThis PR changes the way this dependency is checked. It does a straight
execSync('clasp --version')
which should cover the cases above as well as for people who just have one version of Node installed.This will also make the README.md more consistent, as the direction can just be to do an
npm i -g @google/clasp
oryarn add global @google/clasp