# fun with python 2.7



## PMc (Dec 6, 2020)

Something I recently figured:

Ruby-on-Rails does require something called webpacker, which again does require node-sass, currently version 4.14.
That one depends on node, and is provided as a precompiled binary, respective of the node version. For FreeBSD, node-14 is not supported, only node-12 and 13. Node-13 is not available on FreeBSD, and node-12 depends on python 2.7.

If there is no binary available, node-sass will automatically build locally (lengthening the deploy time) - supported or not. For this it requires node-gyp, in the version 3.8, and this again requires python 2.7.

There are newer node-gyp probably not requiring python-2, and there is a node-sass 5.0 that does use these (node-14 and 15 also not supported on FreeBSD). Now lets see how long it will take until the whole daisy-chain will establish that. I might suppose, longer than december, because we already have december.

If this may finally come to some kind of fruition, when are people expected to do the testing of their applications with new software versions? At christmas?

(I'm not worried, but I admit I was expecting quite this since the bold idea of dumping python 2.7 came up. And I suppose, some people will notice the issue only when they fail to reinstall python2.7, and then in turn fail to deploy - or vice versa - as the whole thing is nicely hidden in automagical stuff. Nevertheless, since november, some people seem to actually _recognize_ there might be an issue: https://github.com/rails/webpacker/pull/2716#issuecomment-722062481)


----------



## dch (Feb 1, 2021)

did you find a solution for this?


----------



## dch (Feb 1, 2021)

dch said:


> did you find a solution for this?


in the end, all we needed was:


```
diff --git assets/package.json assets/package.json
index 8f7026f..72ec477 100644
--- assets/package.json
+++ assets/package.json
@@ -19,7 +19,7 @@
     "copy-webpack-plugin": "^5.1.1",
     "css-loader": "^3.4.2",
     "sass-loader": "^8.0.2",
-    "node-sass": "^4.13.1",
+    "sass": "^1.26.10",
     "mini-css-extract-plugin": "^0.9.0",
     "optimize-css-assets-webpack-plugin": "^5.0.1",
     "terser-webpack-plugin": "^2.3.2",
```


----------



## PMc (Feb 1, 2021)

dch said:


> did you find a solution for this?


I didn't yet bother to search one, as python27 did still build with ports branch 2021Q1.
So thanks a lot for posting your solution - while I do usually find my way thru ruby stuff, I am not so deep into JS that I would dare to easily modify those dependency trees.


----------

