so I am trying to use cloud functions, and I want to test to run my function locally. so I try to use Function Framework.
but it seems I failed to install the package, it is said, found 11 high severity vulnerabilities like this:
added 2 packages from 2 contributors and audited 1039 packages in 5.687s found 11 high severity vulnerabilities
so when I try to run my code locally. I failed with this error:
Error: Cannot find module '/Users/muchammadagunglaksana/Documents/kumpul_muslim/cloud_functions_serverless_backend/functions/functions-framework' at Function.Module._resolveFilename (internal/modules/cjs/loader.js:636:15) at Function.Module._load (internal/modules/cjs/loader.js:562:25) at Function.Module.runMain (internal/modules/cjs/loader.js:831:12) at startup (internal/bootstrap/node.js:283:19) at bootstrapNodeJSCore (internal/bootstrap/node.js:622:3) Muchammads-MacBook-Air:functions muchammadagunglaksana$ node functions-framework --target=helloWorld internal/modules/cjs/loader.js:638 throw err; ^
Error: Cannot find module '/Users/muchammadagunglaksana/Documents/kumpul_muslim/cloud_functions_serverless_backend/functions/functions-framework' at Function.Module._resolveFilename (internal/modules/cjs/loader.js:636:15) at Function.Module._load (internal/modules/cjs/loader.js:562:25) at Function.Module.runMain (internal/modules/cjs/loader.js:831:12) at startup (internal/bootstrap/node.js:283:19) at bootstrapNodeJSCore (internal/bootstrap/node.js:622:3)
even though it seems it has been installed in package.json
what went wrong in here ?
npm audit fix --force
and see if there is new version with the issue fixed already. i also noticed yourfirebase-admin
is not of latest. – Bagus Tesa