GithubHelp home page GithubHelp logo

Comments (7)

lorenwest avatar lorenwest commented on June 22, 2024 2

The actual stack trace is a little different. Maybe this will help:

─ node:internal/modules/cjs/loader:1147
  throw err;
  ^

Error: Cannot find module '/opt/sls-sdk-node'
Require stack:
- internal/preload
    at Module._resolveFilename (node:internal/modules/cjs/loader:1144:15)
    at Module._load (node:internal/modules/cjs/loader:985:27)
    at internalRequire (node:internal/modules/cjs/loader:175:19)
    at Module._preloadModules (node:internal/modules/cjs/loader:1582:5)
    at loadPreloadModules (node:internal/process/pre_execution:731:5)
    at setupUserModules (node:internal/process/pre_execution:172:3)
    at prepareExecution (node:internal/process/pre_execution:132:5)
    at prepareMainThreadExecution (node:internal/process/pre_execution:55:10)
    at node:internal/main/run_main_module:11:19 {
  code: 'MODULE_NOT_FOUND',
  requireStack: [ 'internal/preload' ]
}

Node.js v20.10.0
← λ api

from serverless.

senghuotlay avatar senghuotlay commented on June 22, 2024 1

i am getting the exact same error

from serverless.

gsavvidis96 avatar gsavvidis96 commented on June 22, 2024 1

Same here

from serverless.

austencollins avatar austencollins commented on June 22, 2024

There is a conflict with dev mode in V4 and our observability product. We are working on a fix. ETA is ~1.5 days.

from serverless.

austencollins avatar austencollins commented on June 22, 2024

Fixed in https://github.com/serverless/serverless/releases/tag/v4.0.34

from serverless.

lorenwest avatar lorenwest commented on June 22, 2024

Just installed serverless v4 npm i -g serverless and am getting this same error. Performed a serverless update to get the latest 4.1.4

Does this require 4.0.34, or is the fix also in 4.1.4?

Thank you

Context:

Service Overview

  • Serverless Framework Version: 4.1.4
  • Service Config File: serverless.yml
  • Service Name: mc-serverless
  • Service App: mc-serverless
  • Service Runtime: nodejs20.x
  • Service Stage: dev
  • Service Region: us-east-1
  • Command: dev --stage dev

Service Path

...

Service Config

org: ...
app: ...
service: ...
plugins:
  - serverless-domain-manager
custom:
  customDomain:
    domainName: 'api-${sls:stage}...'
    certificateName: '...'
    basePath: ''
    stage: ${sls:stage}
    autoDomain: true
    createRoute53Record: true
    endpointType: regional
    apiType: http
    x_allowPathMatching: true # Only for one deploy
provider:
  name: aws
  deploymentMethod: direct
  architecture: arm64
  runtime: nodejs20.x
  iam:
    role:
      statements:
        ...
   environment:
    RUN_STAGE: ${sls:stage}
functions:
  api:
    handler: index.handler
    memorySize: 1024
    events:
      - httpApi: '*'

from serverless.

austencollins avatar austencollins commented on June 22, 2024

@lorenwest Should be fixed. But if you saw this in 4.1.4 we better give it another look. @eahefnawy could you check this out pls?

from serverless.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.