Try removing node-sass from from your package.json and also rename node_modules folder then run npm install.
err occurs on npm install laravel 5.7
I m on an project of an old repository, i tryed to install anything composer works right now and is stable but their seems to be a problem with node modules, espically node-sass i think. I deleted the package-lock already, but if i do that it installs anything but then errors occur with npm run dev etc. so i started at the beginning. i already deinstalled node sass reinstalled it, installed only sasss nothing seems to work. i tryed to single update laravel-mix but then it crashes the whole system. My node version is v14.18.2 and npm is v8.2.0. the insatlled node-sass version is v4.9.4 in laravel mix v2.1.14. This is the whole error message i get ---
npm ERR! code 1
npm ERR! path /var/www/html/node_modules/node-sass
npm ERR! command failed
npm ERR! command sh -c node scripts/build.js
npm ERR! Building: /usr/bin/node /var/www/html/node_modules/node-gyp/bin/node-gyp.js rebuild --verbose --libsass_ext= --libsass_cflags= --libsass_ldflags= --libsass_library=
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp verb cli [
npm ERR! gyp verb cli '/usr/bin/node',
npm ERR! gyp verb cli '/var/www/html/node_modules/node-gyp/bin/node-gyp.js',
npm ERR! gyp verb cli 'rebuild',
npm ERR! gyp verb cli '--verbose',
npm ERR! gyp verb cli '--libsass_ext=',
npm ERR! gyp verb cli '--libsass_cflags=',
npm ERR! gyp verb cli '--libsass_ldflags=',
npm ERR! gyp verb cli '--libsass_library='
npm ERR! gyp verb cli ]
npm ERR! gyp info using [email protected]
npm ERR! gyp info using [email protected] | linux | x64
npm ERR! gyp verb command rebuild []
npm ERR! gyp verb command clean []
npm ERR! gyp verb clean removing "build" directory
npm ERR! gyp verb command configure []
npm ERR! gyp verb check python checking for Python executable "python2" in the PATH
npm ERR! gyp verb `which` failed Error: not found: python2
npm ERR! gyp verb `which` failed at getNotFoundError (/var/www/html/node_modules/which/which.js:13:12)
npm ERR! gyp verb `which` failed at F (/var/www/html/node_modules/which/which.js:68:19)
npm ERR! gyp verb `which` failed at E (/var/www/html/node_modules/which/which.js:80:29)
npm ERR! gyp verb `which` failed at /var/www/html/node_modules/which/which.js:89:16
npm ERR! gyp verb `which` failed at /var/www/html/node_modules/isexe/index.js:42:5
npm ERR! gyp verb `which` failed at /var/www/html/node_modules/isexe/mode.js:8:5
npm ERR! gyp verb `which` failed at FSReqCallback.oncomplete (fs.js:191:21)
npm ERR! gyp verb `which` failed python2 Error: not found: python2
npm ERR! gyp verb `which` failed at getNotFoundError (/var/www/html/node_modules/which/which.js:13:12)
npm ERR! gyp verb `which` failed at F (/var/www/html/node_modules/which/which.js:68:19)
npm ERR! gyp verb `which` failed at E (/var/www/html/node_modules/which/which.js:80:29)
npm ERR! gyp verb `which` failed at /var/www/html/node_modules/which/which.js:89:16
npm ERR! gyp verb `which` failed at /var/www/html/node_modules/isexe/index.js:42:5
npm ERR! gyp verb `which` failed at /var/www/html/node_modules/isexe/mode.js:8:5
npm ERR! gyp verb `which` failed at FSReqCallback.oncomplete (fs.js:191:21) {
npm ERR! gyp verb `which` failed code: 'ENOENT'
npm ERR! gyp verb `which` failed }
npm ERR! gyp verb check python checking for Python executable "python" in the PATH
npm ERR! gyp verb `which` failed Error: not found: python
npm ERR! gyp verb `which` failed at getNotFoundError (/var/www/html/node_modules/which/which.js:13:12)
npm ERR! gyp verb `which` failed at F (/var/www/html/node_modules/which/which.js:68:19)
npm ERR! gyp verb `which` failed at E (/var/www/html/node_modules/which/which.js:80:29)
npm ERR! gyp verb `which` failed at /var/www/html/node_modules/which/which.js:89:16
npm ERR! gyp verb `which` failed at /var/www/html/node_modules/isexe/index.js:42:5
npm ERR! gyp verb `which` failed at /var/www/html/node_modules/isexe/mode.js:8:5
npm ERR! gyp verb `which` failed at FSReqCallback.oncomplete (fs.js:191:21)
npm ERR! gyp verb `which` failed python Error: not found: python
npm ERR! gyp verb `which` failed at getNotFoundError (/var/www/html/node_modules/which/which.js:13:12)
npm ERR! gyp verb `which` failed at F (/var/www/html/node_modules/which/which.js:68:19)
npm ERR! gyp verb `which` failed at E (/var/www/html/node_modules/which/which.js:80:29)
npm ERR! gyp verb `which` failed at /var/www/html/node_modules/which/which.js:89:16
npm ERR! gyp verb `which` failed at /var/www/html/node_modules/isexe/index.js:42:5
npm ERR! gyp verb `which` failed at /var/www/html/node_modules/isexe/mode.js:8:5
npm ERR! gyp verb `which` failed at FSReqCallback.oncomplete (fs.js:191:21) {
npm ERR! gyp verb `which` failed code: 'ENOENT'
npm ERR! gyp verb `which` failed }
npm ERR! gyp ERR! configure error
npm ERR! gyp ERR! stack Error: Can't find Python executable "python", you can set the PYTHON env variable.
npm ERR! gyp ERR! stack at PythonFinder.failNoPython (/var/www/html/node_modules/node-gyp/lib/configure.js:484:19)
npm ERR! gyp ERR! stack at PythonFinder.<anonymous> (/var/www/html/node_modules/node-gyp/lib/configure.js:406:16)
npm ERR! gyp ERR! stack at F (/var/www/html/node_modules/which/which.js:68:16)
npm ERR! gyp ERR! stack at E (/var/www/html/node_modules/which/which.js:80:29)
npm ERR! gyp ERR! stack at /var/www/html/node_modules/which/which.js:89:16
npm ERR! gyp ERR! stack at /var/www/html/node_modules/isexe/index.js:42:5
npm ERR! gyp ERR! stack at /var/www/html/node_modules/isexe/mode.js:8:5
npm ERR! gyp ERR! stack at FSReqCallback.oncomplete (fs.js:191:21)
npm ERR! gyp ERR! System Linux 5.4.0-91-generic
npm ERR! gyp ERR! command "/usr/bin/node" "/var/www/html/node_modules/node-gyp/bin/node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library="
npm ERR! gyp ERR! cwd /var/www/html/node_modules/node-sass
npm ERR! gyp ERR! node -v v14.18.2
npm ERR! gyp ERR! node-gyp -v v3.8.0
npm ERR! gyp ERR! not ok
npm ERR! Build failed with error code: 1
npm ERR! A complete log of this run can be found in:
npm ERR! /home/vagrant/.npm/_logs/2022-03-23T12_48_14_898Z-debug-0.log
Package.json ↓
{
"private": true,
"scripts": {
"dev": "npm run development",
"development": "cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js",
"watch": "npm run development -- --watch",
"watch-poll": "npm run watch -- --watch-poll",
"hot": "cross-env NODE_ENV=development node_modules/webpack-dev-server/bin/webpack-dev-server.js --inline --hot --config=node_modules/laravel-mix/setup/webpack.config.js",
"prod": "npm run production",
"production": "cross-env NODE_ENV=production node_modules/webpack/bin/webpack.js --no-progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js"
},
"devDependencies": {
"bootstrap": "~4.1.3",
"cross-env": "~5.2.0",
"jquery": "~3.3.1",
"laravel-mix": "~2.1.14",
"lodash": "~4.17.11",
"popper.js": "~1.14.4",
"@fortawesome/fontawesome-free": "^5.4.2"
},
"dependencies": {
"morris.js06": "^0.6.3",
"raphael": "^2.2.7"
}
}
if anybody has an idea what i can do, responses will be great!
Please or to participate in this conversation.