Serverless offline is an npm package for running serverless applications using nodejs. It uses hapi underneath which is apparently supported. I have tried both the universal approach and the default but it does not pick up the node processes that are running.
Default
Using the default method I run npm run offline - Console ninja stays inactive when this is done. Output pasted below.
Universal approach
When running console-ninja npm run offline I get the same error as this bug report.
TypeError [ERR_INVALID_URL_SCHEME]: The URL must be of scheme file
at new NodeError (node:internal/errors:387:5)
at Object.fileURLToPath (node:internal/url:1435:11)
at ESMLoader.commonjsStrategy (node:internal/modules/esm/translators:151:36)
at ESMLoader.moduleProvider (node:internal/modules/esm/loader:468:14)
Version
v0.0.114
Steps to reproduce (or sample repo)
Install serverless globally using npm i -g serverless
Install the example http api project using serverless install -u https://github.com/serverless/examples/tree/v3/aws-node-http-api -n my-project
cd into my-project
install serverless offline using serverless plugin install -n serverless-offline
Run
for default process run serverless offline
for universal run console-ninja serverless offline
Log output
10:54:09.164 info host ------------ starting ------------
10:54:09.171 info extension
10:54:09.185 info host client connected: extension { address: '::', family: 'IPv6', port: 42721 }
10:54:09.187 info host starting host: {"extensionFolder":"/home/ben/.vscode/extensions/wallabyjs.console-ninja-0.0.114","runtimeHookFile":"/home/ben/.vscode/extensions/wallabyjs.console-ninja-0.0.114/out/runtimeHook/tracer.js","globalErrorHandlerFile":"/home/ben/.vscode/extensions/wallabyjs.console-ninja-0.0.114/out/runtimeHook/errorHandler.js","filesToInstrument":[{"path":"/home/ben/code/agyle-time/schedule/schedule-queries/lib/additionalHours/handlers/getAvailablePoliciesForUser.js","reason":"open"}],"debug":false,"config":{"dateTimeFormat":"hh:mm:ss.SSS","openLinksInEditor":true,"maxLogViewerEntries":15000,"fontSize":10,"autoClearLogViewerOnFileChanges":true,"outputMode":"Beside File","captureFunctions":false,"enableProFeatures":true,"toolsToAutoPatch":["vite","jest","webpack","next.js","cypress","http-server","serve","nuxt","remix","qwik","hydrogen"],"showErrors":true,"showLogsOnlyFromOpenedFiles":false,"showLogsFromLogPointsOnly":false},"allowedHosts":["localhost","127.0.0.1","example.cypress.io","ben-pc-linux","192.168.1.15","192.168.255.34"],"host":"127.0.0.1"}
10:54:09.193 info host starting tools discovery and integration
10:54:09.195 info host looking for tools to patch
10:54:09.237 info host worker Starting Host Worker...
10:54:09.290 info host found 0 tool file(s) to patch
10:54:09.291 info host completed tools discovery and integration
We've added native support of Serverless Offline to Console Ninja v0.0.115, therefore there is no need to prefix the command with console-ninja. We also fixed the original issue that you reported.
What happened?
Serverless offline is an npm package for running serverless applications using nodejs. It uses hapi underneath which is apparently supported. I have tried both the universal approach and the default but it does not pick up the node processes that are running.
Default Using the default method I run
npm run offline
- Console ninja stays inactive when this is done. Output pasted below.Universal approach When running
console-ninja npm run offline
I get the same error as this bug report.Version
v0.0.114
Steps to reproduce (or sample repo)
npm i -g serverless
serverless install -u https://github.com/serverless/examples/tree/v3/aws-node-http-api -n my-project
my-project
serverless plugin install -n serverless-offline
serverless offline
console-ninja serverless offline
Log output