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.

Lighter pakage.json dependencies (remove puppeteer by default)

See original GitHub issue
Description of the problem

Some of the developers cloning three.js repo without the intention to contribute. This is happening because they want to make tree-shake library or modify core for your own purposes in projects.

The idea is to introduce to two additional commands and suggest in console to install puppeteer only those developer who want to take screenshots in PRs.

"make-install": "npm i -D puppeteer@2.1.1 pngjs pixelmatch image-output serve-handler failonlyreporter",
"make-clean": "npm un puppeteer pngjs pixelmatch image-output serve-handler failonlyreporter",

But by doing so we modifying package.json after npm run make-install and facing another problem: we need to say to contributors not to add package.json or package-lock.json, which is relatively easy but little bit uncomfortable. I wonder if exist any safe way to keep package.json the same after install.

This idea is consistent with #19321 #19326

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

3reactions
donmccurdycommented, May 11, 2020

An option would be to put a package.json for the screenshot tool into a subdirectory. Users who need to run it can run npm install in that directory; others would not. Dependencies from the parent folder are automatically available in the subdirectory.

1reaction
munrocketcommented, May 16, 2020

Solved, sanks.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to uninstall Puppeteer npm - Stack Overflow
If npm uninstall puppeteer does not work, you can delete the node_modules folder and run npm install again. This will reinstall every module ......
Read more >
ERROR Run npm install to download the correct Chromium ...
I copy/pasted the example configuration here: https://www.npmjs.com/package/puppeteer Then removed and reinstalled npm.
Read more >
Uninstalling packages and dependencies - npm Docs
This uninstalls a package, completely removing everything npm installed on its behalf. It also removes the package from the dependencies, devDependencies, ...
Read more >
puppeteer-extra - npm Package Health Analysis - Snyk
All security vulnerabilities belong to production dependencies of direct and indirect packages. ... We found a way for you to contribute to the...
Read more >
Remove explicit puppeteer dependency from package.json
It's easier for maintainability if we don't have to update versions in two different places, so I propose removing puppeteer from package.json altogether....
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