Comments (6)
Thanks a lot for the detailed report @cedric-vermeulen ... We really appreciate such reports ❤️ ... I'll look into this.
from serverless.
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.
@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.
Yeah it was released. What's the new error you're seeing? 🤔
from serverless.
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.
Great to hear! 🙌
from serverless.
Related Issues (20)
- Unable to Disable esbuild in Serverless 4.1.11 HOT 6
- Unable to bundle @aws-sdk in v4 HOT 4
- Recoverable error occurred (Socket connection timeout)
- [V4] Dev mode: handler not found in service directory HOT 1
- Unable to Enable "Helpers for Encryption in Transit" for Environment Variables in Python Lambda HOT 1
- Serverless4 with Typescript Support No Longer Automatically Verifies Typescript Compilation HOT 2
- Cross account security group rule id erroring as invalid HOT 1
- Outage: Version 4.1.13 Breaking Changes (Deployments + Building) HOT 39
- V4 - Version Pinning HOT 1
- Keys cannot contain Serverless Variables - How to deal?
- After upgrading to v.4 max-concurrency flag fails the deployment
- Nested variable reference throws error when inserted into a reference to SSM parameter store HOT 3
- Unable to remove License Key HOT 2
- Lack of visibility on how Credits are being used
- Installing plugins HOT 4
- Installing plugins ignores yarn and uses npm instead HOT 1
- Documentation links not working correctly HOT 2
- s3 event with existing: true combined with bucket resource definition causes serverless remove to fail due to race condition
- CLI options definitions were upgraded with "type" property (which could be one of "string", "boolean", "multiple")
- [V4] Typescript with ESM support HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from serverless.