Skip to content

Instantly share code, notes, and snippets.

@jareddlc
Last active February 7, 2018 17:32
Show Gist options
  • Save jareddlc/f72231fe98a2169b63cc90a58e6957f7 to your computer and use it in GitHub Desktop.
Save jareddlc/f72231fe98a2169b63cc90a58e6957f7 to your computer and use it in GitHub Desktop.
Workaround for appc cloud commands with (npm not found. Please install npm and try again) error:
1. Ensure that the folder containing npm is in NODE_PATH environment variable, e.g. NODE_PATH=/usr/lib/node_modules (I believe you can get this path by using 'npm root -g')
Alternative fix (without modifying environment variables)
1. navigate to the install directory of the current version of appc-cli. (Example for appc-cli@6.2.2 ~/.appcelerator/install/6.2.2/package/)
2. 'npm install global-npm'
3. navigate to acs node_module directory (node_modules/acs/lib/util.js) look for the function called "getNpm" and replace the line:
var npm = require('npm');
with the following line:
var npm = require('global-npm');
@drew-smithies
Copy link

Works great, thanks! Will this get overwritten when updating appc versions?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment