Vercel, Render, and Layer0 - Internal Server Error or Page Not Found


I am trying to deploy my project but keep running into “Internal Server Error” or “Page Not Found”.

At first, I kept running into this error:

Building es5 bundle
`isModuleDeclaration` has been deprecated, please migrate to `isImportOrExportDeclaration`
    at isModuleDeclaration (/vercel/path1/node_modules/@babel/types/lib/validators/generated/index.js:3940:35)
    at PluginPass.Program (/vercel/path1/node_modules/babel-plugin-lodash/lib/index.js:102:44)

So I downgraded to

  "engines": {
    "node": "16.x",
    "npm": "6.x"

Then, I tried 3 different deployments:


  • The Error Logs:
  Error: TypeError: Cannot read properties of undefined (reading 'packages')
      at $ (/var/task/index.js:333:22571)
      at processTicksAndRejections (node:internal/process/task_queues:96:5)

  Error: TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received type number (446)
      at $ (/var/task/index.js:333:22571)
      at processTicksAndRejections (node:internal/process/task_queues:96:5)

  • The Build Command:
    npx frontity build

  • The Install Command:
    npm install


npx frontity build && npx frontity serve --port $PORT

3. Layer0

Thank you for your help.