work-commute icon indicating copy to clipboard operation
work-commute copied to clipboard

:ambulance: Fix local development due to FontAwesome

Open rfviolato opened this issue 2 years ago • 6 comments

rfviolato avatar Apr 21 '22 19:04 rfviolato

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/rfviolato/work-commute/EJwbFUNxVNYCByhMxKYsr6Yog26Q
✅ Preview: https://work-commute-git-fix-font-awesome-deprecate-rfviolato.vercel.app

vercel[bot] avatar Apr 21 '22 19:04 vercel[bot]

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated
work-commute ✅ Ready (Inspect) Visit Preview Jan 12, 2023 at 9:03AM (UTC)

vercel[bot] avatar Jan 12 '23 08:01 vercel[bot]

server is crashing, possibly because of the gql package being very outaded https://www.npmjs.com/package/apollo-server-micro

rfviolato avatar Jan 12 '23 08:01 rfviolato

After using postman to hit the API in the preview environment, I got this in the function logs:

2023-01-12T08:52:44.472Z	undefined	ERROR	(node:8) Warning: To load an ES module, set "type": "module" in the package.json or use the .mjs extension.
(Use `node --trace-warnings ...` to show where the warning was created)
2023-01-12T08:52:44.473Z	undefined	ERROR	/var/task/server/api/log-work-arrive.js:37
import { logTime } from '../utils/log-time';
^^^^^^
SyntaxError: Cannot use import statement outside a module
    at Object.compileFunction (node:vm:360:18)
    at wrapSafe (node:internal/modules/cjs/loader:1088:15)
    at Module._compile (node:internal/modules/cjs/loader:1123:27)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1213:10)
    at Module.load (node:internal/modules/cjs/loader:1037:32)
    at Function.Module._load (node:internal/modules/cjs/loader:878:12)
    at ModuleWrap.<anonymous> (node:internal/modules/esm/translators:169:29)
    at ModuleJob.run (node:internal/modules/esm/module_job:193:25)
    at async Promise.all (index 0)
    at ESMLoader.import (node:internal/modules/esm/loader:530:24)
RequestId: 6e058052-cf60-407b-b905-9cd4bcbef54c Error: Runtime exited with error: exit status 1
Runtime.ExitError

rfviolato avatar Jan 12 '23 08:01 rfviolato

Still same issue after @vercel/node upgrade

rfviolato avatar Jan 12 '23 09:01 rfviolato

Also worth looking into: I think now.json file might be deprecated and now vercel.json should be used but it might require different setup

rfviolato avatar Jan 12 '23 09:01 rfviolato