Details

    • Type: Bug
    • Status: Closed
    • Priority: None
    • Resolution: Not Our Bug
    • Affects Version/s: Release 6.2.0
    • Fix Version/s: None
    • Component/s: Core
    • Labels:
    • Environment:

      OS: OSX 10.11.5
      Node: 6.9.5
      Appc NPM: 4.2.9-3
      Appc Core: 6.2.0-master.54

    • Severity:
      Major
    • Story Points:
      1
    • Sprint:
      2017 Sprint 09 Tooling

      Description

      This is a regression from 6.1.0

      Workaround

      Add your global node_modules to the NODE_PATH env variable in your bash_profile (or similar)

      Description

      When running appc cloud publish the CLI will error out with [ERROR] npm not found. Please install npm and try again.Error: Cannot find module 'npm'. Originating from acs here. This works fine when using the acs directly, i.e one installed using npm i acs -g. I believe the require in the gobal install of acs works because when require traverses looks npm, acs has added the necessary directory to NODE_PATH here it ensures my NODE_PATH includes the global node_modules directory, however when this is run in the context of the appc cli all it does is add /Users/eharris/.appcelerator/install/6.2.0-master.54/package/node_modules to my NODE_PATH.

      npm being required from the global space can be confirmed by

      1. Edit the require to the below, check the log. It will point to your global npm install

      var npm = require.resolve('npm');
      console.log(npm);
       

      2. Change the folder name of the global npm to something that isn't npm. The global acs will now no longer work

      This may just be a documentation issue and a duplicate of NODEJS-2851

      Steps to reproduce
      1. Run appc cloud publish in a directory
      Actual results

      The CLI will error out with [ERROR] npm not found. Please install npm and try again.Error: Cannot find module 'npm'

      Expected results

      No error or output that can inform a user/point a user to how to rectify the issue

        Attachments

          Activity

            People

            • Assignee:
              emerriman Eric Merriman
              Reporter:
              eharris Ewan Harris
              Reviewer:
              Yuping Jin
            • Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Git Source Code