webpacker - how to identify dependencies and eventually apply an update

231 Views Asked by At

An application is not deployable because of node-gyp 3.8.0 which is nto compatible with Python 3.8.10 (default, Mar 13 2023, 10:26:41) installed on the machine. This issue emerged all of a sudden without any modifications to the application's package.json file.

The dependency is generated by node-sass - but what if one does not use sass? Yet webpacker goes ahead and installs it. node-modules/node-sass/package.json gives

{
  "name": "node-sass",
  "version": "4.14.1",

node-modules/.yarn-integrity instead refers to
"node-sass@^4.13.0": "https://registry.yarnpkg.com/node-sass/-/node-sass-4.14.1.tgz#99c87ec2efb7047ed638fb4c9db7f3a42e2217b5", possibly because node_modules/@rails/webpacker/package.json has

{
  "name": "@rails/webpacker",
  "version": "4.3.0",
   [...] },
  "dependencies": {
[...]
    "node-sass": "^4.13.0",

While the repository for node-gyp states

Multiple target versions of Node.js are supported (i.e. 0.8, ..., 4, 5, 6, etc.),  
regardless of what version of Node.js is actually installed on your system  
(node-gyp downloads the necessary development files or headers for the target version).

This is not of much use given webpacker in the middle (I believe).

a) how can one determine what or which dependency invokes node-sass (and thus determine whether the upstream package needs updating) ?
b) where can I find relative info on the version to install for the version of python ?
c) how should the package.json file be modified?
d) better yet, if sass is not the be used, how can webpacker ignore it?

0

There are 0 best solutions below