node-sass-middleware icon indicating copy to clipboard operation
node-sass-middleware copied to clipboard

Can't install node-sass-middleware with latest node LTS (16.16.0)

Open kelmore5 opened this issue 3 years ago • 0 comments
trafficstars

This might be a yarn error, but I still think it's worth looking into...

Today when I installed node-sass-middleware on node's latest LTS (16.16.0), I got back a build error from node-gyp. This happened because the latest version of node-sass (7.0+) is only supported on future versions of Node (17+), and node-sass is listed as a dependency for this project's "package.json" files.

I tried to install an earlier version of node-sass-middleware to no avail. Basically every time node-sass-middleware tried to get built, it would try to install the latest version of node-sass, and then crash.

I think the dependencies in the "package.json" files for the older versions of node-sass-middleware need to be updated. Specifically for versions 0.11.0 and (probably) below. It'd be great if instead of listing the node-sass dependency as:

"dependencies": { ..., "node-sass": "^4.13.1" }

it was listed as the latest version available to that package at the time, e.g:

"dependencies": { ..., "node-sass": "<7.0.0" }

or something along those lines.

Because right now, I believe this package is having build problems on LTS node. At least with yarn users. Let me know if you want me to post the full build error log.

~~PS: Anyone who sees this - I fixed the bug by running build, letting it crash, editing the "package.json" file to the above ^ version for node-sass, and then re-running~~

Edit: Forgot code blocks Edit 2: Still having this issue and not sure what the fix should be

kelmore5 avatar Jul 19 '22 03:07 kelmore5