invoking lambda function gives "errorMessage": "Cannot find module 'semver'" - aws-lambda

I'm working on a lambda function and when I try to invoke it I get the following error
"errorMessage": "Cannot find module 'semver'".
details
Unable to import module 'dist/index': Error
If I add semver to package.json then it works fine. This started happening suddenly. A bit of background information, I'm using a monorepo with yarn and lerna.

Related

Golang following container logs undeclared name Log

I'm trying to build a container with testcontainers and output the logs to stdout.
I have followed their documentation (https://golang.testcontainers.org/features/follow_logs/) but when writing the Accept function, I get an error:
func (g *TestLogConsumer) Accept(l Log) {
g.Msgs = append(g.Msgs, string(l.Content))
}
The problem is that I didn't import a certain package, so I can't use "Log".
I get the following error:
undeclared name: Log
The question is, which package should I import. How can I make vscode import these packages automatically for me ? I have installed the go extension, but it doesn't import anything automatically.

TypeError: _jsxDEV is not a function when running User Journey exercise in Cypress tutorial

I'm running in to an issue when trying to complete this section of the Cypress Real World Testing course.
TypeError
TypeError: _jsxDEV is not a function
This error happened while generating the page. Any console logs will be displayed in the terminal window.
Call Stack
_createMdxContent
file:///Users/kylerchavez/Documents/GitHub/cypress-realworld-testing-course-app/node_modules/next-mdx-remote/dist/index.js (55:35)
MDXContent
file:///Users/kylerchavez/Documents/GitHub/cypress-realworld-testing-course-app/node_modules/next-mdx-remote/dist/index.js (55:35)
processChild
file:///Users/kylerchavez/Documents/GitHub/cypress-realworld-testing-course-app/node_modules/react-dom/cjs/react-dom-server.node.development.js (3353:14)
resolve
file:///Users/kylerchavez/Documents/GitHub/cypress-realworld-testing-course-app/node_modules/react-dom/cjs/react-dom-server.node.development.js (3270:5)
ReactDOMServerRenderer.render
file:///Users/kylerchavez/Documents/GitHub/cypress-realworld-testing-course-app/node_modules/react-dom/cjs/react-dom-server.node.development.js (3753:22)
ReactDOMServerRenderer.read
file:///Users/kylerchavez/Documents/GitHub/cypress-realworld-testing-course-app/node_modules/react-dom/cjs/react-dom-server.node.development.js (3690:29)
Object.renderToString
file:///Users/kylerchavez/Documents/GitHub/cypress-realworld-testing-course-app/node_modules/react-dom/cjs/react-dom-server.node.development.js (4298:27)
renderDocument
file:///Users/kylerchavez/Documents/GitHub/cypress-realworld-testing-course-app/node_modules/next/dist/server/render.js (736:47)
Object.renderToHTML
file:///Users/kylerchavez/Documents/GitHub/cypress-realworld-testing-course-app/node_modules/next/dist/server/render.js (819:34)
process.processTicksAndRejections
node:internal/process/task_queues (95:5)
I've tried deleting node-modules and running npm install again and I've poked around trying to figure out where that function is getting called and can't seem to find it. Any advice?

generating core failed while doing gqlgen init

I'm attempting to follow this tutorial to set up a GraphQL server in Golang: https://www.howtographql.com/graphql-go/1-getting-started/
However, when I get to the part to run go run github.com/99designs/gqlgen init, I keep getting this error:
generating core failed: unable to load github.com/moonlightfight/elo-backend/graph/model - make sure you're using an import path to a package that exists
Not sure what I'm doing wrong...
Did run go mod init github.com/moonlightfight/elo-backend, so don't know if there's anything else I need to run that this didn't mention.

Serverless Deploy crashing for ruby app using serverless-ruby-package on mac

I am using serverless for building aws app on a mac. When I do not use the "serverless-ruby-package" and deploy, I get
"errorMessage": "cannot load such file -- curb",
as the gems are not properly compiled.
The moment I add
plugins:
- serverless-ruby-package
and execute
sls deploy
or
sls package
I get
Type Error ----------------------------------------------
TypeError: Cannot read property 'push' of undefined
at PackageRubyBundlePlugin.beforePackage (/Users/xxxxxx/node_modules/serverless-ruby-package/index.js:85:45)
at PluginManager.invoke (/usr/local/lib/node_modules/serverless/lib/classes/PluginManager.js:576:20)
at async PluginManager.run (/usr/local/lib/node_modules/serverless/lib/classes/PluginManager.js:634:7)
at async Serverless.run (/usr/local/lib/node_modules/serverless/lib/Serverless.js:327:5)
at async /usr/local/lib/node_modules/serverless/scripts/serverless.js:704:9
This looks to be a bug with the serverless-ruby-package plugin, as it's been reported by other users
You may consider adding a comment here.

Error: package or namespace load failed for ‘xgboost’

I keep getting this error even though I've already installed the xgboost package. I tried the following code and it keep saying the same when I run library(xgboost). Anyone has any idea?
I've already tried this code and it keep saying the same thing:
remove.packages("xgboost")
install.packages('xgboost', dependencies = TRUE)
Thanks in advance!

Resources