Error instaling sidekick on MAC


#1

When I run sudo npm install -g nativescript I get these error messages below:

EACCES: permission denied, mkdir ‘/usr/local/lib/node_modules/nativescript/docs/html’
Failed to display command help { Error: Unknown command ‘post-install-cli’. Try ’ tns help' for a full list of supported commands. at Errors.fail (/usr/local/lib/node_modules/nativescript/lib/common/errors.js:125:28) at Errors.failWithoutHelp (/usr/local/lib/node_modules/nativescript/lib/common/errors.js:135:21) at HelpService.<anonymous> (/usr/local/lib/node_modules/nativescript/lib/common/services/help-service.js:181:26) at Generator.next (<anonymous>) at fulfilled (/usr/local/lib/node_modules/nativescript/lib/common/services/help-service.js:4:58) at <anonymous> at process._tickCallback (internal/process/next_tick.js:188:7) name: 'Exception', message: 'Unknown command \'post-install-cli\'. Try \' tns help’ for a full list of supported commands.’,
stack: ‘Error: Unknown command ‘post-install-cli’. Try ‘$ tns help’ for a full list of supported commands.\n at Errors.fail (/usr/local/lib/node_modules/nativescript/lib/common/errors.js:125:28)\n at Errors.failWithoutHelp (/usr/local/lib/node_modules/nativescript/lib/common/errors.js:135:21)\n at HelpService. (/usr/local/lib/node_modules/nativescript/lib/common/services/help-service.js:181:26)\n at Generator.next ()\n at fulfilled (/usr/local/lib/node_modules/nativescript/lib/common/services/help-service.js:4:58)\n at \n at process._tickCallback (internal/process/next_tick.js:188:7)’,
errorCode: 127,
suppressCommandHelp: true,
proxyAuthenticationRequired: false,
printOnStdout: undefined }
Error while reporting exception: Error: EACCES: permission denied, mkdir ‘/Users/pablo/.local/share/.nativescript-cli’

  • nativescript@4.2.1
    updated 1 package in 5.376s

I tried uninstalling it, creating the dirs myself and then reinstalling sidekick, and I get the same errors