import resolve from 'resolve' ; import processEnv from '../process-env' ; resolve ( '@sitecore-jss/sitecore-jss-cli' , { basedir : process . cwd ( ) } , ( error , projectLocalCli ) => { let cli ; if ( error ) { cli = require ( '../cli.global' ) . default ; console . warn ( 'JSS CLI is running in global mode because it was not installed in the local node_modules folder.' ) ; } else { cli = require ( projectLocalCli as string ) . default ; processEnv ( process . cwd ( ) ) ; } cli ( ) ; } ) ;