title: ServerlessError: Serverless plugin "sls" not found
body: <p>i'm trying to use serverless for the first time and although I think I have followed the docs etc I'm getting a weird error.</p>
  <p>I have installed serverless and a few functions:</p>
  <pre><code>npm install -g serverless
  npm install -g serverless-plugin-optimize
  </code></pre>
  <pre><code>sls invoke local -f auth-handler -s local
  Serverless: To ensure safe major version upgrades ensure &quot;frameworkVersion&quot; setting in service configuration (recommended setup: &quot;frameworkVersion: ^2.1.1&quot;)
  
  
    Serverless Error ---------------------------------------
  
    ServerlessError: Serverless plugin &quot;sls&quot; not found. Make sure it's installed and listed in the &quot;plugins&quot; section of your serverless config file.
        at C:\Users\cw\AppData\Roaming\npm\node_modules\serverless\lib\classes\PluginManager.js:155:17
  ...
  </code></pre>
  <p>As you can see, I'm invoking sls and its running (I've exported <code>SLS_DEBUG=* sls</code> to get some debug)</p>
  <p>sls reports this as the environment:</p>
  <pre><code>Your Environment Information 
  ---------------------------
       Operating System:          win32
       Node Version:              12.18.4
       Framework Version:         2.1.1
       Plugin Version:            4.0.4
       SDK Version:               2.3.2
       Components Version:        3.1.3
  
  
  </code></pre>
  <p>my serverless.yml is:</p>
  <pre><code>service: serverless-optimize-example
  provider:
    name: aws
    runtime: nodejs12.18
  
  package:
    individually: true
  
  custom:
    enable_optimize:
      local: false
  
  plugins:
    - sls
    - serverless-plugin-optimize
    - serverless-offline
  
  functions:
    auth-handler:
      handler: src/index.handler
      optimize: ${self:custom.enable_optimize.${opt:stage,'dev'}, 'true'}
      events:
        - http:
            path: /func1
            method: get
  
  </code></pre>
  <p>What do I have to do to install sls, even though it looks like it is installed?</p>
  <p><strong>UPDATE</strong>
  I got it working, thanks @David Webster. It was this SO:</p>
  <p><a href="https://stackoverflow.com/questions/27864040/fixing-npm-path-in-windows-8-and-10">Fixing npm path in Windows 8 and 10</a></p>
  <p>That finally solved it. For anybody else. There were 2 directories that needed to be added to my path:</p>
  <pre><code>%APPDATA%\npm
  &lt;path to nodejs&gt;\node_modules\npm\bin e.g. C:\Program Files\nodejs\node_modules\npm\bin
  </code></pre>