sasjs / cli

Command line interface for creating, compiling, and building SAS® projects
https://cli.sasjs.io
MIT License
37 stars 5 forks source link

add automated check to prevent failing releases #983

Closed allanbowe closed 3 years ago

allanbowe commented 3 years ago

The recent merge to check the node version broke the release (fixed here).

➜  git npm install -g @sasjs/cli 
npm ERR! code 1
npm ERR! path /usr/local/lib/node_modules/@sasjs/cli
npm ERR! command failed
npm ERR! command sh -c node checkNodeVersion
npm ERR! internal/modules/cjs/loader.js:883
npm ERR!   throw err;
npm ERR!   ^
npm ERR! 
npm ERR! Error: Cannot find module '/usr/local/lib/node_modules/@sasjs/cli/checkNodeVersion'
npm ERR!     at Function.Module._resolveFilename (internal/modules/cjs/loader.js:880:15)
npm ERR!     at Function.Module._load (internal/modules/cjs/loader.js:725:27)
npm ERR!     at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:72:12)
npm ERR!     at internal/main/run_main_module.js:17:47 {
npm ERR!   code: 'MODULE_NOT_FOUND',
npm ERR!   requireStack: []
npm ERR! }

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/munja/.npm/_logs/2021-09-13T15_29_31_664Z-debug.log

To prevent this situation from happening again, we should add some extra steps (eg npm pack and npm i <tarball>) in the automated tests to ensure the release does in fact install.

krishna-acondy commented 3 years ago

Implemented in https://github.com/sasjs/cli/pull/999