question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Root package.json is possibly useless

See original GitHub issue

Following #94, it looks like I introduced the root package.json file as a “fix” to some GitHub security notification in #20. However, two things strike me as strange:

  • Instead of bumping the versions in frontend/package.json, I created a whole new one, which doesn’t really make sense;
  • I bumped the lodash version even though lodash is not listed in the project’s frontend dependencies. Moreover, @types/lodash is listed as DevDependencies although lodash isn’t.

I guess I was pretty tired when I made those changes, but they were harmless so I consider myself lucky.

A suggested course of action:

  • Bump react-app-rewire-webpack-bundle-analyzer in frontend/package.json to 1.1.0 (to fix the initial security issue) and run the yarn analyze command in frontend to see if it’s still working correctly;
  • Remove the @types/lodash dev dependency and run yarn start to see if no TS errors appear.

This would have the following benefits:

  • Fix the security issue in react-app-rewire-webpack-bundle-analyzer
  • Clean up the repository
  • Ease up the setup of the Falco project locally as, for now, people may be tempted to run yarn && yarn start in the root dir instead of frontend/

This PR is up for grabs if anyone’s interested (maybe @toqueteos?)!

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:10 (10 by maintainers)

github_iconTop GitHub Comments

1reaction
phackscommented, Jan 3, 2020

@toqueteos Sorry to hear that, thanks for giving it a go! I’ll try on my end to fix this and hope that I’ll be luckier.

1reaction
phackscommented, Dec 17, 2019

Oooh, good catch! Here’s my output of yarn why lodash:

➜  frontend git:(master) yarn why lodash
yarn why v1.17.3
[1/4] 🤔  Why do we have the module "lodash"...?
[2/4] 🚚  Initialising dependency graph...
[3/4] 🔍  Finding dependency...
[4/4] 🚡  Calculating file sizes...
=> Found "lodash@4.17.11"

Hope that helps!

Read more comments on GitHub >

github_iconTop Results From Across the Web

'package.json' is not under 'rootDir' - Stack Overflow
This is possible, and it turns out, not hard. The reason the solution is not obvious is because typescript relies on the rootDir...
Read more >
[Feature Request] Package.json Root / Base Directory #21787
It would be nice if there was a package.json property that can be used to specify the root folder that module resolution should...
Read more >
package.json Quick Start Guide | phoenixNAP KB
Learn how the package.json file lets you automatically manage various Node.js package metadata, such as project dependencies in this guide.
Read more >
npm-pkg
A command that automates the management of package.json files. npm pkg provide 3 different sub commands that allow you to modify or retrieve...
Read more >
You should never ever run directly against Node.js in ...
We would run this with a start script in the package.json file. "scripts": { "dev": "npx supervisor index.js", "start": "node index ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found