国产 无码 综合区,色欲AV无码国产永久播放,无码天堂亚洲国产AV,国产日韩欧美女同一区二区

npm install時(shí)報(bào)一堆錯(cuò)(大致錯(cuò)誤范圍在sass)

這篇具有很好參考價(jià)值的文章主要介紹了npm install時(shí)報(bào)一堆錯(cuò)(大致錯(cuò)誤范圍在sass)。希望對大家有所幫助。如果存在錯(cuò)誤或未考慮完全的地方,請大家不吝賜教,您也可以點(diǎn)擊"舉報(bào)違法"按鈕提交疑問。

在服務(wù)器上部署一個(gè)react寫的網(wǎng)站(windows開發(fā),linux部署)的時(shí)候,npm install會(huì)報(bào)很多錯(cuò):

npm WARN using --force Recommended protections disabled.
npm WARN deprecated @npmcli/move-file@1.1.2: This functionality has been moved to @npmcli/fs
npm WARN deprecated stable@0.1.8: 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
npm WARN deprecated rollup-plugin-terser@7.0.2: This package has been deprecated and is no longer maintained. Please use @rollup/plugin-terser
npm WARN deprecated har-validator@5.1.5: this library is no longer supported
npm WARN deprecated sourcemap-codec@1.4.8: Please use @jridgewell/sourcemap-codec instead
npm WARN deprecated uuid@3.4.0: 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.
npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated svgo@1.3.2: This SVGO version is no longer supported. Upgrade to v2.x.x.
npm ERR! code 1
npm ERR! path /Projects/CLogin/login-frontend/node_modules/node-sass
npm ERR! command failed
npm ERR! command sh -c -- node scripts/build.js
npm ERR! Building: /program/nvm/nvm-0.39.0/versions/node/v18.12.1/bin/node /Projects/CLogin/login-frontend/node_modules/node-gyp/bin/node-gyp.js rebuild --verbose --libsass_ext= --libsass_cflags= --libsass_ldflags= --libsass_library=
npm ERR! make: Entering directory '/Projects/CLogin/login-frontend/node_modules/node-sass/build'
npm ERR!   g++ -o Release/obj.target/libsass/src/libsass/src/ast.o ../src/libsass/src/ast.cpp '-DNODE_GYP_MODULE_NAME=libsass' '-DUSING_UV_SHARED=1' '-DUSING_V8_SHARED=1' '-DV8_DEPRECATION_WARNINGS=1' '-DV8_DEPRECATION_WARNINGS' '-DV8_IMMINENT_DEPRECATION_WARNINGS' '-D_GLIBCXX_USE_CXX11_ABI=1' '-D_LARGEFILE_SOURCE' '-D_FILE_OFFSET_BITS=64' '-D__STDC_FORMAT_MACROS' '-DOPENSSL_NO_PINSHARED' '-DOPENSSL_THREADS' '-DLIBSASS_VERSION="3.5.5"' -I/root/.cache/node-gyp/18.12.1/include/node -I/root/.cache/node-gyp/18.12.1/src -I/root/.cache/node-gyp/18.12.1/deps/openssl/config -I/root/.cache/node-gyp/18.12.1/deps/openssl/openssl/include -I/root/.cache/node-gyp/18.12.1/deps/uv/include -I/root/.cache/node-gyp/18.12.1/deps/zlib -I/root/.cache/node-gyp/18.12.1/deps/v8/include -I../src/libsass/include  -fPIC -pthread -Wall -Wextra -Wno-unused-parameter -m64 -O3 -fno-omit-frame-pointer -std=gnu++17 -std=c++0x -fexceptions -frtti -MMD -MF ./Release/.deps/Release/obj.target/libsass/src/libsass/src/ast.o.d.raw   -c
npm ERR! make: Leaving directory '/Projects/CLogin/login-frontend/node_modules/node-sass/build'
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp verb cli [
npm ERR! gyp verb cli   '/program/nvm/nvm-0.39.0/versions/node/v18.12.1/bin/node',
npm ERR! gyp verb cli   '/Projects/CLogin/login-frontend/node_modules/node-gyp/bin/node-gyp.js',
npm ERR! gyp verb cli   'rebuild',
npm ERR! gyp verb cli   '--verbose',
npm ERR! gyp verb cli   '--libsass_ext=',
npm ERR! gyp verb cli   '--libsass_cflags=',
npm ERR! gyp verb cli   '--libsass_ldflags=',
npm ERR! gyp verb cli   '--libsass_library='
npm ERR! gyp verb cli ]
npm ERR! gyp info using node-gyp@8.4.1
npm ERR! gyp info using node@18.12.1 | linux | x64
npm ERR! gyp verb command rebuild []
npm ERR! gyp verb command clean []
npm ERR! gyp verb clean removing "build" directory
npm ERR! gyp verb command configure []
npm ERR! gyp verb find Python Python is not set from command line or npm configuration
npm ERR! gyp verb find Python Python is not set from environment variable PYTHON
npm ERR! gyp verb find Python checking if "python3" can be used
npm ERR! gyp verb find Python - executing "python3" to get executable path
npm ERR! gyp verb find Python - executable path is "/usr/bin/python3"
npm ERR! gyp verb find Python - executing "/usr/bin/python3" to get version
npm ERR! gyp verb find Python - version is "3.6.8"
npm ERR! gyp info find Python using Python version 3.6.8 found at "/usr/bin/python3"
npm ERR! gyp verb get node dir no --target version specified, falling back to host node version: 18.12.1
npm ERR! gyp verb command install [ '18.12.1' ]
npm ERR! gyp verb install input version string "18.12.1"
npm ERR! gyp verb install installing version: 18.12.1
npm ERR! gyp verb install --ensure was passed, so won't reinstall if already installed
npm ERR! gyp verb install version is already installed, need to check "installVersion"
npm ERR! gyp verb got "installVersion" 9
npm ERR! gyp verb needs "installVersion" 9
npm ERR! gyp verb install version is good
npm ERR! gyp verb get node dir target node version installed: 18.12.1
npm ERR! gyp verb build dir attempting to create "build" dir: /Projects/CLogin/login-frontend/node_modules/node-sass/build
npm ERR! gyp verb build dir "build" dir needed to be created? Yes
npm ERR! gyp verb build/config.gypi creating config file
npm ERR! gyp verb build/config.gypi writing out config file: /Projects/CLogin/login-frontend/node_modules/node-sass/build/config.gypi
npm ERR! gyp verb config.gypi checking for gypi file: /Projects/CLogin/login-frontend/node_modules/node-sass/config.gypi
npm ERR! gyp verb common.gypi checking for gypi file: /Projects/CLogin/login-frontend/node_modules/node-sass/common.gypi
npm ERR! gyp verb gyp gyp format was not specified; forcing "make"
npm ERR! gyp info spawn /usr/bin/python3
npm ERR! gyp info spawn args [
npm ERR! gyp info spawn args   '/Projects/CLogin/login-frontend/node_modules/node-gyp/gyp/gyp_main.py',
npm ERR! gyp info spawn args   'binding.gyp',
npm ERR! gyp info spawn args   '-f',
npm ERR! gyp info spawn args   'make',
npm ERR! gyp info spawn args   '-I',
npm ERR! gyp info spawn args   '/Projects/CLogin/login-frontend/node_modules/node-sass/build/config.gypi',
npm ERR! gyp info spawn args   '-I',
npm ERR! gyp info spawn args   '/Projects/CLogin/login-frontend/node_modules/node-gyp/addon.gypi',
npm ERR! gyp info spawn args   '-I',
npm ERR! gyp info spawn args   '/root/.cache/node-gyp/18.12.1/include/node/common.gypi',
npm ERR! gyp info spawn args   '-Dlibrary=shared_library',
npm ERR! gyp info spawn args   '-Dvisibility=default',
npm ERR! gyp info spawn args   '-Dnode_root_dir=/root/.cache/node-gyp/18.12.1',
npm ERR! gyp info spawn args   '-Dnode_gyp_dir=/Projects/CLogin/login-frontend/node_modules/node-gyp',
npm ERR! gyp info spawn args   '-Dnode_lib_file=/root/.cache/node-gyp/18.12.1/<(target_arch)/node.lib',
npm ERR! gyp info spawn args   '-Dmodule_root_dir=/Projects/CLogin/login-frontend/node_modules/node-sass',
npm ERR! gyp info spawn args   '-Dnode_engine=v8',
npm ERR! gyp info spawn args   '--depth=.',
npm ERR! gyp info spawn args   '--no-parallel',
npm ERR! gyp info spawn args   '--generator-output',
npm ERR! gyp info spawn args   'build',
npm ERR! gyp info spawn args   '-Goutput_dir=.'
npm ERR! gyp info spawn args ]
npm ERR! gyp verb command build []
npm ERR! gyp verb build type Release
npm ERR! gyp verb architecture x64
npm ERR! gyp verb node dev dir /root/.cache/node-gyp/18.12.1
npm ERR! gyp verb `which` succeeded for `make` /usr/bin/make
npm ERR! gyp info spawn make
npm ERR! gyp info spawn args [ 'V=1', 'BUILDTYPE=Release', '-C', 'build' ]
npm ERR! make: g++: Command not found
npm ERR! make: *** [src/libsass.target.mk:159: Release/obj.target/libsass/src/libsass/src/ast.o] Error 127
npm ERR! gyp ERR! build error 
npm ERR! gyp ERR! stack Error: `make` failed with exit code: 2
npm ERR! gyp ERR! stack     at ChildProcess.onExit (/Projects/CLogin/login-frontend/node_modules/node-gyp/lib/build.js:194:23)
npm ERR! gyp ERR! stack     at ChildProcess.emit (node:events:513:28)
npm ERR! gyp ERR! stack     at ChildProcess._handle.onexit (node:internal/child_process:291:12)
npm ERR! gyp ERR! System Linux 4.18.0-193.28.1.el8_2.x86_64
npm ERR! gyp ERR! command "/program/nvm/nvm-0.39.0/versions/node/v18.12.1/bin/node" "/Projects/CLogin/login-frontend/node_modules/node-gyp/bin/node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library="
npm ERR! gyp ERR! cwd /Projects/CLogin/login-frontend/node_modules/node-sass
npm ERR! gyp ERR! node -v v18.12.1
npm ERR! gyp ERR! node-gyp -v v8.4.1
npm ERR! gyp ERR! not ok 
npm ERR! Build failed with error code: 1

npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2023-01-13T14_02_28_286Z-debug-0.log

如果你遇見這個(gè)問題,我總結(jié)了一些解決方案(并行方案,不是步驟):文章來源地址http://www.zghlxwxcb.cn/news/detail-420900.html

  1. 重新編譯node-sass二進(jìn)制文件:npm rebuild node-sass
  2. 卸載node-sass: npm uninstall node-sass,安裝sass:npm install sass。(用sass替換node-sass)
  3. 刪除node_modules目錄重新npm install
  4. 刪除node_modulespackage-lock.json重新npm install
  5. 查看你的node-sass版本是否對應(yīng)你的node版本(通常會(huì)有報(bào)錯(cuò)node sass does not yet support your current environment: linux 64-bit with unsupported runtime)
Node 版本 node-sass 版本
Node 17 7.0+
Node 16 6.0+
Node 15 5.0+
Node 14 4.14+
Node 13 4.13+, <5.0
Node 12 4.12+
Node 11 4.10+, <5.0
Node 10 4.9+, <6.0
Node 8 4.5.3+, <5.0
Node <8 <5.0
  1. 如果上面的方法都不行,那么你一定要仔細(xì)核對,開發(fā)時(shí)使用的node版本是否和部署時(shí)的一致。注意,并不是簡單查看node版本號,發(fā)現(xiàn)一樣即可,而是要弄清楚你開發(fā)環(huán)境安裝依賴的時(shí)候,使用的node版本是否和服務(wù)器上一致! 如果你使用過nvm之類的版本管理工具,那么把每個(gè)版本都試試,可能你某些時(shí)候切換過,但是忘記了。

