Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🚑 Fix local development due to FontAwesome #37

Open
wants to merge 8 commits into
base: master
Choose a base branch
from

Conversation

rfviolato
Copy link
Owner

No description provided.

@vercel
Copy link

vercel bot commented Apr 21, 2022

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
Copy link

vercel bot commented Jan 12, 2023

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)

@rfviolato
Copy link
Owner Author

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

@rfviolato
Copy link
Owner Author

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
Copy link
Owner Author

Still same issue after @vercel/node upgrade

@rfviolato
Copy link
Owner Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant