arielweinberger / task-management-frontend

Front-end application for the Task Management application (NestJS Zero to Hero course)
172 stars 511 forks source link

python 2 required for `yarn install` 🙁 #29

Open llaenowyd opened 3 years ago

llaenowyd commented 3 years ago

First thanks for the great Udemy course, really enjoying it and learning a lot.

Second, I made a solution for myself and happy to share it, if it's of any use, I'll give some details below.

error D:\src\task-management-frontend\node_modules\node-sass: Command failed.
Exit code: 1
Command: node scripts/build.js
Arguments:
Directory: D:\src\task-management-frontend\node_modules\node-sass
Output:
Building: d:\bin\nodejs\node.exe D:\src\task-management-frontend\node_modules\node-gyp\bin\node-gyp.js rebuild --verbose --libsass_ext= --libsass_cflags= --libsass_ldflags= --libsass_library=
gyp info it worked if it ends with ok
gyp verb cli [
gyp verb cli   'd:\\bin\\nodejs\\node.exe',
gyp verb cli   'D:\\src\\task-management-frontend\\node_modules\\node-gyp\\bin\\node-gyp.js',
gyp verb cli   'rebuild',
gyp verb cli   '--verbose',
gyp verb cli   '--libsass_ext=',
gyp verb cli   '--libsass_cflags=',
gyp verb cli   '--libsass_ldflags=',
gyp verb cli   '--libsass_library='
gyp verb cli ]
gyp info using node-gyp@3.8.0
gyp info using node@16.2.0 | win32 | x64
gyp verb command rebuild []
gyp verb command clean []
gyp verb clean removing "build" directory
gyp verb command configure []
gyp verb check python checking for Python executable "python2" in the PATH
gyp verb `which` failed Error: not found: python2

I think python-2 is too far gone, it comes by default on OSX so maybe people never notice, but I didn't want to install such a big, questionable dependency to run this example.

Anyhow, since I do frontends at my day job I didn't feel it was anyone else's problem to solve for me - so here is my solution.

It follows your code as much as I could manage while working quickly and using the NextJS platform/generator. So it may be interesting since you can compare many components side-by-side. Please feel free to use it in any way you want, if you want.

Thanks again for creating the course!

trevorsmeaton commented 2 years ago

And thank you for taking the time to write an alternative front end! I can't get Ariel's to work, but yours worked first time

:)

skoblenick commented 2 years ago

If you need to work around with the existing source repos and course, update your package.json to use node-sass version 7.0.1 and consequently react-scripts to 5.0.1 as it has a dependency on sass-loader. This also has the result of reducing the number of issues reported by npm audit.

victor-letunovsky commented 4 months ago

I had the same issue. My node version is 20. What helped in my case is updating versions in package.json:

and installing one dev dependency: npm install --save-dev "@babel/plugin-proposal-private-property-in-object"