title: Serverless framework serverless-offline start error on get request cannot find module 'node:url' (Lambda AWS)
body: <p>I have the following issue...
  turns out I cannot test locally my aws lambda function over serverless-offline plugin in serverless framework for nodejs. Cannot do a simple GET request.</p>
  <p>I am able to deploy to aws lambda with <code>serverless deploy</code> command, but in order for better development experience of the team we need to deploy locally with serverless-offline, I followed this guide <a href="https://fauna.com/blog/develop-using-serverless-offline" rel="nofollow noreferrer">https://fauna.com/blog/develop-using-serverless-offline</a>, but got stuck when I do a simple get request after running successfully <code>serverless offline</code> command.
  This I get when running <code>serverless offline</code> successfully
  <a href="https://i.stack.imgur.com/oDsjL.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/oDsjL.png" alt="serverless offline command output" /></a></p>
  <p>But when I do a get request to the link <code>http://localhost:3000/</code> through postman
  I get the following error</p>
  <p><a href="https://i.stack.imgur.com/dmIY2.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/dmIY2.png" alt="get request error" /></a></p>
  <p>It basically says cannot find node:url module but I did npm install url, but still same error throwing.
  I will insert the project tree and files below:</p>
  <p><a href="https://i.stack.imgur.com/z3lYO.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/z3lYO.png" alt="serverless hello world tree structure" /></a></p>
  <p>handler.js</p>
  <pre><code>//&quot;use strict&quot;;
  
  console.log(&quot;AJAJAJAJAJAJAJAJAJAAJAJ&quot;);
  
  console.log(&quot;Printing module&quot;);
  console.log(module.exports);
  
  module.exports.hello = async (event) =&gt; {
    console.log(&quot;whaaaaat&quot;);
    return {
      statusCode: 200,
      body: JSON.stringify(
        {
          message: &quot;Go Serverless v3.0! Your function executed successfully!&quot;,
          input: event,
        },
        null,
        2
      ),
    };
  };
  </code></pre>
  <p>serverless.yml</p>
  <pre><code>org: ortizjorge97
  app: aws-node-http-api-project
  service: aws-node-http-api-project
  frameworkVersion: '3'
  
  provider:
    name: aws
    runtime: nodejs14.x
  
  plugins:
    - serverless-offline
    - serverless-bundle
    - serverless-dotenv-plugin
  
  functions:
    hello:
      handler: handler.hello
      events:
        - httpApi:
            path: /
            method: get
  
  </code></pre>
  <p>package.json</p>
  <pre><code>{
    &quot;name&quot;: &quot;aws-node-http-api-project&quot;,
    &quot;version&quot;: &quot;1.0.0&quot;,
    &quot;description&quot;: &quot;&lt;!-- title: 'AWS Simple HTTP Endpoint example in NodeJS' description: 'This template demonstrates how to make a simple HTTP API with Node.js running on AWS Lambda and API Gateway using the Serverless Framework.' layout: Doc framework: v3 platform: AWS language: nodeJS authorLink: 'https://github.com/serverless' authorName: 'Serverless, inc.' authorAvatar: 'https://avatars1.githubusercontent.com/u/13742415?s=200&amp;v=4' --&gt;&quot;,
    &quot;main&quot;: &quot;handler.js&quot;,
    &quot;scripts&quot;: {
      &quot;test&quot;: &quot;echo \&quot;Error: no test specified\&quot; &amp;&amp; exit 1&quot;
    },
    &quot;author&quot;: &quot;&quot;,
    &quot;license&quot;: &quot;ISC&quot;,
    &quot;dependencies&quot;: {
      &quot;serverless-bundle&quot;: &quot;^5.5.0&quot;,
      &quot;serverless-dotenv-plugin&quot;: &quot;^4.0.2&quot;,
      &quot;url&quot;: &quot;^0.11.0&quot;
    },
    &quot;devDependencies&quot;: {
      &quot;serverless-offline&quot;: &quot;^10.2.0&quot;
    }
  }
  </code></pre>
  <p>I am newbie on aws stuff, so I dont know what could be happening.</p>
  <p>I am using</p>
  <ul>
  <li>node 14.17.2</li>
  <li>MacOS Monterey m1 processor</li>
  </ul>