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

Re-review library dependencies wiki page and fix package.json versions #717

Closed
dondi opened this issue Jan 29, 2019 · 19 comments
Closed

Re-review library dependencies wiki page and fix package.json versions #717

dondi opened this issue Jan 29, 2019 · 19 comments

Comments

@dondi
Copy link
Owner

dondi commented Jan 29, 2019

Our library dependencies wiki page is due for a review (last modified January 2017). The package.json dependencies need to be cleaned up and set to fixed versions; a fresh install should be done so as to reset package-lock.json plus a round of tests should be performed.

For Node itself, we will adhere to the current LTS version.

@kdahlquist
Copy link
Collaborator

Related to issue #205.

@afiller1
Copy link
Collaborator

afiller1 commented Feb 4, 2019

I cleaned up the package.json and attempted to npm install again to fix up the package-lock.json with the changes, but I had an error in trying that. It says "Unexpected end of JSON input" with a more detailed error message elsewhere on my computer that I could not elicit any significant information from (I can show you at the meeting). In any case, when I npm start, GRNsight still seems to work fine. My excel files still don't download properly, though (see issue #714 ). @kdahlquist @dondi

@jlopez616
Copy link
Collaborator

@afiller1 Was it this same error?

npm ERR! Unexpected end of JSON input while parsing near '...1.0.0",
npm ERR!             
npm ERR! '

npm ERR! A complete log of this run can be found in:
npm ERR!     [USER].npm/_logs/2019-02-04T20_29_05_453Z-debug.log

@afiller1
Copy link
Collaborator

afiller1 commented Feb 4, 2019

@johnllopez616 Yes! And when I looked in the log, I couldn't really tell what the problem was...?

@mihirsamdarshi
Copy link
Collaborator

Can you upload the log @afiller1 please?

@afiller1
Copy link
Collaborator

afiller1 commented Feb 4, 2019

@mihirsamdarshi
Copy link
Collaborator

@afiller1 the very end of the log should give you a clue. It states that there was an unexpected end in the JSON. Scrolling up, you can see that it ends around where xmlbuilder is. I’m on my phone, or I would give you a line number but start at the end of the log for now.

@afiller1
Copy link
Collaborator

afiller1 commented Feb 4, 2019

Ok, I worked on this for a bit and it looks to me like there's probably something of with my Node install and that's where these errors are coming from. The errors point to files on my computer that I can't open, so I'm hoping to sit down with @dondi during his office hours tomorrow and go through how to fix it (classic snag, the downloaded packages are the things causing the problems :P And I'm not too gifted with Node downloading...). Besides that, I made a draft of an updated wiki page for the libraries everyone currently has. I kept it as a draft because I want to verify that we're keeping certain versions of libraries and double check that I have the versions right. I'm attaching the file with my error message and my wiki draft, maybe we can look over them tomorrow.
2019-02-04T22_57_00_703Z-debug.log
library_updates_draft.txt

@dondi
Copy link
Owner Author

dondi commented Feb 5, 2019

@afiller1 Have you tried a complete re-install? This involves completely wiping out the node_modules folder and also package-lock.json. Do those and npm install again, and see if that helps.

Otherwise, yes, let's look in my office sometime.

@kdahlquist
Copy link
Collaborator

Summary of "clean room" reset:

  • Uninstall node
  • Reinstall the newest LTS version of node
  • Delete node_modules folder in GRNsight (if present)
  • Delete package-lock.json
  • Run npm install
  • See what happens

@kdahlquist
Copy link
Collaborator

@johnllopez616 See if the clean room procedure ^^^^ helps you.

@jlopez616
Copy link
Collaborator

jlopez616 commented Feb 11, 2019

Ran the "clean room" reset on my machine, then tried to run npm run start-dev, recieved the following error:

keckadmins-iMac:grnsight keckuser$ npm run start-dev

> [email protected] start-dev /Users/keckuser/Downloads/grnsight/GRNsight
> parallelshell --wait "nodemon web-client/app.js" "nodemon server/app.js" "webpack --watch --mode=development"

child_process.js:422
    throw new ERR_INVALID_ARG_TYPE('options.cwd', 'string', options.cwd);
    ^

TypeError [ERR_INVALID_ARG_TYPE]: The "options.cwd" property must be of type string. Received type function
    at normalizeSpawnArguments (child_process.js:422:11)
    at spawn (child_process.js:532:38)
    at /Users/keckuser/Downloads/grnsight/GRNsight/node_modules/parallelshell/index.js:104:17
    at Array.forEach (<anonymous>)
    at Object.<anonymous> (/Users/keckuser/Downloads/grnsight/GRNsight/node_modules/parallelshell/index.js:100:6)
    at Module._compile (internal/modules/cjs/loader.js:689:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:700:10)
    at Module.load (internal/modules/cjs/loader.js:599:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:538:12)
    at Function.Module._load (internal/modules/cjs/loader.js:530:3)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] start-dev: `parallelshell --wait "nodemon web-client/app.js" "nodemon server/app.js" "webpack --watch --mode=development"`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the [email protected] start-dev script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/keckuser/.npm/_logs/2019-02-11T17_59_13_061Z-debug.log

I will try to reinstall and investigate Webpack, the package that allows us to use 'npm run start-dev' and see where that investigation leads me.

@jlopez616
Copy link
Collaborator

Reinstalling webpack-dev-server resulted in the same error as above. Will investigate further into this error to try and understand what it means.

@jlopez616
Copy link
Collaborator

I possibly found the culprit to our dependencies issues:

Turns out we've been using a package called 'parallelshell' which has caused problems for multiple users when upgraded beyond 3.0.1. Refer to here: darkguy2008/parallelshell#57

Our package.json had the following attribute: "parallelshell": "^3.0.1",, so it was a matter of removing the little arrow, reperforming the "clean state" procedure, and 'npm run start-dev' worked as it should have!

@afiller1
Copy link
Collaborator

afiller1 commented Feb 11, 2019

Ok I have officially updated the Wiki with the correct versions of everything. I have also removed the ^'s and ~'s from package.json.

I got npm install to work (finally) after running the clean room procedure. @kdahlquist you can look over the updated Wiki!

@kdahlquist
Copy link
Collaborator

I added a last modified date to the wiki. @afiller1, can you add a note about using the LTS version of node?

So where in the documentation is there an explanation of what to do when we onboard a new team member and they run into the same kind of problem?

@afiller1
Copy link
Collaborator

@kdahlquist I can make a Troubleshooting page on the Wiki where we can put fix instructions to general problems. And I will add the LTS detail.

@afiller1
Copy link
Collaborator

Mainly worked on re-designing the Wiki this week. Restructured a little, re-labled, added Troubleshooting section and the clean house procedure page under it, in addition to the beta release procedure page under Procedures. Added other details here and there (about LTS, versions, whatnot). I can talk about it more at the meeting, and if anyone has anything else they would like to see on the Wiki, let me know. I still have a few edits to make on the new pages and some questions about various little things...I will bring it all up tomorrow.

@afiller1
Copy link
Collaborator

Finished the two pages I was working on (Updating Beta and NPM Troubleshooting). Wiki can be continually updated whenever we find more buggy things that would be easy to document for future users. Closing the issue now!

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

No branches or pull requests

5 participants