Code Monkey home page Code Monkey logo

Comments (4)

Redemption198 avatar Redemption198 commented on August 9, 2024 1

Hey @Redemption198

Thanks for taking the time to make this issue and looking into it. I've identified the issue and pushed up a fix in 0.3.22.

Please let me know if you have anymore issues :)

Thank you for the quick fix, it works perfectly now! And also for creating this awesome tool!

Would it be possible to only throw a warning when the CHROME_PATH variable isn't set? Maybe displaying a message saying that unlighthouse requires Chrome to work and is disabled until installed.

from unlighthouse.

harlan-zw avatar harlan-zw commented on August 9, 2024

Hey @Redemption198

Thanks for taking the time to make this issue and looking into it. I've identified the issue and pushed up a fix in 0.3.22.

Please let me know if you have anymore issues :)

from unlighthouse.

harlan-zw avatar harlan-zw commented on August 9, 2024

There should already be handling for this case, see: https://github.com/harlan-zw/unlighthouse/blob/main/packages/core/src/resolveConfig.ts#L90

It uses https://github.com/GoogleChrome/chrome-launcher first, which uses the CHROME_PATH variable I guess? If that fails, it tries to find a puppeteer dependency, which is recommended in the docs to install if you don't have chrome. Finally it should throw an error

     logger.fatal('Failed to find a chrome / chromium binary to run. Add the puppeteer dependency to your project to resolve.', e)
     logger.info('Run the following: \`npm install -g puppeteer\`')
     process.exit(0)

Is there a reliable way to bypass this?

from unlighthouse.

Redemption198 avatar Redemption198 commented on August 9, 2024

The CHROME_PATH error was: ERROR Cannot start nuxt: The CHROME_PATH environment variable must be set to a Chrome/Chromium executable no older than Chrome stable.

I was getting the error because I'm on a fresh install of Linux and didn't have any chrome/chromium browser installed, I tried installing ungoogled chromium but it didn't recognize it, while installing regular chrome from the rpm repository works fine.

Now I'm facing new errors, I had to force a fresh installation of Nuxt due to the RC0 release.
If I use yarn, unlighthouse can't find the following packages: @unlighthouse/core, @unlighthouse/webpack and @unlighthouse/vite

(Installing each package manually "fixes" the issue)

This is inside node_modules
picture

If instead I use npm I get this error Unsupported URL Type "link:": link:../../packages/core

from unlighthouse.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.