1

can you please help me. I dont understand why it happens when i call -yarn i get this: Node version 0.10.40 is not supported, please use Node.js 4.0 or higher. How can i fix it. I use the latest version of Node 12.16.3 and yarn 1.22.4. And maybe beacuse of that i get a lot of errors when i call -yarn install.

yarn install v1.22.4
warning package-lock.json found. Your project contains lock files generated by tools other than Yarn. It is advised not to mix package managers in order to avoid resolution inconsistenci
es caused by unsynchronized lock files. To clear this warning, remove package-lock.json.
[1/4] Resolving packages...
[2/4] Fetching packages...
info fsevents@1.2.7: The platform "win32" is incompatible with this module.
info "fsevents@1.2.7" is an optional dependency and failed compatibility check. Excluding it from installation.
[3/4] Linking dependencies...
warning " > sass-loader@7.3.1" has unmet peer dependency "webpack@^3.0.0 || ^4.0.0".
[4/4] Building fresh packages...
error ***\node-sass: Command failed.
Exit code: 1
Command: node scripts/build.js
Arguments:
Directory: ***\node-sass
Output:
Building: C:\Program Files\nodejs\node.exe ***\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   'C:\\Program Files\\nodejs\\node.exe',
gyp verb cli   '***\\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@12.16.3 | 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
gyp verb `which` failed     at getNotFoundError (***\which\which.js:13:12)
gyp verb `which` failed     at FSReqCallback.oncomplete (fs.js:167:21)
gyp verb `which` failed  python2 Error: not found: python2
gyp verb `which` failed     at getNotFoundError ***\which\which.js:13:12)
gyp verb `which` failed     at ***isexe\index.js:42:5
gyp verb `which` failed     at ***\isexe\windows.js:36:5
gyp verb `which` failed     at FSReqCallback.oncomplete (fs.js:167:21) {
gyp verb `which` failed   code: 'ENOENT'
gyp verb `which` failed }
gyp verb check python checking for Python executable "python" in the PATH
gyp verb `which` succeeded python C:\Users\***\AppData\Local\Programs\Python\Python38-32\python.EXE
gyp ERR! configure error
gyp ERR! stack Error: Command failed: C:\Users\***\AppData\Local\Programs\Python\Python38-32\python.EXE -c import sys; print "%s.%s.%s" % sys.version_info[:3];
gyp ERR! stack   File "<string>", line 1
gyp ERR! stack     import sys; print "%s.%s.%s" % sys.version_info[:3];
gyp ERR! stack                       ^
gyp ERR! stack SyntaxError: invalid syntax
gyp ERR! stack
gyp ERR! stack     at ChildProcess.exithandler (child_process.js:303:12)
gyp ERR! stack     at ChildProcess.emit (events.js:310:20)
gyp ERR! stack     at maybeClose (internal/child_process.js:1021:16)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5)
gyp ERR! System Windows_NT 10.0.18362
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "***node-gyp\\bin\\node-gyp.js" "rebuild" "--verbose" "--libsass_ext=
" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library="
gyp ERR! ***node_modules\node-sass
gyp ERR! node -v v12.16.3
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
Build failed with error code: 1
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
RobC
  • 22,977
  • 20
  • 73
  • 80
frozenme
  • 19
  • 1
  • 3

1 Answers1

0

It looks like you're missing the correct webpack version. Which can be installed with:

npm install webpack

or

npm install webpack@^4.0.0

You also need python2 which you can install from https://www.python.org/downloads/

similar problem that was resolved

note: python2 is not supported anymore more so i'm wondering if you need to update anything else.

W-B
  • 850
  • 5
  • 16
  • @frozenme It might help to delete the node_modules folder and follow up with running ```shell npm install``` if this works please let me know so I can update. – W-B May 18 '20 at 16:36
  • hey, thank you for your advice, i had problems because i used wrong version of yarn and npm @CWB – frozenme May 28 '20 at 15:12
  • @frozenme I'm glad you were able to figure it out. If possible, Can you post your solution as an answer? That way anyone who has the same problem as you can benefit. You can also accept your answer. – W-B May 29 '20 at 16:06