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.

Package requires Node version <6.0.0

See original GitHub issue

Running yarn using the current Node LTS 6.9.1 yields the following:

error Error running install script for optional dependency: "/AlpineSkiHouse/src/AlpineSkiHouse.Web/node_modules/optipng-bin: Command failed.
Exit code: 1
Command: sh
Arguments: -c node index.js
Directory: /AlpineSkiHouse/src/AlpineSkiHouse.Web/node_modules/optipng-bin
Output:
path.js:7
    throw new TypeError('Path must be a string. Received ' + inspect(path));

TypeError: Path must be a string. Received { url: 'https://raw.github.com/imagemin/optipng-bin/v0.3.11/vendor/osx/optipng',
  name: 'optipng',
  os: 'darwin' }
    at assertPath (path.js:7:11)
    at Object.basename (path.js:1355:5)
    at /AlpineSkiHouse/src/AlpineSkiHouse.Web/node_modules/download/index.js:35:43
    at each (/AlpineSkiHouse/src/AlpineSkiHouse.Web/node_modules/each-async/each-async.js:63:4)
    at module.exports (/AlpineSkiHouse/src/AlpineSkiHouse.Web/node_modules/download/index.js:33:5)
    at /AlpineSkiHouse/src/AlpineSkiHouse.Web/node_modules/bin-wrapper/index.js:108:20
    at /AlpineSkiHouse/src/AlpineSkiHouse.Web/node_modules/bin-wrapper/index.js:141:24
    at /AlpineSkiHouse/src/AlpineSkiHouse.Web/node_modules/

This is due to an incompatibility between imagemin and Node versions >6 imagemin/imagemin#216

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
stimmscommented, Dec 4, 2016

As a quick fix you can change line 35 of AlpineSkiHouse\src\AlpineSkiHouse.Web\node_modules\download\index.js to

        var target = path.join(dest, path.basename(url.url || url));

I guess we’ll submit a patch to the upstream project.

0reactions
kirill-d-lappocommented, Sep 19, 2018

well, it was tricky what I did :

  1. Installed node.js version 4.9.1
  2. opened command line, moved to src/AlpineSkiHouse.Web directory
  3. executed the next commands
# install packages globally
npm install yarn -g
npm install bower -g
npm install  jspm -g
npm install gulp -g

# following instructions from readme
yarn install
bower install
jspm install # this one may fail with time out but just try again
gulp
Read more comments on GitHub >

github_iconTop Results From Across the Web

How can I specify the required Node.js version in package. ...
I have a Node.js project that requires Node version 12 or higher. Is there a way to specify this in the packages.json file,...
Read more >
Incompatible with versions of NodeJS under 6.0.0 #20425
I'm opening this issue because: npm is crashing. What's going wrong? Apparently, the 6.0.0 version of npm is incompatible with NodeJS under ...
Read more >
Node v6.0.0 (Current)
Node.js® is a JavaScript runtime built on Chrome's V8 JavaScript engine.
Read more >
6.0.0
a package manager for JavaScript. Latest version: 9.8.1, last published: a month ago. Start using npm in your project by running `npm i...
Read more >
Prevent npm install for not supported Node.js versions
Use a local npm configuration to prevent users from installing your module/project with an unsupported Node.js version.
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