Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

前端构建时失败 #525

Open
allegrox opened this issue Aug 15, 2024 · 8 comments
Open

前端构建时失败 #525

allegrox opened this issue Aug 15, 2024 · 8 comments

Comments

@allegrox
Copy link

试了1.2 .8和1.2.11

=> ERROR [frontend frontend 4/4] RUN yarn config set registry https://registry.npmmirror.com -g && yarn config set sass_binary_site "https 55.4s

[frontend frontend 4/4] RUN yarn config set registry https://registry.npmmirror.com -g && yarn config set sass_binary_site "https://npmmirror.com/mirrors/node-sass/" -g && yarn && yarn build:
0.269 yarn config v1.22.5
0.291 success Set "registry" to "https://registry.npmmirror.com".
0.292 Done in 0.03s.
0.440 yarn config v1.22.5
0.467 success Set "sass_binary_site" to "https://npmmirror.com/mirrors/node-sass/".
0.467 Done in 0.03s.
0.617 yarn install v1.22.5
0.642 info No lockfile found.
0.647 [1/4] Resolving packages...
1.457 warning @svgr/webpack > @svgr/plugin-svgo > [email protected]: This SVGO version is no longer supported. Upgrade to v2.x.x.
2.005 warning @svgr/webpack > @svgr/plugin-svgo > svgo > [email protected]: Modern JS already guarantees Array#sort() is a stable sort, so this library is deprecated. See the compatibility table on MDN: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort#browser_compatibility
2.256 warning @svgr/webpack > @svgr/plugin-svgo > svgo > coa > [email protected]: You or someone you depend on is using Q, the JavaScript Promise library that gave JavaScript developers strong feelings about promises. They can almost certainly migrate to the native JavaScript promise now. Thank you literally everyone for joining me in this bet against the odds. Be excellent to each other.
2.256
2.256 (For a CapTP with native promises, see @endo/eventual-send and @endo/captp)
3.767 warning @typescript-eslint/eslint-plugin > @typescript-eslint/experimental-utils > @typescript-eslint/typescript-estree > [email protected]: Glob versions prior to v9 are no longer supported
3.803 warning @typescript-eslint/eslint-plugin > @typescript-eslint/experimental-utils > @typescript-eslint/typescript-estree > glob > [email protected]: This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.
4.737 warning antd > babel-runtime > [email protected]: core-js@<3.23.3 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Some versions have web compatibility issues. Please, upgrade your dependencies to the actual version of core-js.
4.910 warning antd > rc-editor-mention > draft-js > fbjs > [email protected]: core-js@<3.23.3 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Some versions have web compatibility issues. Please, upgrade your dependencies to the actual version of core-js.
5.130 warning [email protected]: Critical security vulnerability fixed in v0.21.1. For more information, see axios/axios#3410
5.201 warning [email protected]: babel-eslint is now @babel/eslint-parser. This package will no longer receive updates.
5.333 warning babel-jest > babel-plugin-istanbul > test-exclude > [email protected]: Glob versions prior to v9 are no longer supported
5.519 warning babel-jest > @jest/transform > jest-haste-map > [email protected]: some dependency vulnerabilities fixed, support for node < 10 dropped, and newer ECMAScript syntax/features added
5.522 warning babel-jest > @jest/transform > jest-haste-map > [email protected]: The v1 package contains DANGEROUS / INSECURE binaries. Upgrade to safe fsevents v2
5.629 warning babel-jest > @jest/transform > micromatch > snapdragon > [email protected]: See https://github.com/lydell/source-map-resolve#deprecated
5.781 warning babel-jest > @jest/transform > micromatch > snapdragon > source-map-resolve > [email protected]: https://github.com/lydell/resolve-url#deprecated
5.788 warning babel-jest > @jest/transform > micromatch > snapdragon > source-map-resolve > [email protected]: See https://github.com/lydell/source-map-url#deprecated
5.793 warning babel-jest > @jest/transform > micromatch > snapdragon > source-map-resolve > [email protected]: Please see https://github.com/lydell/urix#deprecated
6.258 warning babel-preset-react-app > @babel/[email protected]: This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-class-properties instead.
6.260 warning babel-preset-react-app > @babel/[email protected]: This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-nullish-coalescing-operator instead.
6.261 warning babel-preset-react-app > @babel/preset-env > @babel/[email protected]: This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-nullish-coalescing-operator instead.
6.264 warning babel-preset-react-app > @babel/[email protected]: This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-optional-chaining instead.
6.264 warning babel-preset-react-app > @babel/preset-env > @babel/[email protected]: This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-optional-chaining instead.
6.275 warning babel-preset-react-app > @babel/[email protected]: This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-numeric-separator instead.
6.275 warning babel-preset-react-app > @babel/preset-env > @babel/[email protected]: This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-numeric-separator instead.
6.301 warning babel-preset-react-app > @babel/preset-env > @babel/[email protected]: This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-dynamic-import instead.
6.306 warning babel-preset-react-app > @babel/preset-env > @babel/[email protected]: This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-json-strings instead.
6.313 warning babel-preset-react-app > @babel/preset-env > @babel/[email protected]: This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-unicode-property-regex instead.
6.313 warning babel-preset-react-app > @babel/preset-env > @babel/preset-modules > @babel/[email protected]: This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-unicode-property-regex instead.
6.325 warning babel-preset-react-app > @babel/preset-env > @babel/[email protected]: This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-optional-catch-binding instead.
6.356 warning babel-preset-react-app > @babel/preset-env > @babel/[email protected]: This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-async-generator-functions instead.
6.371 warning babel-preset-react-app > @babel/preset-env > @babel/[email protected]: This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-object-rest-spread instead.
7.311 warning eslint > file-entry-cache > flat-cache > [email protected]: Rimraf versions prior to v4 are no longer supported
7.311 warning eslint > file-entry-cache > flat-cache > rimraf > [email protected]: Glob versions prior to v9 are no longer supported
7.514 warning [email protected]: This loader has been deprecated. Please use eslint-webpack-plugin
8.618 warning [email protected]: please switch to a stable version
9.151 warning jest > jest-cli > jest-config > [email protected]: Glob versions prior to v9 are no longer supported
9.173 warning jest > jest-cli > @jest/core > [email protected]: Rimraf versions prior to v4 are no longer supported
9.178 warning jest > jest-cli > @jest/core > rimraf > [email protected]: Glob versions prior to v9 are no longer supported
9.254 warning jest > jest-cli > @jest/core > @jest/reporters > [email protected]: Glob versions prior to v9 are no longer supported
9.291 warning jest > jest-cli > @jest/core > jest-runtime > [email protected]: Glob versions prior to v9 are no longer supported
9.369 warning jest > jest-cli > @jest/core > @jest/reporters > istanbul-lib-source-maps > [email protected]: Rimraf versions prior to v4 are no longer supported
9.425 warning jest > jest-cli > jest-config > jest-environment-jsdom > jsdom > [email protected]: Use your platform's native atob() and btoa() methods instead
9.449 warning jest > jest-cli > jest-config > jest-environment-jsdom > jsdom > data-urls > [email protected]: Use your platform's native atob() and btoa() methods instead
9.452 warning jest > jest-cli > jest-config > jest-environment-jsdom > jsdom > [email protected]: Use your platform's native DOMException instead
9.459 warning jest > jest-cli > jest-config > jest-environment-jsdom > jsdom > [email protected]: use String.prototype.padStart()
9.485 warning jest > jest-cli > jest-config > jest-environment-jsdom > jsdom > [email protected]: request has been deprecated, see request/request#3142
9.492 warning jest > jest-cli > jest-config > jest-environment-jsdom > jsdom > [email protected]: request-promise-native has been deprecated because it extends the now deprecated request package, see request/request#3142
9.498 warning jest > jest-cli > jest-config > jest-environment-jsdom > jsdom > [email protected]: Use your platform's native performance.now() and performance.timeOrigin.
9.599 warning jest > jest-cli > jest-config > jest-environment-jsdom > jsdom > request > [email protected]: this library is no longer supported
9.641 warning jest > jest-cli > jest-config > jest-environment-jsdom > jsdom > request > [email protected]: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.
9.827 warning jest-environment-jsdom-fourteen > jsdom > [email protected]: Use your platform's native atob() and btoa() methods instead
9.828 warning jest-environment-jsdom-fourteen > jsdom > [email protected]: Use your platform's native DOMException instead
9.828 warning jest-environment-jsdom-fourteen > jsdom > [email protected]: request has been deprecated, see request/request#3142
9.828 warning jest-environment-jsdom-fourteen > jsdom > [email protected]: request-promise-native has been deprecated because it extends the now deprecated request package, see request/request#3142
9.828 warning jest-environment-jsdom-fourteen > jsdom > [email protected]: Use your platform's native performance.now() and performance.timeOrigin.
9.862 warning jest-environment-jsdom-fourteen > jsdom > w3c-xmlserializer > [email protected]: Use your platform's native DOMException instead
10.52 warning optimize-css-assets-webpack-plugin > cssnano > cssnano-preset-default > postcss-svgo > [email protected]: This SVGO version is no longer supported. Upgrade to v2.x.x.
11.44 warning postcss-preset-env > postcss-color-gray > postcss-values-parser > [email protected]: flatten is deprecated in favor of utility frameworks such as lodash.
11.79 warning react-dev-utils > globby > [email protected]: Glob versions prior to v9 are no longer supported
11.88 warning react-dev-utils > fork-ts-checker-webpack-plugin > [email protected]: Chokidar 2 does not receive security updates since 2019. Upgrade to chokidar 3 with 15x fewer dependencies
11.88 warning react-dev-utils > fork-ts-checker-webpack-plugin > chokidar > [email protected]: The v1 package contains DANGEROUS / INSECURE binaries. Upgrade to safe fsevents v2
13.12 warning [email protected]: Package moved to @redux-devtools/extension.
13.47 warning resolve-url-loader > rework > css > [email protected]: See https://github.com/lydell/source-map-resolve#deprecated
13.47 warning resolve-url-loader > rework > css > [email protected]: Please see https://github.com/lydell/urix#deprecated
13.80 warning terser-webpack-plugin > cacache > [email protected]: Glob versions prior to v9 are no longer supported
13.80 warning terser-webpack-plugin > cacache > [email protected]: Rimraf versions prior to v4 are no longer supported
13.84 warning terser-webpack-plugin > cacache > [email protected]: This package is no longer supported.
13.84 warning terser-webpack-plugin > cacache > move-concurrently > [email protected]: Rimraf versions prior to v4 are no longer supported
13.84 warning terser-webpack-plugin > cacache > [email protected]: This module is no longer supported.
13.87 warning terser-webpack-plugin > cacache > ssri > [email protected]: This module is no longer supported.
13.91 warning terser-webpack-plugin > cacache > move-concurrently > [email protected]: This package is no longer supported.
13.91 warning terser-webpack-plugin > cacache > move-concurrently > copy-concurrently > [email protected]: Rimraf versions prior to v4 are no longer supported
13.91 warning terser-webpack-plugin > cacache > move-concurrently > [email protected]: This package is no longer supported.
13.91 warning terser-webpack-plugin > cacache > move-concurrently > copy-concurrently > [email protected]: This package is no longer supported.
14.34 warning webpack > watchpack > watchpack-chokidar2 > [email protected]: Chokidar 2 does not receive security updates since 2019. Upgrade to chokidar 3 with 15x fewer dependencies
14.64 warning webpack-dev-server > [email protected]: Chokidar 2 does not receive security updates since 2019. Upgrade to chokidar 3 with 15x fewer dependencies
14.68 warning webpack-dev-server > del > [email protected]: Rimraf versions prior to v4 are no longer supported
14.68 warning webpack-dev-server > del > globby > [email protected]: Glob versions prior to v9 are no longer supported
14.75 warning webpack-dev-server > sockjs > [email protected]: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.
14.76 warning webpack-dev-server > webpack-log > [email protected]: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.
15.31 warning workbox-webpack-plugin > workbox-build > [email protected]: Glob versions prior to v9 are no longer supported
15.34 warning workbox-webpack-plugin > workbox-build > @hapi/[email protected]: Switch to 'npm install joi'
15.41 warning workbox-webpack-plugin > workbox-build > [email protected]: It is not compatible with newer versions of GA starting with v4, as long as you are using GAv3 it should be ok, but the package is not longer being maintained
15.45 warning workbox-webpack-plugin > workbox-build > @hapi/joi > @hapi/[email protected]: Moved to 'npm install @sideway/address'
15.48 warning workbox-webpack-plugin > workbox-build > @hapi/joi > @hapi/[email protected]: This version has been deprecated and is no longer supported or maintained
15.48 warning workbox-webpack-plugin > workbox-build > @hapi/joi > @hapi/[email protected]: This version has been deprecated and is no longer supported or maintained
15.48 warning workbox-webpack-plugin > workbox-build > @hapi/joi > @hapi/topo > @hapi/[email protected]: This version has been deprecated and is no longer supported or maintained
15.49 warning workbox-webpack-plugin > workbox-build > @hapi/joi > @hapi/[email protected]: This version has been deprecated and is no longer supported or maintained
15.97 warning enzyme-adapter-react-16 > enzyme-adapter-utils > [email protected]: This package has been renamed to 'prop-types-tools'
16.09 warning jsdom > [email protected]: Use your platform's native atob() and btoa() methods instead
16.09 warning jsdom > [email protected]: Use your platform's native DOMException instead
16.09 warning jsdom > [email protected]: request has been deprecated, see request/request#3142
16.09 warning jsdom > [email protected]: request-promise-native has been deprecated because it extends the now deprecated request package, see request/request#3142
16.09 warning jsdom > [email protected]: Use your platform's native performance.now() and performance.timeOrigin.
16.13 warning [email protected]: Node Sass is no longer supported. Please use sass or sass-embedded instead.
16.13 warning node-sass > [email protected]: Glob versions prior to v9 are no longer supported
16.13 warning node-sass > [email protected]: request has been deprecated, see request/request#3142
16.18 warning node-sass > [email protected]: This package is no longer supported.
16.19 warning node-sass > node-gyp > [email protected]: Glob versions prior to v9 are no longer supported
16.19 warning node-sass > node-gyp > [email protected]: This package is no longer supported.
16.19 warning node-sass > node-gyp > [email protected]: request has been deprecated, see request/request#3142
16.19 warning node-sass > node-gyp > [email protected]: Rimraf versions prior to v4 are no longer supported
16.20 warning node-sass > true-case-path > [email protected]: Glob versions prior to v9 are no longer supported
16.22 warning node-sass > sass-graph > [email protected]: Glob versions prior to v9 are no longer supported
16.25 warning node-sass > npmlog > [email protected]: This package is no longer supported.
16.26 warning node-sass > npmlog > [email protected]: This package is no longer supported.
16.27 warning node-sass > node-gyp > [email protected]: This package is no longer supported.
16.27 warning node-sass > node-gyp > fstream > [email protected]: Rimraf versions prior to v4 are no longer supported
16.28 warning node-sass > node-gyp > [email protected]: This package is no longer supported.
16.29 warning node-sass > node-gyp > [email protected]: This version of tar is no longer supported, and will not receive security updates. Please upgrade asap.
16.29 warning node-sass > node-gyp > tar > [email protected]: This package is no longer supported.
16.32 warning node-sass > gaze > globule > [email protected]: Glob versions prior to v9 are no longer supported
16.32 warning node-sass > gaze > globule > glob > [email protected]: This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.
16.52 warning [email protected]: 16.1.1
16.70 [2/4] Fetching packages...
49.31 info [email protected]: The platform "linux" is incompatible with this module.
49.31 info "[email protected]" is an optional dependency and failed compatibility check. Excluding it from installation.
49.32 info [email protected]: The platform "linux" is incompatible with this module.
49.32 info "[email protected]" is an optional dependency and failed compatibility check. Excluding it from installation.
49.32 error [email protected]: The engine "node" is incompatible with this module. Expected version ">=18.17". Got "10.24.1"
49.32 info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
49.32 error Found incompatible module.


