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.

`yarn` installation doesn't work :(

See original GitHub issue

Hello 😃

I am using this awesome loader but there seems to be a problem if installed with yarn. Out of the blue i get this error when building for production (basically if i use it)

ERROR in ./[...]/image.png
Module build failed: Error: spawn [...]/project-name/node_modules/pngquant-bin/vendor/pngquant ENOENT
    at exports._errnoException (util.js:1022:11)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:193:32)
    at onErrorNT (internal/child_process.js:359:16)
    at _combinedTickCallback (internal/process/next_tick.js:74:11)
    at process._tickCallback (internal/process/next_tick.js:98:9)

If i install the dependencies with npm, everything works as intended. What am I doing wrong?

Thank you!

LE:

i’m using webpack2 though

this happens only with yarn 0.17 version 0.16.1 works as intended 😃

this is from the config

{
        test: /.*\.(gif|png|jpe?g|svg)$/i,
        use: [
          {
            loader: 'file-loader',
            options: {
              name: '[path][hash].[ext]'

            }
          },
          {
            loader: 'image-webpack-loader',
            options: {
              progressive: true,
              optimizationLevel: 7,
              interlaced: false,
              pngquant: {
                quality: '65-90',
                speed: 4
              }
            }
          }

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:2
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
adrienharnaycommented, Jun 12, 2017

Hi,

Currently having exactly the same problem on Circle-ci (Alpine linux setup), with Yarn 0.24.6.

0reactions
robmccardlecommented, Sep 27, 2017

Experienced this on Debian when inside Docker. Ditching yarn and switching to npm solved it for me.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Yarn install command error No such file or directory: 'install'
The reason for the No such file or directory error from yarn install is that you are not using the "correct" Yarn: the...
Read more >
'Yarn' is not recognized as an internal or external command
Open your terminal and install yarn globally by running the following command. ... If that didn't help, run the following command:.
Read more >
npm install yarn -g not working · Issue #599 - GitHub
Trying to install it as it says in the intro post and I'm running into an issue with the bin not being linked....
Read more >
Installation | Yarn
Before you start using Yarn, you'll first need to install it on your system. There are many different ways to install Yarn, but...
Read more >
4 Methods for How to Install Yarn on Windows Server
To confirm Yarn installed correctly, check the version in the Windows Command Prompt (CMD). A quick way to access it is by the...
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