节点 sass 安装问题
node sass installation issue
Node-sass 将无法安装,我发现这个问题已被问过几次,但错误消息与我的不同。如果我不能再使用此模块,是否有替代方案?
npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated har-validator@5.1.5: this library is no longer supported
> node-sass@5.0.0 install /Applications/MAMP/htdocs/wordpress9/wp-content/plugins/recipe/blocks/node_modules/node-sass
> node scripts/install.js
Downloading binary from https://github.com/sass/node-sass/releases/download/v5.0.0/darwin-x64-79_binding.node
Cannot download "https://github.com/sass/node-sass/releases/download/v5.0.0/darwin-x64-79_binding.node":
HTTP error 404 Not Found
Hint: If github.com is not accessible in your location try setting a proxy viaHTTP_PROXY, e.g.
export HTTP_PROXY=http://example.com:1234 or configure npm proxy via
npm config set proxy http://example.com:8080
> node-sass@5.0.0 postinstall /Applications/MAMP/htdocs/wordpress9/wp-content/plugins/recipe/blocks/node_modules/node-sass
> node scripts/build.js
Building: /usr/local/bin/node /Applications/MAMP/htdocs/wordpress9/wp-content/plugins/recipe/blocks/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/bin/node',
gyp verb cli '/Applications/MAMP/htdocs/wordpress9/wp-content/plugins/recipe/blocks/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@7.1.2
gyp info using node@13.9.0 | darwin | x64
gyp verb command rebuild []
gyp verb command clean []
gyp verb clean removing "build" directory
gyp verb command configure []
gyp verb find Python Python is not set from command line or npm configuration
gyp verb find Python Python is not set from environment variable PYTHON
gyp verb find Python checking if "python3" can be used
gyp verb find Python - executing "python3" to get executable path
gyp verb find Python - "python3" is not in PATH or produced an error
gyp verb find Python checking if "python" can be used
gyp verb find Python - executing "python" to get executable path
gyp verb find Python - executable path is "/usr/local/opt/python@2/bin/python2.7"
gyp verb find Python - executing "/usr/local/opt/python@2/bin/python2.7" to get version
gyp verb find Python - version is "2.7.16"
gyp info find Python using Python version 2.7.16 found at "/usr/local/opt/python@2/bin/python2.7"
gyp verb get node dir no --target version specified, falling back to host node version: 13.9.0
gyp verb command install [ '13.9.0' ]
gyp verb install input version string "13.9.0"
gyp verb install installing version: 13.9.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: 13.9.0
gyp verb build dir attempting to create "build" dir: /Applications/MAMP/htdocs/wordpress9/wp-content/plugins/recipe/blocks/node_modules/node-sass/build
gyp verb build dir "build" dir needed to be created? undefined
gyp verb build/config.gypi creating config file
gyp verb build/config.gypi writing out config file: /Applications/MAMP/htdocs/wordpress9/wp-content/plugins/recipe/blocks/node_modules/node-sass/build/config.gypi
gyp verb config.gypi checking for gypi file: /Applications/MAMP/htdocs/wordpress9/wp-content/plugins/recipe/blocks/node_modules/node-sass/config.gypi
gyp verb common.gypi checking for gypi file: /Applications/MAMP/htdocs/wordpress9/wp-content/plugins/recipe/blocks/node_modules/node-sass/common.gypi
gyp verb gyp gyp format was not specified; forcing "make"
gyp info spawn /usr/local/opt/python@2/bin/python2.7
gyp info spawn args [
gyp info spawn args '/Applications/MAMP/htdocs/wordpress9/wp-content/plugins/recipe/blocks/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 '/Applications/MAMP/htdocs/wordpress9/wp-content/plugins/recipe/blocks/node_modules/node-sass/build/config.gypi',
gyp info spawn args '-I',
gyp info spawn args '/Applications/MAMP/htdocs/wordpress9/wp-content/plugins/recipe/blocks/node_modules/node-gyp/addon.gypi',
gyp info spawn args '-I',
gyp info spawn args '/Users/xxxxxx/Library/Caches/node-gyp/13.9.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/xxxxxx/Library/Caches/node-gyp/13.9.0',
gyp info spawn args '-Dnode_gyp_dir=/Applications/MAMP/htdocs/wordpress9/wp-content/plugins/recipe/blocks/node_modules/node-gyp',
gyp info spawn args '-Dnode_lib_file=/Users/xxxxxx/Library/Caches/node-gyp/13.9.0/<(target_arch)/node.lib',
gyp info spawn args '-Dmodule_root_dir=/Applications/MAMP/htdocs/wordpress9/wp-content/plugins/recipe/blocks/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 '/'.
Traceback (most recent call last):
File "/Applications/MAMP/htdocs/wordpress9/wp-content/plugins/recipe/blocks/node_modules/node-gyp/gyp/gyp_main.py", line 51, in <module>
sys.exit(gyp.script_main())
File "/Applications/MAMP/htdocs/wordpress9/wp-content/plugins/recipe/blocks/node_modules/node-gyp/gyp/pylib/gyp/__init__.py", line 670, in script_main
return main(sys.argv[1:])
File "/Applications/MAMP/htdocs/wordpress9/wp-content/plugins/recipe/blocks/node_modules/node-gyp/gyp/pylib/gyp/__init__.py", line 662, in main
return gyp_main(args)
File "/Applications/MAMP/htdocs/wordpress9/wp-content/plugins/recipe/blocks/node_modules/node-gyp/gyp/pylib/gyp/__init__.py", line 647, in gyp_main
generator.GenerateOutput(flat_list, targets, data, params)
File "/Applications/MAMP/htdocs/wordpress9/wp-content/plugins/recipe/blocks/node_modules/node-gyp/gyp/pylib/gyp/generator/make.py", line 2457, in GenerateOutput
part_of_all=qualified_target in needed_targets,
File "/Applications/MAMP/htdocs/wordpress9/wp-content/plugins/recipe/blocks/node_modules/node-gyp/gyp/pylib/gyp/generator/make.py", line 841, in Write
self.Pchify,
File "/Applications/MAMP/htdocs/wordpress9/wp-content/plugins/recipe/blocks/node_modules/node-gyp/gyp/pylib/gyp/generator/make.py", line 1304, in WriteSources
arch=config.get('xcode_configuration_platform')
File "/Applications/MAMP/htdocs/wordpress9/wp-content/plugins/recipe/blocks/node_modules/node-gyp/gyp/pylib/gyp/xcode_emulation.py", line 661, in GetCflags
archs = self.GetActiveArchs(self.configname)
File "/Applications/MAMP/htdocs/wordpress9/wp-content/plugins/recipe/blocks/node_modules/node-gyp/gyp/pylib/gyp/xcode_emulation.py", line 515, in GetActiveArchs
xcode_archs_default = GetXcodeArchsDefault()
File "/Applications/MAMP/htdocs/wordpress9/wp-content/plugins/recipe/blocks/node_modules/node-gyp/gyp/pylib/gyp/xcode_emulation.py", line 122, in GetXcodeArchsDefault
xcode_version, _ = XcodeVersion()
File "/Applications/MAMP/htdocs/wordpress9/wp-content/plugins/recipe/blocks/node_modules/node-gyp/gyp/pylib/gyp/xcode_emulation.py", line 1511, in XcodeVersion
version = CLTVersion() # macOS Catalina returns 11.0.0.0.1.1567737322
File "/Applications/MAMP/htdocs/wordpress9/wp-content/plugins/recipe/blocks/node_modules/node-gyp/gyp/pylib/gyp/xcode_emulation.py", line 1549, in CLTVersion
return re.search(regex, output).groupdict()["version"]
AttributeError: 'NoneType' object has no attribute 'groupdict'
gyp ERR! configure error
gyp ERR! stack Error: `gyp` failed with exit code: 1
gyp ERR! stack at ChildProcess.onCpExit (/Applications/MAMP/htdocs/wordpress9/wp-content/plugins/recipe/blocks/node_modules/node-gyp/lib/configure.js:351:16)
gyp ERR! stack at ChildProcess.emit (events.js:321:20)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:275:12)
gyp ERR! System Darwin 18.7.0
gyp ERR! command "/usr/local/bin/node" "/Applications/MAMP/htdocs/wordpress9/wp-content/plugins/recipe/blocks/node_modules/node-gyp/bin/node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library="
gyp ERR! cwd /Applications/MAMP/htdocs/wordpress9/wp-content/plugins/recipe/blocks/node_modules/node-sass
gyp ERR! node -v v13.9.0
gyp ERR! node-gyp -v v7.1.2
gyp ERR! not ok
Build failed with error code: 1
npm WARN sass-loader@11.0.1 requires a peer of webpack@^5.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN recipe-blocks@1.0.0 No description
npm WARN recipe-blocks@1.0.0 No repository field.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! node-sass@5.0.0 postinstall: `node scripts/build.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the node-sass@5.0.0 postinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
看看这个 post。有一个实际的描述如何 install/use 实际 SASS:
node-sass 5.0 不支持节点 13,因为它已停产。兼容性 table 可以找到 https://github.com/sass/node-sass#node-version-support-policy
Node-sass 将无法安装,我发现这个问题已被问过几次,但错误消息与我的不同。如果我不能再使用此模块,是否有替代方案?
npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated har-validator@5.1.5: this library is no longer supported
> node-sass@5.0.0 install /Applications/MAMP/htdocs/wordpress9/wp-content/plugins/recipe/blocks/node_modules/node-sass
> node scripts/install.js
Downloading binary from https://github.com/sass/node-sass/releases/download/v5.0.0/darwin-x64-79_binding.node
Cannot download "https://github.com/sass/node-sass/releases/download/v5.0.0/darwin-x64-79_binding.node":
HTTP error 404 Not Found
Hint: If github.com is not accessible in your location try setting a proxy viaHTTP_PROXY, e.g.
export HTTP_PROXY=http://example.com:1234 or configure npm proxy via
npm config set proxy http://example.com:8080
> node-sass@5.0.0 postinstall /Applications/MAMP/htdocs/wordpress9/wp-content/plugins/recipe/blocks/node_modules/node-sass
> node scripts/build.js
Building: /usr/local/bin/node /Applications/MAMP/htdocs/wordpress9/wp-content/plugins/recipe/blocks/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/bin/node',
gyp verb cli '/Applications/MAMP/htdocs/wordpress9/wp-content/plugins/recipe/blocks/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@7.1.2
gyp info using node@13.9.0 | darwin | x64
gyp verb command rebuild []
gyp verb command clean []
gyp verb clean removing "build" directory
gyp verb command configure []
gyp verb find Python Python is not set from command line or npm configuration
gyp verb find Python Python is not set from environment variable PYTHON
gyp verb find Python checking if "python3" can be used
gyp verb find Python - executing "python3" to get executable path
gyp verb find Python - "python3" is not in PATH or produced an error
gyp verb find Python checking if "python" can be used
gyp verb find Python - executing "python" to get executable path
gyp verb find Python - executable path is "/usr/local/opt/python@2/bin/python2.7"
gyp verb find Python - executing "/usr/local/opt/python@2/bin/python2.7" to get version
gyp verb find Python - version is "2.7.16"
gyp info find Python using Python version 2.7.16 found at "/usr/local/opt/python@2/bin/python2.7"
gyp verb get node dir no --target version specified, falling back to host node version: 13.9.0
gyp verb command install [ '13.9.0' ]
gyp verb install input version string "13.9.0"
gyp verb install installing version: 13.9.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: 13.9.0
gyp verb build dir attempting to create "build" dir: /Applications/MAMP/htdocs/wordpress9/wp-content/plugins/recipe/blocks/node_modules/node-sass/build
gyp verb build dir "build" dir needed to be created? undefined
gyp verb build/config.gypi creating config file
gyp verb build/config.gypi writing out config file: /Applications/MAMP/htdocs/wordpress9/wp-content/plugins/recipe/blocks/node_modules/node-sass/build/config.gypi
gyp verb config.gypi checking for gypi file: /Applications/MAMP/htdocs/wordpress9/wp-content/plugins/recipe/blocks/node_modules/node-sass/config.gypi
gyp verb common.gypi checking for gypi file: /Applications/MAMP/htdocs/wordpress9/wp-content/plugins/recipe/blocks/node_modules/node-sass/common.gypi
gyp verb gyp gyp format was not specified; forcing "make"
gyp info spawn /usr/local/opt/python@2/bin/python2.7
gyp info spawn args [
gyp info spawn args '/Applications/MAMP/htdocs/wordpress9/wp-content/plugins/recipe/blocks/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 '/Applications/MAMP/htdocs/wordpress9/wp-content/plugins/recipe/blocks/node_modules/node-sass/build/config.gypi',
gyp info spawn args '-I',
gyp info spawn args '/Applications/MAMP/htdocs/wordpress9/wp-content/plugins/recipe/blocks/node_modules/node-gyp/addon.gypi',
gyp info spawn args '-I',
gyp info spawn args '/Users/xxxxxx/Library/Caches/node-gyp/13.9.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/xxxxxx/Library/Caches/node-gyp/13.9.0',
gyp info spawn args '-Dnode_gyp_dir=/Applications/MAMP/htdocs/wordpress9/wp-content/plugins/recipe/blocks/node_modules/node-gyp',
gyp info spawn args '-Dnode_lib_file=/Users/xxxxxx/Library/Caches/node-gyp/13.9.0/<(target_arch)/node.lib',
gyp info spawn args '-Dmodule_root_dir=/Applications/MAMP/htdocs/wordpress9/wp-content/plugins/recipe/blocks/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 '/'.
Traceback (most recent call last):
File "/Applications/MAMP/htdocs/wordpress9/wp-content/plugins/recipe/blocks/node_modules/node-gyp/gyp/gyp_main.py", line 51, in <module>
sys.exit(gyp.script_main())
File "/Applications/MAMP/htdocs/wordpress9/wp-content/plugins/recipe/blocks/node_modules/node-gyp/gyp/pylib/gyp/__init__.py", line 670, in script_main
return main(sys.argv[1:])
File "/Applications/MAMP/htdocs/wordpress9/wp-content/plugins/recipe/blocks/node_modules/node-gyp/gyp/pylib/gyp/__init__.py", line 662, in main
return gyp_main(args)
File "/Applications/MAMP/htdocs/wordpress9/wp-content/plugins/recipe/blocks/node_modules/node-gyp/gyp/pylib/gyp/__init__.py", line 647, in gyp_main
generator.GenerateOutput(flat_list, targets, data, params)
File "/Applications/MAMP/htdocs/wordpress9/wp-content/plugins/recipe/blocks/node_modules/node-gyp/gyp/pylib/gyp/generator/make.py", line 2457, in GenerateOutput
part_of_all=qualified_target in needed_targets,
File "/Applications/MAMP/htdocs/wordpress9/wp-content/plugins/recipe/blocks/node_modules/node-gyp/gyp/pylib/gyp/generator/make.py", line 841, in Write
self.Pchify,
File "/Applications/MAMP/htdocs/wordpress9/wp-content/plugins/recipe/blocks/node_modules/node-gyp/gyp/pylib/gyp/generator/make.py", line 1304, in WriteSources
arch=config.get('xcode_configuration_platform')
File "/Applications/MAMP/htdocs/wordpress9/wp-content/plugins/recipe/blocks/node_modules/node-gyp/gyp/pylib/gyp/xcode_emulation.py", line 661, in GetCflags
archs = self.GetActiveArchs(self.configname)
File "/Applications/MAMP/htdocs/wordpress9/wp-content/plugins/recipe/blocks/node_modules/node-gyp/gyp/pylib/gyp/xcode_emulation.py", line 515, in GetActiveArchs
xcode_archs_default = GetXcodeArchsDefault()
File "/Applications/MAMP/htdocs/wordpress9/wp-content/plugins/recipe/blocks/node_modules/node-gyp/gyp/pylib/gyp/xcode_emulation.py", line 122, in GetXcodeArchsDefault
xcode_version, _ = XcodeVersion()
File "/Applications/MAMP/htdocs/wordpress9/wp-content/plugins/recipe/blocks/node_modules/node-gyp/gyp/pylib/gyp/xcode_emulation.py", line 1511, in XcodeVersion
version = CLTVersion() # macOS Catalina returns 11.0.0.0.1.1567737322
File "/Applications/MAMP/htdocs/wordpress9/wp-content/plugins/recipe/blocks/node_modules/node-gyp/gyp/pylib/gyp/xcode_emulation.py", line 1549, in CLTVersion
return re.search(regex, output).groupdict()["version"]
AttributeError: 'NoneType' object has no attribute 'groupdict'
gyp ERR! configure error
gyp ERR! stack Error: `gyp` failed with exit code: 1
gyp ERR! stack at ChildProcess.onCpExit (/Applications/MAMP/htdocs/wordpress9/wp-content/plugins/recipe/blocks/node_modules/node-gyp/lib/configure.js:351:16)
gyp ERR! stack at ChildProcess.emit (events.js:321:20)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:275:12)
gyp ERR! System Darwin 18.7.0
gyp ERR! command "/usr/local/bin/node" "/Applications/MAMP/htdocs/wordpress9/wp-content/plugins/recipe/blocks/node_modules/node-gyp/bin/node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library="
gyp ERR! cwd /Applications/MAMP/htdocs/wordpress9/wp-content/plugins/recipe/blocks/node_modules/node-sass
gyp ERR! node -v v13.9.0
gyp ERR! node-gyp -v v7.1.2
gyp ERR! not ok
Build failed with error code: 1
npm WARN sass-loader@11.0.1 requires a peer of webpack@^5.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN recipe-blocks@1.0.0 No description
npm WARN recipe-blocks@1.0.0 No repository field.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! node-sass@5.0.0 postinstall: `node scripts/build.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the node-sass@5.0.0 postinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
看看这个 post。有一个实际的描述如何 install/use 实际 SASS:
node-sass 5.0 不支持节点 13,因为它已停产。兼容性 table 可以找到 https://github.com/sass/node-sass#node-version-support-policy