publiclab / simple-data-grapher

Turns CSVs into graphs in a few simple steps; embeds onto other websites!
https://publiclab.github.io/simple-data-grapher/
GNU General Public License v3.0
38 stars 52 forks source link

`npm start` default port #109

Closed chen-robert closed 4 years ago

chen-robert commented 4 years ago

Hi, this is a first-timers-only issue. This means we've worked to make it more legible to folks who either haven't contributed to our codebase before, or even folks who haven't contributed to open source before.

If that's you, we're interested in helping you take the first step and can answer questions and help you out as you do. Note that we're especially interested in contributions from people from groups underrepresented in free and open source software!

We know that the process of creating a pull request is the biggest barrier for new contributors. This issue is for you πŸ’

If you have contributed before, consider leaving this one for someone new, and looking through our general help wanted issues. Thanks!

πŸ€” What you will need to know.

Nothing. This issue is meant to welcome you to Open Source :) We are happy to walk you through the process.

Problem

After cloning the repository and installing dependencies,

git clone https://github.com/publiclab/simple-data-grapher.git
cd simple-data-grapher
npm install

there is an error on npm start if the $PORT environmental variable is not set.

TypeError [ERR_INVALID_OPT_VALUE]: The value "{ port: true, host: '0.0.0.0' }" is invalid for option "options"

This is because the npm start script in package.json assumes that $PORT is already defined.

https://github.com/publiclab/simple-data-grapher/blob/65bf118ce0eb2d038d702b51678291cccb848929/package.json#L11

πŸ“‹Solution

You should find a way to set a default value for the $PORT environmental variable in package.json. This stackoverflow article may be helpful as well.

  1. If you are familiar with the terminal or would like to learn it, here is a great tutorial on how to send a pull request using the terminal.

  2. You can also edit files directly in your browser and open a pull request from there.

πŸ€”β“ Questions?

Leave a comment below!

Is someone else already working on this?

We encourage you to link to this issue by mentioning the issue # in your pull request, so we can see if someone's already started on it. If someone seem stuck, offer them some help! Otherwise, take a look at some other issues you can help with. Thanks!

myungwoo-Y commented 4 years ago

Hi, can I work on this issue?