failed to solve: process "/bin/sh -c yarn config set registry https://registry.npmmirror.com -g && yarn config set sass_binary_site "https://npmmirror.com/mirrors/node-sass/\" -g && yarn && yarn build" did not complete successfully: exit code: 1

@Richard-Cao
Copy link
Member

是一些库的版本太老了?

@leozhang007
Copy link

同样的问题

1 similar comment
@thisdk
Copy link

thisdk commented Aug 16, 2024

同样的问题

@leozhang007
Copy link

159.2 [2/4] Fetching packages...
193.8 info There appears to be trouble with your network connection. Retrying...
222.0 info There appears to be trouble with your network connection. Retrying...
285.7 info [email protected]: The platform "linux" is incompatible with this module.
285.7 info "[email protected]" is an optional dependency and failed compatibility check. Excluding it from installation.
285.8 info [email protected]: The platform "linux" is incompatible with this module.
285.8 info "[email protected]" is an optional dependency and failed compatibility check. Excluding it from installation.
285.8 error [email protected]: The engine "node" is incompatible with this module. Expected version ">=18.17". Got "10.24.1"
285.8 error Found incompatible module.
285.8 info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.

看这个报错是 「[email protected]: The engine "node" is incompatible with this module. Expected version ">=18.17". Got "10.24.1"」
是不是容器的 node 版本太低了?

