gpt4 book ai didi

node.js - yarn 安装因 node-sass/node-modules 失败

转载 作者:行者123 更新时间:2023-12-04 08:38:11 28 4
gpt4 key购买 nike

Rails 应用程序
用自制软件更新 yarn 到 yarn v1.22.10但后来 yarn install失败并出现此错误:

yarn install v1.22.10
[1/4] 🔍 Resolving packages...
[2/4] 🚚 Fetching packages...
[3/4] 🔗 Linking dependencies...
warning " > webpack-dev-server@3.11.0" has unmet peer dependency "webpack@^4.0.0 || ^5.0.0".
warning "webpack-dev-server > webpack-dev-middleware@3.7.2" has unmet peer dependency "webpack@^4.0.0".
[4/4] 🔨 Building fresh packages...
[-/3] ⠈ waiting...
[-/3] ⠈ waiting...
error /Users/eliseserres/code/Septlieues/intranet/node_modules/node-sass: Command failed.
Exit code: 1
Command: node scripts/build.js
Arguments:
Directory: /Users/eliseserres/code/Septlieues/intranet/node_modules/node-sass
Output:
Building: /usr/local/Cellar/node/15.1.0/bin/node /Users/eliseserres/code/Septlieues/intranet/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 '/usr/local/Cellar/node/15.1.0/bin/node',
gyp verb cli '/Users/eliseserres/code/Septlieues/intranet/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@15.1.0 | darwin | 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 "/usr/bin/python" in the PATH
gyp verb `which` succeeded /usr/bin/python /usr/bin/python
gyp verb check python version `/usr/bin/python -c "import sys; print "2.7.16
gyp verb check python version .%s.%s" % sys.version_info[:3];"` returned: %j
gyp verb get node dir no --target version specified, falling back to host node version: 15.1.0
gyp verb command install [ '15.1.0' ]
gyp verb install input version string "15.1.0"
gyp verb install installing version: 15.1.0
gyp verb install --ensure was passed, so won't reinstall if already installed
gyp verb install version is already installed, need to check "installVersion"
gyp verb got "installVersion" 9
gyp verb needs "installVersion" 9
gyp verb install version is good
gyp verb get node dir target node version installed: 15.1.0
gyp verb build dir attempting to create "build" dir: /Users/eliseserres/code/Septlieues/intranet/node_modules/node-sass/build
gyp verb build dir "build" dir needed to be created? /Users/eliseserres/code/Septlieues/intranet/node_modules/node-sass/build
gyp verb build/config.gypi creating config file
gyp verb build/config.gypi writing out config file: /Users/eliseserres/code/Septlieues/intranet/node_modules/node-sass/build/config.gypi
gyp verb config.gypi checking for gypi file: /Users/eliseserres/code/Septlieues/intranet/node_modules/node-sass/config.gypi
gyp verb common.gypi checking for gypi file: /Users/eliseserres/code/Septlieues/intranet/node_modules/node-sass/common.gypi
gyp verb gyp gyp format was not specified; forcing "make"
gyp info spawn /usr/bin/python
gyp info spawn args [
gyp info spawn args '/Users/eliseserres/code/Septlieues/intranet/node_modules/node-gyp/gyp/gyp_main.py',
gyp info spawn args 'binding.gyp',
gyp info spawn args '-f',
gyp info spawn args 'make',
gyp info spawn args '-I',
gyp info spawn args '/Users/eliseserres/code/Septlieues/intranet/node_modules/node-sass/build/config.gypi',
gyp info spawn args '-I',
gyp info spawn args '/Users/eliseserres/code/Septlieues/intranet/node_modules/node-gyp/addon.gypi',
gyp info spawn args '-I',
gyp info spawn args '/Users/eliseserres/.node-gyp/15.1.0/include/node/common.gypi',
gyp info spawn args '-Dlibrary=shared_library',
gyp info spawn args '-Dvisibility=default',
gyp info spawn args '-Dnode_root_dir=/Users/eliseserres/.node-gyp/15.1.0',
gyp info spawn args '-Dnode_gyp_dir=/Users/eliseserres/code/Septlieues/intranet/node_modules/node-gyp',
gyp info spawn args '-Dnode_lib_file=/Users/eliseserres/.node-gyp/15.1.0/<(target_arch)/node.lib',
gyp info spawn args '-Dmodule_root_dir=/Users/eliseserres/code/Septlieues/intranet/node_modules/node-sass',
gyp info spawn args '-Dnode_engine=v8',
gyp info spawn args '--depth=.',
gyp info spawn args '--no-parallel',
gyp info spawn args '--generator-output',
gyp info spawn args 'build',
gyp info spawn args '-Goutput_dir=.'
gyp info spawn args ]
No receipt for 'com.apple.pkg.CLTools_Executables' found at '/'.

No receipt for 'com.apple.pkg.DeveloperToolsCLILeo' found at '/'.

No receipt for 'com.apple.pkg.DeveloperToolsCLI' found at '/'.

gyp: No Xcode or CLT version detected!
gyp ERR! configure error
gyp ERR! stack Error: `gyp` failed with exit code: 1
gyp ERR! stack at ChildProcess.onCpExit (/Users/eliseserres/code/Septlieues/intranet/node_modules/node-gyp/lib/configure.js:345:16)
gyp ERR! stack at ChildProcess.emit (node:events:327:20)
gyp ERR! stack at Process.ChildProcess._handle.onexit (node:internal/child_process:277:12)
gyp ERR! System Darwin 19.6.0
gyp ERR! command "/usr/local/Cellar/node/15.1.0/bin/node" "/Users/eliseserres/code/Septlieues/intranet/node_modules/node-gyp/bin/node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library="
gyp ERR! cwd /Users/eliseserres/code/Septlieues/intranet/node_modules/node-sass
gyp ERR! node -v v15.1.0
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
正在尝试更新 node-sass但是 yarn add node-sass失败并出现同样的错误。 node -v -> node v15.1.0有人知道我能做什么吗?

最佳答案

根据this您可能需要重新安装 Xcode 命令行工具,然后再配置 node-gyp。我建议您遵循本教程,因为它来自官方 Node.js 开发人员。

关于node.js - yarn 安装因 node-sass/node-modules 失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/64694185/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com