AspNetMonsters / AlpineSkiHouse

AlpineSkiHouse
MIT License
140 stars 96 forks source link

Package requires Node version <6.0.0 #101

Open mhdubose opened 7 years ago

mhdubose commented 7 years ago

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

mhdubose commented 7 years ago

Consider specifying the expected/required node version in the readme, or removing the dependency

mhdubose commented 7 years ago

For clarification, this also causes the gulp "images" task to fail

dpaquette commented 7 years ago

Thanks! I will take a look at this today.

stimms commented 7 years ago

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.

kirill-d-lappo commented 6 years ago

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