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

[Question] How does this work? #1213

Closed
mikeymop opened this issue Jul 28, 2021 · 2 comments
Closed

[Question] How does this work? #1213

mikeymop opened this issue Jul 28, 2021 · 2 comments
Labels
question Further information is requested.

Comments

@mikeymop
Copy link

Looking at the package.json it appears to point to to index.js at the root of the project. This does not exist.

Looking through the code it appears the entrypoint is api/index.js however the project gives no indication of where the entrypoint is.

When deploying to vercel is an index.js created at the root of the project in order for this to work?
I am curious because I would like to run this project locally on my machine and make modifications from a local node environment before deploying to vercel.

@rjarman
Copy link

rjarman commented Jul 29, 2021

If you want to create an installable module with npm package manager then your module's entry point should be the same as the main: index.js (you can check it by going to the node_modules folder's packages), otherwise, the main key does not play any role in these kinds of development except in some cases. If you delete the param, development environment should be run well but it's necessary to use it to create npm packages.

references:
https://docs.npmjs.com/cli/v7/configuring-npm/package-json#main

@anuraghazra anuraghazra added the question Further information is requested. label Sep 2, 2021
@anuraghazra
Copy link
Owner

Hi @mikeymop

package.json it appears to point to to index.js

It does not matter in our case since github-readme-stats is not a npm module

Looking through the code it appears the entrypoint is api/index.js however the project gives no indication of where the entrypoint is.

That file is special to vercel and thats how vercel finds serverless functions
You have to use vercel's cli to run github-readme-stats locally.

I hope your questions are answered, closing this for now.

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

No branches or pull requests

3 participants