为什么我不能叫毛线,毛线安装问题

问题描述 投票:0回答:1

您能帮我吗?我不明白为什么我打电话给-yarn时会发生这种情况:不支持节点版本0.10.40,请使用Node.js 4.0或更高版本。我该如何解决。我使用最新版本的Node 12.16.3和yarn 1.22.4。也许是因为,当我打电话给-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 [email protected]: The platform "win32" is incompatible with this module.
info "[email protected]" is an optional dependency and failed compatibility check. Excluding it from installation.
[3/4] Linking dependencies...
warning " > [email protected]" 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 [email protected]
gyp info using [email protected] | 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.
windows-10 yarn yarnpkg
1个回答
0
投票

似乎您缺少正确的Webpack版本。可以通过以下方式安装:

npm install webpack

npm install webpack@^4.0.0

您还需要可以从https://www.python.org/downloads/安装的python2

similar problem that was resolved

注意:不再支持python2,所以我想知道是否需要更新其他任何内容。

© www.soinside.com 2019 - 2024. All rights reserved.