Giter Site home page Giter Site logo

Comments (6)

eahefnawy avatar eahefnawy commented on July 30, 2024

Thanks a lot for the detailed report @cedric-vermeulen ... We really appreciate such reports ❤️ ... I'll look into this.

from serverless.

NicoHinderling avatar NicoHinderling commented on July 30, 2024

I just wanted to +1 to this. I tried running a local command that worked in v3 and got the following stacktrace:

npm exec sls invoke local --function fireball --stage prod --data {"function": "nico"}

Warning: Using serverless deploy -f option only updates the function code and will not update CloudFormation stack (env variables included).
✖ ReferenceError: module is not defined in ES module scope
This file is being treated as an ES module because it has a '.js' file extension and '/Users/nicolashinderling/dev/emerge-pnpm-on-hold/backend/services/emerge/package.json' contains "type": "module". To treat it as a CommonJS script, rename it to use the '.cjs' file extension.
    at file:///Users/nicolashinderling/dev/emerge-pnpm-on-hold/backend/services/emerge/.serverless/build/src/fireball/fireball.js:224:2761
    at ModuleJob.run (node:internal/modules/esm/module_job:218:25)
    at async ModuleLoader.import (node:internal/modules/esm/loader:329:24)
    at async loadModule (file:///Users/nicolashinderling/.serverless/releases/4.1.5/package/dist/sf-core.js:1025:9923)
    at async AwsInvokeLocal.invokeLocalNodeJs (file:///Users/nicolashinderling/.serverless/releases/4.1.5/package/dist/sf-core.js:1025:9253)
    at async PluginManager.runHooks (file:///Users/nicolashinderling/.serverless/releases/4.1.5/package/dist/sf-core.js:1028:9294)
    at async PluginManager.invoke (file:///Users/nicolashinderling/.serverless/releases/4.1.5/package/dist/sf-core.js:1028:10064)
    at async PluginManager.run (file:///Users/nicolashinderling/.serverless/releases/4.1.5/package/dist/sf-core.js:1028:10788)
    at async Serverless.run (file:///Users/nicolashinderling/.serverless/releases/4.1.5/package/dist/sf-core.js:1035:10442)
    at async runFramework (file:///Users/nicolashinderling/.serverless/releases/4.1.5/package/dist/sf-core.js:1079:2314)
    at async route (file:///Users/nicolashinderling/.serverless/releases/4.1.5/package/dist/sf-core.js:1088:14692)
    at async Object.run2 [as run] (file:///Users/nicolashinderling/.serverless/releases/4.1.5/package/dist/sf-core.js:1088:15090)
    at async run3 (file:///Users/nicolashinderling/.serverless/releases/4.1.5/package/dist/sf-core.js:1088:16324)


✖ Exception encountered when loading /Users/nicolashinderling/dev/emerge-pnpm-on-hold/backend/services/emerge/.serverless/build/src/fireball/fireball
ServerlessError2: Exception encountered when loading /Users/nicolashinderling/dev/emerge-pnpm-on-hold/backend/services/emerge/.serverless/build/src/fireball/fireball
    at AwsInvokeLocal.invokeLocalNodeJs (file:///Users/nicolashinderling/.serverless/releases/4.1.5/package/dist/sf-core.js:1025:9347)
    at async PluginManager.runHooks (file:///Users/nicolashinderling/.serverless/releases/4.1.5/package/dist/sf-core.js:1028:9294)
    at async PluginManager.invoke (file:///Users/nicolashinderling/.serverless/releases/4.1.5/package/dist/sf-core.js:1028:10064)
    at async PluginManager.run (file:///Users/nicolashinderling/.serverless/releases/4.1.5/package/dist/sf-core.js:1028:10788)
    at async Serverless.run (file:///Users/nicolashinderling/.serverless/releases/4.1.5/package/dist/sf-core.js:1035:10442)
    at async runFramework (file:///Users/nicolashinderling/.serverless/releases/4.1.5/package/dist/sf-core.js:1079:2314)
    at async route (file:///Users/nicolashinderling/.serverless/releases/4.1.5/package/dist/sf-core.js:1088:14692)
    at async Object.run2 [as run] (file:///Users/nicolashinderling/.serverless/releases/4.1.5/package/dist/sf-core.js:1088:15090)
    at async run3 (file:///Users/nicolashinderling/.serverless/releases/4.1.5/package/dist/sf-core.js:1088:16324)

For help, try the following:
  • Run the command again with the "--debug" option
  • Run "serverless support"
  • Review the docs: https://www.serverless.com/framework/docs/

npm verb exit 1
npm verb code 1

from serverless.

NicoHinderling avatar NicoHinderling commented on July 30, 2024

@eahefnawy was this change released? I tried running npx serverless update and am still seeing errors when running my local invoke command (slightly different error message but still similar... I can post the error logs if needed)

from serverless.

eahefnawy avatar eahefnawy commented on July 30, 2024

Yeah it was released. What's the new error you're seeing? 🤔

from serverless.

NicoHinderling avatar NicoHinderling commented on July 30, 2024

Hey @eahefnawy my apologies, I had something messed up locally. I re-setup my local and my npx invoke local is working now! Sorry about that!

from serverless.

eahefnawy avatar eahefnawy commented on July 30, 2024

Great to hear! 🙌

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.