@leozhang007
Copy link

159.2 [2/4] Fetching packages... 193.8 info There appears to be trouble with your network connection. Retrying... 222.0 info There appears to be trouble with your network connection. Retrying... 285.7 info [email protected]: The platform "linux" is incompatible with this module. 285.7 info "[email protected]" is an optional dependency and failed compatibility check. Excluding it from installation. 285.8 info [email protected]: The platform "linux" is incompatible with this module. 285.8 info "[email protected]" is an optional dependency and failed compatibility check. Excluding it from installation. 285.8 error [email protected]: The engine "node" is incompatible with this module. Expected version ">=18.17". Got "10.24.1" 285.8 error Found incompatible module. 285.8 info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.

看这个报错是 「[email protected]: The engine "node" is incompatible with this module. Expected version ">=18.17". Got "10.24.1"」 是不是容器的 node 版本太低了?

尝试修改 node 版本,有了新的报错
FROM node:18-alpine as frontend
FROM node:20-alpine as frontend
这两个都报错找不到 python,报错如下:

1531.8 error /web/node_modules/node-sass: Command failed.
1531.8 Exit code: 1
1531.8 Command: node scripts/build.js
1531.8 Arguments:
1531.8 Directory: /web/node_modules/node-sass
1531.8 Output:
1531.8 Building: /usr/local/bin/node /web/node_modules/node-gyp/bin/node-gyp.js rebuild --verbose --libsass_ext= --libsass_cflags= --libsass_ldflags= --libsass_library=
1531.8 gyp info it worked if it ends with ok
1531.8 gyp verb cli [
1531.8 gyp verb cli '/usr/local/bin/node',
1531.8 gyp verb cli '/web/node_modules/node-gyp/bin/node-gyp.js',
1531.8 gyp verb cli 'rebuild',
1531.8 gyp verb cli '--verbose',
1531.8 gyp verb cli '--libsass_ext=',
1531.8 gyp verb cli '--libsass_cflags=',
1531.8 gyp verb cli '--libsass_ldflags=',
1531.8 gyp verb cli '--libsass_library='
1531.8 gyp verb cli ]
1531.8 gyp info using [email protected]
1531.8 gyp info using [email protected] | linux | arm64
1531.8 gyp verb command rebuild []
1531.8 gyp verb command clean []
1531.8 gyp verb clean removing "build" directory
1531.8 gyp verb command configure []
1531.8 gyp verb check python checking for Python executable "python2" in the PATH
1531.8 gyp verb which failed Error: not found: python2
1531.8 gyp verb which failed at getNotFoundError (/web/node_modules/which/which.js:13:12)
1531.8 gyp verb which failed at F (/web/node_modules/which/which.js:68:19)
1531.8 gyp verb which failed at E (/web/node_modules/which/which.js:80:29)
1531.8 gyp verb which failed at /web/node_modules/which/which.js:89:16
1531.8 gyp verb which failed at /web/node_modules/isexe/index.js:42:5
1531.8 gyp verb which failed at /web/node_modules/isexe/mode.js:8:5
1531.8 gyp verb which failed at FSReqCallback.oncomplete (node:fs:197:21)
1531.8 gyp verb which failed python2 Error: not found: python2
1531.8 gyp verb which failed at getNotFoundError (/web/node_modules/which/which.js:13:12)
1531.8 gyp verb which failed at F (/web/node_modules/which/which.js:68:19)
1531.8 gyp verb which failed at E (/web/node_modules/which/which.js:80:29)
1531.8 gyp verb which failed at /web/node_modules/which/which.js:89:16
1531.8 gyp verb which failed at /web/node_modules/isexe/index.js:42:5
1531.8 gyp verb which failed at /web/node_modules/isexe/mode.js:8:5
1531.8 gyp verb which failed at FSReqCallback.oncomplete (node:fs:197:21) {
1531.8 gyp verb which failed code: 'ENOENT'
1531.8 gyp verb which failed }
1531.8 gyp verb check python checking for Python executable "python" in the PATH
1531.8 gyp verb which failed Error: not found: python
1531.8 gyp verb which failed at getNotFoundError (/web/node_modules/which/which.js:13:12)
1531.8 gyp verb which failed at F (/web/node_modules/which/which.js:68:19)
1531.8 gyp verb which failed at E (/web/node_modules/which/which.js:80:29)
1531.8 gyp verb which failed at /web/node_modules/which/which.js:89:16
1531.8 gyp verb which failed at /web/node_modules/isexe/index.js:42:5
1531.8 gyp verb which failed at /web/node_modules/isexe/mode.js:8:5
1531.8 gyp verb which failed at FSReqCallback.oncomplete (node:fs:197:21)
1531.8 gyp verb which failed python Error: not found: python
1531.8 gyp verb which failed at getNotFoundError (/web/node_modules/which/which.js:13:12)
1531.8 gyp verb which failed at F (/web/node_modules/which/which.js:68:19)
1531.8 gyp verb which failed at E (/web/node_modules/which/which.js:80:29)
1531.8 gyp verb which failed at /web/node_modules/which/which.js:89:16
1531.8 gyp verb which failed at /web/node_modules/isexe/index.js:42:5
1531.8 gyp verb which failed at /web/node_modules/isexe/mode.js:8:5
1531.8 gyp verb which failed at FSReqCallback.oncomplete (node:fs:197:21) {
1531.8 gyp verb which failed code: 'ENOENT'
1531.8 gyp verb which failed }
1531.8 gyp ERR! configure error
1531.8 gyp ERR! stack Error: Can't find Python executable "python", you can set the PYTHON env variable.
1531.8 gyp ERR! stack at PythonFinder.failNoPython (/web/node_modules/node-gyp/lib/configure.js:484:19)
1531.8 gyp ERR! stack at PythonFinder. (/web/node_modules/node-gyp/lib/configure.js:406:16)
1531.8 gyp ERR! stack at F (/web/node_modules/which/which.js:68:16)
1531.8 gyp ERR! stack at E (/web/node_modules/which/which.js:80:29)
1531.8 gyp ERR! stack at /web/node_modules/which/which.js:89:16
1531.8 gyp ERR! stack at /web/node_modules/isexe/index.js:42:5
1531.8 gyp ERR! stack at /web/node_modules/isexe/mode.js:8:5
1531.8 gyp ERR! stack at FSReqCallback.oncomplete (node:fs:197:21)
1531.8 gyp ERR! System Linux 6.10.0-linuxkit
1531.8 gyp ERR! command "/usr/local/bin/node" "/web/node_modules/node-gyp/bin/node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library="
1531.8 gyp ERR! cwd /web/node_modules/node-sass
1531.8 gyp ERR! node -v v20.16.0
1531.8 gyp ERR! node-gyp -v v3.8.0
1531.8 gyp ERR! not ok
1531.8 Build failed with error code: 1
1531.8 info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.

failed to solve: process "/bin/sh -c yarn config set registry https://registry.npmmirror.com -g && yarn config set sass_binary_site "https://npmmirror.com/mirrors/node-sass/\" -g && yarn && yarn build" did not complete successfully: exit code: 1

@GaryChangCN
Copy link
Collaborator

  1. 删除 node_modules、package-lock.json、yarn.lock 文件
  2. 使用 node v10.24.1 版本,npm 版本使用 v6.14.2 (不可以大于 v7)
  3. 重新使用 npm 安装依赖 npm i 同时建议使用国内源避免 node-sass 编译耗时 ( npm i --registry=https://registry.npmmirror.com)
  4. 重新运行,验证正常启动 npm run start
  5. 重新 npm run build

@GaryChangCN
Copy link
Collaborator

@LeoZhang0830
Copy link

d7296a18-98a8-4bca-b244-acd61defec50
同样的报错,😂

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants