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

Remove Postinstall Script #5037

Closed
6 tasks
sashadev-sky opened this issue Mar 12, 2019 · 5 comments
Closed
6 tasks

Remove Postinstall Script #5037

sashadev-sky opened this issue Mar 12, 2019 · 5 comments
Labels
assigned first-timers-only They need to be well-formatted using the First-timers_Issue_Template. good first issue

Comments

@sashadev-sky
Copy link
Member

First Time?

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.

The problem

We are moving away from using Bower to manage our application dependencies, as it has been deprecated. We would like to remove a postinstall script in our package.json file that is still creating symlinks to bower components.

Solution

This one is simple - lets remove the following lines:

plots2/package.json

Lines 6 to 8 in 205653b

"scripts": {
"postinstall": "node -e \"try { require('fs').symlinkSync(require('path').resolve('node_modules/@bower_components'), 'public/lib', 'junction') } catch (e) { }\""
},

What to change them to:

Nothing. We may eventually add a new postinstall script but for now we are just removing it altogether.

Thanks!!

Steps to Fix

  • Claim this issue with a comment here, below, and ask any clarifying questions you need
  • Fork the repository and set it up locally following the main repo README instructions https://github.com/publiclab/plots2
  • Create a new feature branch with a unique name descriptive to the issue
  • Try to fix the issue following the steps above, but even before you're done, you can:
    commit your changes to your branch and start a pull request (see contributing to Public Lab software) but mark it as "in progress" if you have questions or if you haven't finished
  • Reference this issue in your pull request body
  • Once you submit your pull request, an additional checklist will be provided for getting it merged

💬 Get help

If you need any help - here are some options:

@grvsachdeva
Copy link
Member

hey @emestabillo, you can start working on this one. Thanks!

@emestabillo
Copy link
Contributor

Hi @gauravano ,
Following are screenshots from my dev setup as requested:

yarn install

yarn install

passenger start gives me 502 Bad Gateway nginx/1.15.8

pstart

Screen Shot 2019-03-12 at 10 50 57 PM

The regular rails s command seems to load the app. Can I just use this?

rails s

Screen Shot 2019-03-12 at 10 56 59 PM

@sashadev-sky
Copy link
Member Author

@emestabillo I am not sure about resolving that specific error and maybe @gauravano can advice on that but you can definitely just use rails s 👍

@grvsachdeva
Copy link
Member

Hi @emestabillo, I tried passenger start on my system and it worked fine. I think it has something to do with your passenger setup but not quite sure as I am not a regular user of passenger myself (I use WEBrick most of the time).

I found some links - https://stackoverflow.com/questions/51889368/rails-nginx-passenger-error-phusion-passenger-doesnt-seem-to-be-running?rq=1

phusion/passenger#1469

You can try them and maybe @jywarren can help here.

Thank you for the response @CleverFool77 ! I did try it with ‘rails s’, it loaded without the assets. I’ve just been assigned my first task and i dont think it will be a conflict for now (it

you said assets weren't loaded when you ran server with rails s but as per the above screenshot, the whole setup seems fine. The view seems different because at publiclab.org, the carousel, footer, etc are features i.e., their code is stored in the production database and that's why you are not able to see that in your local app.

Thanks!

@emestabillo
Copy link
Contributor

Awesome! Thank you for the feedback @gauravano @sashadev-sky !!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
assigned first-timers-only They need to be well-formatted using the First-timers_Issue_Template. good first issue
Projects
None yet
Development

No branches or pull requests

3 participants