0xGG/crossnote-app

本地测试报错

Closed this issue · 4 comments

以下是操作记录

C:\Users\21225\Downloads\crossnote>yarn
yarn install v1.22.19
warning ..\..\package.json: No license field
[1/4] Resolving packages...
[2/4] Fetching packages...
[3/4] Linking dependencies...
warning "@lourenci/react-kanban > react-beautiful-dnd@13.0.0" has incorrect peer dependency "react@^16.8.5".
warning "@lourenci/react-kanban > react-beautiful-dnd@13.0.0" has incorrect peer dependency "react-dom@^16.8.5".
warning " > @material-ui/pickers@3.2.10" has unmet peer dependency "@date-io/core@^1.3.6".
warning " > @material-ui/pickers@3.2.10" has unmet peer dependency "prop-types@^15.6.0".
warning " > @material-ui/pickers@3.2.10" has incorrect peer dependency "react@^16.8.4".
warning " > @material-ui/pickers@3.2.10" has incorrect peer dependency "react-dom@^16.8.4".
warning " > nuka-carousel@4.7.5" has incorrect peer dependency "react@^0.14.9 || ^15.3.0 || ^16.0.0".
warning " > nuka-carousel@4.7.5" has incorrect peer dependency "react-dom@^0.14.9 || ^15.3.0 || ^16.0.0".
warning "nuka-carousel > react-move@6.4.0" has incorrect peer dependency "react@^16.3.0".
warning " > react-masonry-component@6.2.1" has incorrect peer dependency "react@^0.14.0 || ^15.0.0-0 || ^16.0.0-0".
warning " > react-split-pane@0.1.92" has incorrect peer dependency "react@^16.0.0-0".
warning " > react-split-pane@0.1.92" has incorrect peer dependency "react-dom@^16.0.0-0".
warning " > styled-components@5.2.1" has unmet peer dependency "react-is@>= 16.8.0".
warning " > super-react-gist@1.0.4" has incorrect peer dependency "react@0.14.x || ^15.0.0-rc || ^16.0.0-rc".
warning " > @graphql-codegen/typescript-urql@1.17.7" has unmet peer dependency "graphql-tag@^2.0.0".
[4/4] Building fresh packages...
[-/8] ⡀ waiting...
[-/8] ⡀ waiting...
[-/8] ⡀ waiting...
[-/8] ⡀ waiting...
error C:\Users\21225\Downloads\crossnote\node_modules\node-sass: Command failed.
Exit code: 1
Command: node scripts/build.js
Arguments:
Directory: C:\Users\21225\Downloads\crossnote\node_modules\node-sass
Output:
Building: C:\Program Files\nodejs\node.exe C:\Users\21225\Downloads\crossnote\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   'C:\\Program Files\\nodejs\\node.exe',
gyp verb cli   'C:\\Users\\21225\\Downloads\\crossnote\\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.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.7" in the PATH
gyp verb `which` failed Error: not found: python2.7
gyp verb `which` failed     at getNotFoundError (C:\Users\21225\Downloads\crossnote\node_modules\which\which.js:13:12)
gyp verb `which` failed     at F (C:\Users\21225\Downloads\crossnote\node_modules\which\which.js:68:19)
gyp verb `which` failed     at E (C:\Users\21225\Downloads\crossnote\node_modules\which\which.js:80:29)
gyp verb `which` failed     at C:\Users\21225\Downloads\crossnote\node_modules\which\which.js:89:16
gyp verb `which` failed     at C:\Users\21225\Downloads\crossnote\node_modules\isexe\index.js:42:5
gyp verb `which` failed     at C:\Users\21225\Downloads\crossnote\node_modules\isexe\windows.js:36:5
gyp verb `which` failed     at FSReqCallback.oncomplete (node:fs:198:21)
gyp verb `which` failed  python2.7 Error: not found: python2.7
gyp verb `which` failed     at getNotFoundError (C:\Users\21225\Downloads\crossnote\node_modules\which\which.js:13:12)
gyp verb `which` failed     at F (C:\Users\21225\Downloads\crossnote\node_modules\which\which.js:68:19)
gyp verb `which` failed     at E (C:\Users\21225\Downloads\crossnote\node_modules\which\which.js:80:29)
gyp verb `which` failed     at C:\Users\21225\Downloads\crossnote\node_modules\which\which.js:89:16
gyp verb `which` failed     at C:\Users\21225\Downloads\crossnote\node_modules\isexe\index.js:42:5
gyp verb `which` failed     at C:\Users\21225\Downloads\crossnote\node_modules\isexe\windows.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 could not find "python2.7". checking python launcher
gyp verb could not find "python2.7". guessing location
gyp verb ensuring that file exists: C:\Python27\python.exe
gyp ERR! configure error
gyp ERR! stack Error: Can't find Python executable "python2.7", you can set the PYTHON env variable.
gyp ERR! stack     at PythonFinder.failNoPython (C:\Users\21225\Downloads\crossnote\node_modules\node-gyp\lib\configure.js:484:19)
gyp ERR! stack     at PythonFinder.<anonymous> (C:\Users\21225\Downloads\crossnote\node_modules\node-gyp\lib\configure.js:509:16)
gyp ERR! stack     at callback (C:\Users\21225\Downloads\crossnote\node_modules\graceful-fs\polyfills.js:299:20)
gyp ERR! stack     at FSReqCallback.oncomplete (node:fs:198:21)
gyp ERR! System Windows_NT 10.0.22000
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\21225\\Downloads\\crossnote\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library="
gyp ERR! cwd C:\Users\21225\Downloads\crossnote\node_modules\node-sass
gyp ERR! node -v v16.15.0
C:\Users\21225\Downloads\crossnote>yarn start
yarn run v1.22.19
warning ..\..\package.json: No license field
$ yarn git-info; npm-run-all --parallel start:*
warning ..\..\package.json: No license field
error Command "git-info;" not found. Did you mean "git-info"?
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

环境: Win11 yarn:1.22.19

不大了解了,没用过 windows 做过这个的开发。:joy:

我看错误指出的是你没有安装 python?

不大了解了,没用过 windows 做过这个的开发。😂

我看错误指出的是你没有安装 python?

bxRg.jpg
感谢回复,这一次已经安装了 python ,仍然报同样的错误,不知是还有哪个地方设置的不对(小白一枚,大佬莫见怪)(●'◡'●)

想办法换用了Linux(Debian),仍然报错————

root@cs-201165279056-default:~/crossnote# yarn
yarn install v1.22.19
[1/4] Resolving packages...
[2/4] Fetching packages...
[3/4] Linking dependencies...
warning "@lourenci/react-kanban > react-beautiful-dnd@13.0.0" has incorrect peer dependency "react@^16.8.5".
warning "@lourenci/react-kanban > react-beautiful-dnd@13.0.0" has incorrect peer dependency "react-dom@^16.8.5".
warning " > @material-ui/pickers@3.2.10" has unmet peer dependency "@date-io/core@^1.3.6".
warning " > @material-ui/pickers@3.2.10" has unmet peer dependency "prop-types@^15.6.0".
warning " > @material-ui/pickers@3.2.10" has incorrect peer dependency "react@^16.8.4".
warning " > @material-ui/pickers@3.2.10" has incorrect peer dependency "react-dom@^16.8.4".
warning " > nuka-carousel@4.7.5" has incorrect peer dependency "react@^0.14.9 || ^15.3.0 || ^16.0.0".
warning " > nuka-carousel@4.7.5" has incorrect peer dependency "react-dom@^0.14.9 || ^15.3.0 || ^16.0.0".
warning "nuka-carousel > react-move@6.4.0" has incorrect peer dependency "react@^16.3.0".
warning " > react-masonry-component@6.2.1" has incorrect peer dependency "react@^0.14.0 || ^15.0.0-0 || ^16.0.0-0".
warning " > react-split-pane@0.1.92" has incorrect peer dependency "react@^16.0.0-0".
warning " > react-split-pane@0.1.92" has incorrect peer dependency "react-dom@^16.0.0-0".
warning " > styled-components@5.2.1" has unmet peer dependency "react-is@>= 16.8.0".
warning " > super-react-gist@1.0.4" has incorrect peer dependency "react@0.14.x || ^15.0.0-rc || ^16.0.0-rc".
warning " > @graphql-codegen/typescript-urql@1.17.7" has unmet peer dependency "graphql-tag@^2.0.0".
[4/4] Building fresh packages...
$ patch-package
patch-package 6.4.7
Applying patches...
No patch files found
Done in 228.06s.
root@cs-201165279056-default:~/crossnote# yarn start
yarn run v1.22.19
$ yarn git-info; npm-run-all --parallel start:*
$ echo export default "{\"logMessage\": \"$(git log -1 --oneline)\",\"hash\":\"$(git rev-parse HEAD)\"}"  > src/_git_commit.js
/bin/sh: line 1: /root/crossnote/node_modules/.bin/npm-run-all: Permission denied
error Command failed with exit code 126.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

Chomd 赋予权限后解决