到了這里,關(guān)于npm install時(shí)報(bào)一堆錯(cuò)(大致錯(cuò)誤范圍在sass)的文章就介紹完了。如果您還想了解更多內(nèi)容,請?jiān)谟疑辖撬阉鱐OY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!

本文來自互聯(lián)網(wǎng)用戶投稿,該文觀點(diǎn)僅代表作者本人,不代表本站立場。本站僅提供信息存儲(chǔ)空間服務(wù),不擁有所有權(quán),不承擔(dān)相關(guān)法律責(zé)任。如若轉(zhuǎn)載,請注明出處: 如若內(nèi)容造成侵權(quán)/違法違規(guī)/事實(shí)不符,請點(diǎn)擊違法舉報(bào)進(jìn)行投訴反饋,一經(jīng)查實(shí),立即刪除!

領(lǐng)支付寶紅包贊助服務(wù)器費(fèi)用

相關(guān)文章

  • npm install 報(bào)錯(cuò) ERR! gyp ERR! node-sass python

    一、問題描述: npm install 報(bào)錯(cuò) ERR! gyp ERR! ERR! stack Error: Can\\\'t find Python executable \\\"python\\\", you can set the PYTHON env variable node -v v16 node-gyp -v v3.8.0 二、可能原因 1 nodejs與sass版本不匹配(可能性最大:解決辦法見三) node版本是16,sass版本是4.14。重裝的node ,就好了。其他兩個(gè)是調(diào)查時(shí)看到

    2024年02月03日
    瀏覽(101)
  • 執(zhí)行npm install時(shí)老是安裝不成功node-sass的原因和解決方案

    執(zhí)行npm install時(shí)老是安裝不成功node-sass的原因和解決方案

    相信你安裝前端項(xiàng)目所需要的依賴包(npm install 或 yarn install)時(shí),有可能會(huì)出現(xiàn)如下報(bào)錯(cuò): 那么到底是什么原因?qū)е逻@個(gè)問題出現(xiàn)呢? 最多的原因還是 node的版本 和node-sass的版本不一致,比如node版本是 16+的,而你的版本還是舊的 “node-sass”: “^4.14.1”。因?yàn)閚ode并不會(huì)兼容

    2024年02月06日
    瀏覽(42)
  • ? npm install 時(shí)報(bào)Error: spawn git ENOENT

    ? npm install 時(shí)報(bào)Error: spawn git ENOENT

    ? npm install 時(shí)報(bào)Error: spawn git ENOENT 原因: 主要是因?yàn)橛捎?git 的環(huán)境變量未設(shè)置導(dǎo)致,所以安裝一下git 的環(huán)境變量就O了,步驟如下: 設(shè)置 系統(tǒng) 高級系統(tǒng)設(shè)置 高級 環(huán)境變量 系統(tǒng)變量:添加一下git 的安裝地址 在環(huán)境變量的path里添加上 C:Program FilesGitcmd 就可以了。路徑根

    2024年02月04日
    瀏覽(18)
  • 使用 npm install安裝依賴時(shí)報(bào)錯(cuò) npm ERR! Error while executing

    問題描述:vue-element-admin使用 npm install安裝依賴時(shí)報(bào)錯(cuò) npm ERR! Error while executing 解決辦法1:(沒有解決我的問題) 執(zhí)行如下命令: 再執(zhí)行 npm install 就可以了 如果上述命令執(zhí)行完后,還是報(bào)那個(gè)錯(cuò)誤,請繼續(xù)執(zhí)行如下命令,親測有效 解決辦法2:(解決了我的問題!?。。?/p>

    2024年02月11日
    瀏覽(40)
  • 解決npm install時(shí)報(bào)錯(cuò)Could not resolve dependency

    最近在新的項(xiàng)目使用npm install時(shí)發(fā)現(xiàn)報(bào)錯(cuò): npm WARN cli npm v9.6.4 does not support Node.js v15.14.0. This version of npm supports the following node versions: `^14.17.0 || ^16.13.0 || =18.0.0`. You can find the latest version at https://nodejs.org/. npm ERR! code ERESOLVE npm ERR! ERESOLVE could not resolve npm ERR!? npm ERR! While resolving:

    2024年02月08日
    瀏覽(25)
  • 安裝node-sass失敗 或 npm install Error: not found: python2 解決方案

    1. 安裝python2 可以用npm命令安裝 也可以自行下載安裝 Python 2.7 2. 安裝完畢后配置環(huán)境變量 3.再配置一下版本 node-sass 實(shí)在太坑了,之前遇到安裝失敗使用方法一完美解決。最近又一次遇到了,但是方法一又無效了。于是我又在網(wǎng)上找到另一個(gè)方法,就是用 dart-sass 來替換 node

    2024年02月13日
    瀏覽(104)
  • 解決npm install報(bào)錯(cuò) npm ERR! gyp ERR! cwd D:\Projec\xxx\node_modules\node-sass (node-sass版本問題)

    解決npm install報(bào)錯(cuò) npm ERR! gyp ERR! cwd D:\Projec\xxx\node_modules\node-sass (node-sass版本問題)

    vue項(xiàng)目換電腦后npm install發(fā)現(xiàn)一直報(bào)如下的錯(cuò)誤: node-sass版本不兼容,比較老。還出現(xiàn)找不到python路徑的錯(cuò)誤。node-sass 需要 node-gyp安裝時(shí)需要進(jìn)行轉(zhuǎn)譯所以可能會(huì)出現(xiàn)各種按安裝問題。且node-sass 本身就已經(jīng)是deprecated狀態(tài)了。如果不是維護(hù)老項(xiàng)目不建議再使用 由于它只用于開

    2024年02月09日
    瀏覽(28)
  • npm install時(shí)出現(xiàn)的問題Failed at the node-sass@4.14.1 postinstall script

    npm install時(shí)出現(xiàn)的問題Failed at the node-sass@4.14.1 postinstall script

    從阿里云上拉取下來項(xiàng)目后,首先使用npm install 命令進(jìn)行安裝所需依賴,意想不到的事情發(fā)生了,報(bào)出了Failed at the node-sass@4.14.1 postinstall script,這個(gè)問題,頓時(shí)一臉懵逼;詢問前端大佬,給出的反饋是,“沒法解決”,這時(shí)我有點(diǎn)不知所措了,大佬都說沒法解決了。 ?但是我

    2024年02月14日
    瀏覽(21)
  • 快速解決 npm 安裝 node-sass 速度慢/錯(cuò)誤的問題(nexus私服問題見上一篇博客)

    這通常是因?yàn)?node-sass 包中包含有本地二進(jìn)制文件( _binding.node ),而在某些情況下,下載過程可能會(huì)失敗。 以下是一些可能的解決方法: 1. 使用淘寶鏡像 你可以嘗試使用淘寶的 cnpm 命令行工具,該工具使用淘寶的鏡像源,可以解決部分下載問題。首先,安裝 cnpm : 然后使

    2024年02月03日
    瀏覽(23)
  • npm install錯(cuò)誤——npm ERR! code ERESOLVE 解決方法(親測有效)

    npm install錯(cuò)誤——npm ERR! code ERESOLVE 解決方法(親測有效)

    最近node用nvm來管理,nvm安裝在這里 ? nvm的環(huán)境變量 ? path中配置 ? ? ? 正在使用的node版本的軟連接在這里 ?vue項(xiàng)目執(zhí)行npm install的時(shí)候報(bào)如下錯(cuò)誤 添加--legacy-peer-deps即可正常 ? ? ? ? ? ? ? ?

    2024年02月14日
    瀏覽(21)

覺得文章有用就打賞一下文章作者

支付寶掃一掃打賞

博客贊助

微信掃一掃打賞

請作者喝杯咖啡吧~博客贊助

支付寶掃一掃領(lǐng)取紅包,優(yōu)惠每天領(lǐng)

二維碼1

領(lǐng)取紅包

二維碼2

領(lǐng)紅包