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 PhantomJS dependency #300

Closed
zramsay opened this issue Jan 24, 2023 · 7 comments
Closed

Remove PhantomJS dependency #300

zramsay opened this issue Jan 24, 2023 · 7 comments
Assignees

Comments

@zramsay
Copy link
Contributor

zramsay commented Jan 24, 2023

Running yarn && yarn build with a fresh install from root of repo, on Linux, I get this error:

[4/4] Building fresh packages...
[-/19] ⢀ waiting...
[-/19] ⢀ waiting...
[-/19] ⢀ waiting...
[16/19] ⢀ phantomjs-prebuilt
error /root/watcher-ts/node_modules/phantomjs-prebuilt: Command failed.
Exit code: 1
Command: node install.js
Arguments: 
Directory: /root/watcher-ts/node_modules/phantomjs-prebuilt
Output:
PhantomJS not found on PATH
Downloading https://github.com/Medium/phantomjs/releases/download/v2.1.1/phantomjs-2.1.1-linux-x86_64.tar.bz2
Saving to /tmp/phantomjs/phantomjs-2.1.1-linux-x86_64.tar.bz2
Receiving...

Received 22866K total.
Extracting tar contents (via spawned process)
Error extracting archive
Phantom installation failed Error: Command failed: tar jxf /tmp/phantomjs/phantomjs-2.1.1-linux-x86_64.tar.bz2
tar (child): bzip2: Cannot exec: No such file or directory
tar (child): Error is not recoverable: exiting now
tar: Child returned status 2
tar: Error is not recoverable: exiting now

node version: 18.7.0
yarn version: 1.22.19

@zramsay
Copy link
Contributor Author

zramsay commented Jan 24, 2023

duh: Medium/phantomjs#630
solution: install bzip2

@dboreham
Copy link

Nononono.....we shouldn't have phantomjs at all.

Here's where it came from:

$ yarn why phantomjs-prebuilt
yarn why v1.22.19
[1/4] Why do we have the module "phantomjs-prebuilt"...?
[2/4] Initialising dependency graph...
[3/4] Finding dependency...
[4/4] Calculating file sizes...
=> Found "[email protected]"
info Reasons this module exists
   - "_project_#@cerc-io#react-peer#nwb" depends on it
   - Hoisted from "_project_#@cerc-io#react-peer#nwb#phantomjs-prebuilt"
   - Hoisted from "_project_#@cerc-io#react-peer#nwb#karma-phantomjs-launcher#phantomjs-prebuilt"
info Disk size without dependencies: "65.52MB"
info Disk size with unique dependencies: "67.38MB"
info Disk size with transitive dependencies: "75.13MB"
info Number of shared dependencies: 60
Done in 1.51s.

@dboreham
Copy link

It came from here : https://github.com/cerc-io/watcher-ts/blob/main/packages/react-peer/package.json#L27
This package references Phantom. It's a dev dependency. Seems like a bad idea?

@zramsay
Copy link
Contributor Author

zramsay commented Jan 24, 2023

yeah all these new peer packages increased the time to run yarn && yarn build by an order of magnitude

@dboreham
Copy link

Seems to be a known issue: insin/nwb#577

@zramsay zramsay changed the title PhantomJS is a new dependency that tries and fails to install itself Remove PhantomJS dependency Jan 24, 2023
@ashwinphatak
Copy link
Contributor

A couple of options to address this:

  • Find another tool to replace nwb
  • Move the react-peer package into its own repo

@zramsay
Copy link
Contributor Author

zramsay commented Jan 25, 2023

+1 for moving the peer packages to their own repo.

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

No branches or pull requests

4 participants