谁能帮助我这个纱线启动和纱线错误(未能编译)



Yarn start:

Failed to compile.
./src/index.scss (./node_modules/css-loader/dist/cjs.js??ref--5-oneOf-6-1!./node_modules/postcss-loader/src??postcss!./node_modules/resolve-url-loader??ref--5-oneOf-6-3!./node_modules/sass-loader/dist/cjs.js??ref--5-oneOf-6-4!./src/index.scss)
Error: Node Sass does not yet support your current environment: Windows 64-bit with Unsupported runtime (93)
For more information on which environments are supported please see:
https://github.com/sass/node-sass/releases/tag/v4.14.1

纱:

error E:ProgramingWeb Developmentpair-programming-frontend-react-maintasksfe-pair-programmingnode_modulesnode-sass: Command failed.
Exit code: 1
Command: node scripts/build.js
Arguments: 
Directory: E:ProgramingWeb Developmentpair-programming-frontend-react-maintasksfe-pair-programmingnode_modulesnode-sass
Output:
Building: C:Program Filesnodejsnode.exe E:ProgramingWeb Developmentpair-programming-frontend-react-maintasksfe-pair-programmingnode_modulesnode-gypbinnode-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   'E:\Programing\Web Development\pair-programming-frontend-react-main\tasks\fe-pair-programming\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.15.1 | 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 (E:ProgramingWeb Developmentpair-programming-frontend-react-maintasksfe-pair-programmingnode_moduleswhichwhich.js:13:12)
gyp verb `which` failed     at F (E:ProgramingWeb Developmentpair-programming-frontend-react-maintasksfe-pair-programmingnode_moduleswhichwhich.js:68:19)
gyp verb `which` failed     at E (E:ProgramingWeb Developmentpair-programming-frontend-react-maintasksfe-pair-programmingnode_moduleswhichwhich.js:80:29)
gyp verb `which` failed     at E:ProgramingWeb Developmentpair-programming-frontend-react-maintasksfe-pair-programmingnode_moduleswhichwhich.js:89:16
gyp verb `which` failed     at E:ProgramingWeb Developmentpair-programming-frontend-react-maintasksfe-pair-programmingnode_modulesisexeindex.js:42:5
gyp verb `which` failed     at E:ProgramingWeb Developmentpair-programming-frontend-react-maintasksfe-pair-programmingnode_modulesisexewindows.js:36:5
gyp verb `which` failed     at FSReqCallback.oncomplete (node:fs:198:21)
gyp verb `which` failed  python2 Error: not found: python2
gyp verb `which` failed     at getNotFoundError (E:ProgramingWeb Developmentpair-programming-frontend-react-maintasksfe-pair-programmingnode_moduleswhichwhich.js:13:12)
gyp verb `which` failed     at F (E:ProgramingWeb Developmentpair-programming-frontend-react-maintasksfe-pair-programmingnode_moduleswhichwhich.js:68:19)
gyp verb `which` failed     at E (E:ProgramingWeb Developmentpair-programming-frontend-react-maintasksfe-pair-programmingnode_moduleswhichwhich.js:80:29)
gyp verb `which` failed     at E:ProgramingWeb Developmentpair-programming-frontend-react-maintasksfe-pair-programmingnode_moduleswhichwhich.js:89:16
gyp verb `which` failed     at E:ProgramingWeb Developmentpair-programming-frontend-react-maintasksfe-pair-programmingnode_modulesisexeindex.js:42:5
gyp verb `which` failed     at E:ProgramingWeb Developmentpair-programming-frontend-react-maintasksfe-pair-programmingnode_modulesisexewindows.js:36:5
gyp verb `which` failed     at FSReqCallback.oncomplete (node:fs:198: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:UsersAleksandarAppDataLocalProgramsPythonPython39python.EXE
gyp ERR! configure error
gyp ERR! stack Error: Command failed: C:UsersAleksandarAppDataLocalProgramsPythonPython39python.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 (node:child_process:398:12)
gyp ERR! stack     at ChildProcess.emit (node:events:527:28)
gyp ERR! stack     at maybeClose (node:internal/child_process:1092:16)
gyp ERR! stack     at Socket.<anonymous> (node:internal/child_process:451:11)
gyp ERR! stack     at Socket.emit (node:events:527:28)
gyp ERR! stack     at Pipe.<anonymous> (node:net:709:12)
gyp ERR! System Windows_NT 10.0.22000
gyp ERR! command "C:\Program Files\nodejs\node.exe" "E:\Programing\Web Development\pair-programming-frontend-react-main\tasks\fe-pair-programming\node_modules\node-gyp\bin\node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library="
gyp ERR! cwd E:ProgramingWeb Developmentpair-programming-frontend-react-maintasksfe-pair-programmingnode_modulesnode-sass
gyp ERR! node -v v16.15.1

从我看到你的错误,你需要python2/python能够安装依赖关系。如果您没有python2或python,请尝试安装它并重试。如果你有python2或python,但程序由于某种原因没有拾取它,你可以使用yarn config set python /path/to/python2/python.exenpm config set python /path/to/executable/python2.7指定python2的python.exe的绝对路径。你可以在这里找到更多信息。

相关内容

最新更新