Hello,
I migrate my framework version from 3.38 to 4 but then a got the following error :
Error [ERR_MODULE_NOT_FOUND]: Cannot find module ‘/Users/xxxx/.serverless/releases/4.0.28/package/node_modules/ajv/dist/compile/codegen/index.js’ imported from /Users/xxxx/.serverless/releases/4.0.28/package/dist/sf-core.js
at finalizeResolution (node:internal/modules/esm/resolve:255:11)
at moduleResolve (node:internal/modules/esm/resolve:908:10)
at defaultResolve (node:internal/modules/esm/resolve:1121:11)
at ModuleLoader.defaultResolve (node:internal/modules/esm/loader:396:12)
at ModuleLoader.resolve (node:internal/modules/esm/loader:365:25)
at ModuleLoader.getModuleJob (node:internal/modules/esm/loader:240:38)
at ModuleWrap. (node:internal/modules/esm/module_job:85:39)
at link (node:internal/modules/esm/module_job:84:36) {
code: ‘ERR_MODULE_NOT_FOUND’,
url: ‘file:///Users/xxxx/.serverless/releases/4.0.28/package/node_modules/ajv/dist/compile/codegen/index.js’
}
I just install serverless
npm i serverless -g
and then type
serverless
I use nodejs 20