You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The template works out of the box. However, as soon as you yarn add any dependency and use it in your code, you get a runtime error (se below).
This is solved by removing the package block in the serverless.yml file, which was excluding node_modules from the package.
I am not clear what the intention is here - should node_modules be excluded and some other setting or plugin is missing?
Unable to import module ‘handler’: Error
at Function.Module._resolveFilename (module.js:547:15)
at Function.Module._load (module.js:474:25)
at Module.require (module.js:596:17)
at require (internal/module.js:11:18)
at Object.<anonymous> (/var/task/handler.js:3:16)
at Module._compile (module.js:652:30)
at Object.Module._extensions..js (module.js:663:10)
at Module.load (module.js:565:32)
at tryModuleLoad (module.js:505:12)
at Function.Module._load (module.js:497:3)
The text was updated successfully, but these errors were encountered:
The template works out of the box. However, as soon as you
yarn add
any dependency and use it in your code, you get a runtime error (se below).This is solved by removing the
package
block in theserverless.yml
file, which was excludingnode_modules
from the package.I am not clear what the intention is here - should
node_modules
be excluded and some other setting or plugin is missing?The text was updated successfully, but these errors were encountered: