Redwood: Runtime.ImportModuleError - Example Blog

Created on 11 Mar 2020  ·  3Comments  ·  Source: redwoodjs/redwood

Following the installation instructions from the https://github.com/redwoodjs/example-blog, after success deploying to netlify, I got these runtime errors because babel is not resolved.

CMIIW, by default netlify should install devDependencies unless we specified so.

Looking at the netlify.toml inside https://github.com/redwoodjs/example-blog, it contains the following command:

yarn rw db up --no-db-client && yarn rw build

9:49:14 PM: Unknown application error occurredRuntime.ImportModuleError
9:49:15 PM: 2020-03-11T14:49:15.033Z    undefined   ERROR   Uncaught Exception  {"errorType":"Runtime.ImportModuleError","errorMessage":"Error: Cannot find module '@babel/runtime-corejs3/helpers/interopRequireWildcard'\nRequire stack:\n- /var/task/graphql.js\n- /var/runtime/UserFunction.js\n- /var/runtime/index.js","stack":["Runtime.ImportModuleError: Error: Cannot find module '@babel/runtime-corejs3/helpers/interopRequireWildcard'","Require stack:","- /var/task/graphql.js","- /var/runtime/UserFunction.js","- /var/runtime/index.js","    at _loadUserApp (/var/runtime/UserFunction.js:100:13)","    at Object.module.exports.load (/var/runtime/UserFunction.js:140:17)","    at Object.<anonymous> (/var/runtime/index.js:43:30)","    at Module._compile (internal/modules/cjs/loader.js:955:30)","    at Object.Module._extensions..js (internal/modules/cjs/loader.js:991:10)","    at Module.load (internal/modules/cjs/loader.js:811:32)","    at Function.Module._load (internal/modules/cjs/loader.js:723:14)","    at Function.Module.runMain (internal/modules/cjs/loader.js:1043:10)","    at internal/main/run_main_module.js:17:11"]}
9:49:15 PM: 2020-03-11T14:49:15.044Z    undefined   ERROR   Uncaught Exception  {"errorType":"Runtime.ImportModuleError","errorMessage":"Error: Cannot find module '@babel/runtime-corejs3/helpers/interopRequireWildcard'\nRequire stack:\n- /var/task/graphql.js\n- /var/runtime/UserFunction.js\n- /var/runtime/index.js","stack":["Runtime.ImportModuleError: Error: Cannot find module '@babel/runtime-corejs3/helpers/interopRequireWildcard'","Require stack:","- /var/task/graphql.js","- /var/runtime/UserFunction.js","- /var/runtime/index.js","    at _loadUserApp (/var/runtime/UserFunction.js:100:13)","    at Object.module.exports.load (/var/runtime/UserFunction.js:140:17)","    at Object.<anonymous> (/var/runtime/index.js:43:30)","    at Module._compile (internal/modules/cjs/loader.js:955:30)","    at Object.Module._extensions..js (internal/modules/cjs/loader.js:991:10)","    at Module.load (internal/modules/cjs/loader.js:811:32)","    at Function.Module._load (internal/modules/cjs/loader.js:723:14)","    at Function.Module.runMain (internal/modules/cjs/loader.js:1043:10)","    at internal/main/run_main_module.js:17:11"]}
9:49:15 PM: 2020-03-11T14:49:15.063Z    undefined   ERROR   Uncaught Exception  {"errorType":"Runtime.ImportModuleError","errorMessage":"Error: Cannot find module '@babel/runtime-corejs3/helpers/interopRequireWildcard'\nRequire stack:\n- /var/task/graphql.js\n- /var/runtime/UserFunction.js\n- /var/runtime/index.js","stack":["Runtime.ImportModuleError: Error: Cannot find module '@babel/runtime-corejs3/helpers/interopRequireWildcard'","Require stack:","- /var/task/graphql.js","- /var/runtime/UserFunction.js","- /var/runtime/index.js","    at _loadUserApp (/var/runtime/UserFunction.js:100:13)","    at Object.module.exports.load (/var/runtime/UserFunction.js:140:17)","    at Object.<anonymous> (/var/runtime/index.js:43:30)","    at Module._compile (internal/modules/cjs/loader.js:955:30)","    at Object.Module._extensions..js (internal/modules/cjs/loader.js:991:10)","    at Module.load (internal/modules/cjs/loader.js:811:32)","    at Function.Module._load (internal/modules/cjs/loader.js:723:14)","    at Function.Module.runMain (internal/modules/cjs/loader.js:1043:10)","    at internal/main/run_main_module.js:17:11"]}

Am i missing something?

bu0-needs-info

Most helpful comment

Hi @josteph check out the Netlify deployment instructions from the tutorial: https://redwoodjs.com/tutorial/deployment#netlify You may need to opt-in to the beta build process on Netlify.

All 3 comments

Hi @josteph check out the Netlify deployment instructions from the tutorial: https://redwoodjs.com/tutorial/deployment#netlify You may need to opt-in to the beta build process on Netlify.

I'm going to close this for now but please re-open if you find you're still having the issue.

Thanks! The issue was solved by using netlify build beta 🎉

It points out about the temporary DB_HOST due to prisma bug.
Although people might get confused since this step is missing from the README.

Was this page helpful?
0 / 5 - 0 ratings