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

npm install報(bào)錯(cuò),解決記錄

這篇具有很好參考價(jià)值的文章主要介紹了npm install報(bào)錯(cuò),解決記錄。希望對(duì)大家有所幫助。如果存在錯(cuò)誤或未考慮完全的地方,請(qǐng)大家不吝賜教,您也可以點(diǎn)擊"舉報(bào)違法"按鈕提交疑問(wèn)。

npm install報(bào)錯(cuò),解決記錄,VUE,npm,前端,node.js,npm install報(bào)錯(cuò)

第一步:檢查和安裝?

我這里建議檢查

1.node.js版本是否和前使用版本一致

2.npm版本是否和前使用版本一致

3.vue版本是否和前使用版本一致

4.vue腳手架是否和前使用版本一致

5.npm鏡像是否和前使用版本一致

?1.檢查版本

【node版本】
命令:node -v
結(jié)果:v16.13.0 (我目前使用的版本)


【npm版本】
命令:npm -v
結(jié)果:8.1.0


【cnpm版本】
命令:cnpm -v
結(jié)果:cnpm@6.1.1


【npm映射網(wǎng)址(鏡像網(wǎng)址)】
命令:npm config get registry
結(jié)果:https://registry.npmjs.org/ (我這里是官方默認(rèn)鏡像)


【vue腳手架版本】

命令:vue -V
結(jié)果:
@vue/cli 4.5.6
"vue": "^2.5.2",

?2.安裝版本

【安裝指定版本的vue,需要卸載最新版本的vue】
npm uninstall -g @vue/cli

【安裝指定的vue版本腳手架】
npm install -g @vue/cli@4.5.6

【安裝指定的vue版本】
npm install vue@2.x.x

第二步:查看鏡像源配置

1.查看當(dāng)前使用的鏡像地址:

npm config get registry

2.官方默認(rèn)全局鏡像

https://registry.npmjs.org

3.設(shè)置鏡像源:

npm config set registry https://registry.npm.taobao.org

4.官方默認(rèn)全局鏡像

https://registry.npmjs.org

5.給項(xiàng)目單獨(dú)配置npm鏡像源

項(xiàng)目根目錄的 .npmrc 的配置,優(yōu)先級(jí)最高,且隨著項(xiàng)目一起,可以免去因不同開發(fā)者的電腦的環(huán)境配置不同而導(dǎo)致的依賴下載異常的問(wèn)題;實(shí)際開發(fā)中也推薦在根目錄下配置一份,可以給每個(gè)項(xiàng)目配置不同的鏡像,項(xiàng)目之間的配置互不影響。

.npmrc文件中寫如下內(nèi)容:

# 配置 npm 的默認(rèn)鏡像源為淘寶鏡像源
registry = "https://registry.npm.taobao.org"

6.常用鏡像源

# 淘寶鏡像源
https://registry.npmmirror.com
https://registry.npm.taobao.org

# 騰訊云鏡像源
http://mirrors.cloud.tencent.com/npm/

# 華為云鏡像源
https://mirrors.huaweicloud.com/repository/npm/

# 官方默認(rèn)全局鏡像
https://registry.npmjs.org

第三步:初始化項(xiàng)目

npm install

1.初始化報(bào)錯(cuò)

npm install報(bào)錯(cuò),解決記錄,VUE,npm,前端,node.js,npm install報(bào)錯(cuò)

npm install報(bào)錯(cuò),解決記錄,VUE,npm,前端,node.js,npm install報(bào)錯(cuò)

npm install報(bào)錯(cuò),解決記錄,VUE,npm,前端,node.js,npm install報(bào)錯(cuò)

D:\projects\項(xiàng)目目錄>npm install
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 source-map-url@0.4.1: See https://github.com/lydell/source-map-url#deprecated
npm WARN deprecated flatten@1.0.3: flatten is deprecated in favor of utility frameworks such as lodash.
npm WARN deprecated urix@0.1.0: Please see https://github.com/lydell/urix#deprecated
npm WARN deprecated har-validator@5.1.5: this library is no longer supported
npm WARN deprecated browserslist@1.7.7: Browserslist 2 could fail on reading Browserslist >3.0 config used in other tools.
npm WARN deprecated browserslist@1.7.7: Browserslist 2 could fail on reading Browserslist >3.0 config used in other tools.
npm WARN deprecated browserslist@1.7.7: Browserslist 2 could fail on reading Browserslist >3.0 config used in other tools.
npm WARN deprecated acorn-dynamic-import@2.0.2: This is probably built in to whatever tool you're using. If you still need it... idk
npm WARN deprecated source-map-resolve@0.5.3: See https://github.com/lydell/source-map-resolve#deprecated
npm WARN deprecated chokidar@2.1.8: Chokidar 2 does not receive security updates since 2019. Upgrade to chokidar 3 with 15x fewer dependencies
npm WARN deprecated chokidar@2.1.8: Chokidar 2 does not receive security updates since 2019. Upgrade to chokidar 3 with 15x fewer dependencies
npm WARN deprecated resolve-url@0.2.1: https://github.com/lydell/resolve-url#deprecated
npm WARN deprecated browserslist@2.11.3: Browserslist 2 could fail on reading Browserslist >3.0 config used in other tools.
npm WARN deprecated consolidate@0.14.5: Please upgrade to consolidate v1.0.0+ as it has been modernized with several long-awaited fixes implemented. Maintenance is supported by Forward Email at https://forwardemail.net ; follow/watch https://github.com/ladjs/consolidate for updates and release changelog
npm WARN deprecated html-webpack-plugin@2.30.1: out of support
npm WARN deprecated extract-text-webpack-plugin@3.0.2: Deprecated. Please use https://github.com/webpack-contrib/mini-css-extract-plugin
npm WARN deprecated shvl@2.0.3: older versions vulnerable to prototype pollution
npm WARN deprecated vuex-persistedstate@4.1.0: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.
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 uglify-es@3.3.9: support for ECMAScript is superseded by `uglify-js` as of v3.13.0
npm WARN deprecated bfj-node4@5.3.1: Switch to the `bfj` package for fixes and new features!
npm WARN deprecated svgo@0.7.2: This SVGO version is no longer supported. Upgrade to v2.x.x.
npm WARN deprecated svgo@1.3.2: This SVGO version is no longer supported. Upgrade to v2.x.x.
npm WARN deprecated core-js@2.6.12: 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.
npm ERR! code 1
npm ERR! path D:\projects\項(xiàng)目目錄\node_modules\node-sass
npm ERR! command failed
npm ERR! command C:\Windows\system32\cmd.exe /d /s /c node scripts/build.js
npm ERR! Building: C:\Program Files\nodejs\node.exe D:\projects\項(xiàng)目目錄\node_modules\node-gyp\bin\node-gyp.js rebuild --verbose --libsass_ext= --libsass_cflags= --libsass_ldflags= --libsass_library=
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp verb cli [
npm ERR! gyp verb cli   'C:\\Program Files\\nodejs\\node.exe',
npm ERR! gyp verb cli   'D:項(xiàng)目目錄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@7.1.2
npm ERR! gyp info using node@16.13.0 | win32 | 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 - "python3" is not in PATH or produced an error
npm ERR! gyp verb find Python checking if "python" can be used
npm ERR! gyp verb find Python - executing "python" to get executable path
npm ERR! gyp verb find Python - executable path is "C:\Users\cpeng\AppData\Local\Programs\Python\Python38-32\python.exe"
npm ERR! gyp verb find Python - executing "C:\Users\cpeng\AppData\Local\Programs\Python\Python38-32\python.exe" to get version
npm ERR! gyp verb find Python - version is "3.8.5"
npm ERR! gyp info find Python using Python version 3.8.5 found at "C:\Users\cpeng\AppData\Local\Programs\Python\Python38-32\python.exe"
npm ERR! gyp verb get node dir no --target version specified, falling back to host node version: 16.13.0
npm ERR! gyp verb command install [ '16.13.0' ]
npm ERR! gyp verb install input version string "16.13.0"
npm ERR! gyp verb install installing version: 16.13.0
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: 16.13.0
npm ERR! gyp verb build dir attempting to create "build" dir: D:\projects\項(xiàng)目目錄\node_modules\node-sass\build
npm ERR! gyp verb build dir "build" dir needed to be created? D:\projects\項(xiàng)目目錄\node_modules\node-sass\build
npm ERR! gyp verb find VS msvs_version not set from command line or npm config
npm ERR! gyp verb find VS VCINSTALLDIR not set, not running in VS Command Prompt
npm ERR! gyp verb find VS checking VS2017 (15.9.28307.1216) found at:
npm ERR! gyp verb find VS "C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise"
npm ERR! gyp verb find VS - found "Visual Studio C++ core features"
npm ERR! gyp verb find VS - missing any VC++ toolset
npm ERR! gyp verb find VS could not find a version of Visual Studio 2017 or newer to use
npm ERR! gyp verb find VS looking for Visual Studio 2015
npm ERR! gyp verb find VS - not found
npm ERR! gyp verb find VS not looking for VS2013 as it is only supported up to Node.js 8
npm ERR! gyp ERR! find VS
npm ERR! gyp ERR! find VS msvs_version not set from command line or npm config
npm ERR! gyp ERR! find VS VCINSTALLDIR not set, not running in VS Command Prompt
npm ERR! gyp ERR! find VS checking VS2017 (15.9.28307.1216) found at:
npm ERR! gyp ERR! find VS "C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise"
npm ERR! gyp ERR! find VS - found "Visual Studio C++ core features"
npm ERR! gyp ERR! find VS - missing any VC++ toolset
npm ERR! gyp ERR! find VS could not find a version of Visual Studio 2017 or newer to use
npm ERR! gyp ERR! find VS looking for Visual Studio 2015
npm ERR! gyp ERR! find VS - not found
npm ERR! gyp ERR! find VS not looking for VS2013 as it is only supported up to Node.js 8
npm ERR! gyp ERR! find VS
npm ERR! gyp ERR! find VS **************************************************************
npm ERR! gyp ERR! find VS You need to install the latest version of Visual Studio
npm ERR! gyp ERR! find VS including the "Desktop development with C++" workload.
npm ERR! gyp ERR! find VS For more information consult the documentation at:
npm ERR! gyp ERR! find VS https://github.com/nodejs/node-gyp#on-windows
npm ERR! gyp ERR! find VS **************************************************************
npm ERR! gyp ERR! find VS
npm ERR! gyp ERR! configure error
npm ERR! gyp ERR! stack Error: Could not find any Visual Studio installation to use
npm ERR! gyp ERR! stack     at VisualStudioFinder.fail (D:\projects\項(xiàng)目目錄\node_modules\node-gyp\lib\find-visualstudio.js:121:47)
npm ERR! gyp ERR! stack     at D:\projects\項(xiàng)目目錄\node_modules\node-gyp\lib\find-visualstudio.js:74:16
npm ERR! gyp ERR! stack     at VisualStudioFinder.findVisualStudio2013 (D:\projects\項(xiàng)目目錄\node_modules\node-gyp\lib\find-visualstudio.js:351:14)
npm ERR! gyp ERR! stack     at D:\projects\項(xiàng)目目錄\node_modules\node-gyp\lib\find-visualstudio.js:70:14
npm ERR! gyp ERR! stack     at D:\projects\項(xiàng)目目錄\node_modules\node-gyp\lib\find-visualstudio.js:372:16
npm ERR! gyp ERR! stack     at D:\projects\項(xiàng)目目錄\node_modules\node-gyp\lib\util.js:54:7
npm ERR! gyp ERR! stack     at D:\projects\項(xiàng)目目錄\node_modules\node-gyp\lib\util.js:33:16
npm ERR! gyp ERR! stack     at ChildProcess.exithandler (node:child_process:404:5)
npm ERR! gyp ERR! stack     at ChildProcess.emit (node:events:390:28)
npm ERR! gyp ERR! stack     at maybeClose (node:internal/child_process:1064:16)
npm ERR! gyp ERR! System Windows_NT 10.0.18362
npm ERR! gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "D:項(xiàng)目目錄node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library="
npm ERR! gyp ERR! cwd D:\projects\項(xiàng)目目錄\node_modules\node-sass
npm ERR! gyp ERR! node -v v16.13.0
npm ERR! gyp ERR! node-gyp -v v7.1.2
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!     C:\Users\cpeng\AppData\Local\npm-cache\_logs\2023-10-28T06_05_05_750Z-debug.log

D:\projects\項(xiàng)目目錄>

2.清理緩存

npm cache clean --force

運(yùn)行后提示

npm install報(bào)錯(cuò),解決記錄,VUE,npm,前端,node.js,npm install報(bào)錯(cuò)

npm WARN using --force Recommended protections disabled.

意思是?

npm WARN using——force禁用推薦保護(hù)。

繼續(xù)執(zhí)行下面命令

npm cache verify

npm install報(bào)錯(cuò),解決記錄,VUE,npm,前端,node.js,npm install報(bào)錯(cuò)

刪除 “node_modules”文件夾,重新安裝,運(yùn)行

npm install

此時(shí)我的安裝還是報(bào)錯(cuò) ,錯(cuò)誤和上面一致。

原本我想著他總是說(shuō) 【node-sass】的問(wèn)題

npm ERR! path D:\projects\項(xiàng)目目錄\node_modules\node-sass

我根據(jù)【package.json】文件里的

 "node-sass": "^6.0.1",

想著單獨(dú)安裝下“node-sass”,下面命令的意思是,安裝“node-sass”版本號(hào)是6.0.1

npm i node-sass@6.0.1

結(jié)果安裝后還是報(bào)錯(cuò),和上面的錯(cuò)誤一致

3.我開始懷疑是下面的這個(gè)錯(cuò)誤引起的

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 - "python3" is not in PATH or produced an error
npm ERR! gyp verb find Python checking if "python" can be used
npm ERR! gyp verb find Python - executing "python" to get executable path
npm ERR! gyp verb find Python - executable path is "C:\Users\cpeng\AppData\Local\Programs\Python\Python38-32\python.exe"
npm ERR! gyp verb find Python - executing "C:\Users\cpeng\AppData\Local\Programs\Python\Python38-32\python.exe" to get version
npm ERR! gyp verb find Python - version is "3.8.5"
npm ERR! gyp info find Python using Python version 3.8.5 found at "C:\Users\cpeng\AppData\Local\Programs\Python\Python38-32\python.exe"
npm ERR! gyp verb get node dir no --target version specified, falling back to host node version: 16.13.0

譯文

npm ERR!gyp謂詞find Python Python不是從命令行或npm配置中設(shè)置的

npm ERR!gyp動(dòng)詞find Python Python不是從環(huán)境變量Python中設(shè)置的

npm ERR!gyp動(dòng)詞find Python檢查是否可以使用“python3”

npm ERR!gyp動(dòng)詞find Python-執(zhí)行“python3”以獲取可執(zhí)行路徑

npm ERR!gyp動(dòng)詞find Python-“python3”不在PATH中或產(chǎn)生錯(cuò)誤

npm ERR!gyp動(dòng)詞find Python檢查是否可以使用“Python”

npm ERR!gyp動(dòng)詞find Python-執(zhí)行“Python”以獲取可執(zhí)行路徑

npm ERR!gyp動(dòng)詞find Python-可執(zhí)行路徑為“C:\Users\cpeng\AppData\Local\Programs\Python\Python38-32\Python.exe”

npm ERR!gyp動(dòng)詞查找Python-執(zhí)行“C:\Users\cpeng\AppData\Local\Programs\Python\Python38-32\Python.exe”以獲取版本

npm ERR!gyp動(dòng)詞find Python-版本為“3.8.5”

npm ERR!gyp info使用Python版本3.8.5查找Python,位于“C:\Users\cpeng\AppData\Local\Programs\Python\Python38-32\Python.exe”

npm ERR!gyp謂詞get node dir no--target

因?yàn)槲蚁到y(tǒng)之前裝了python??

下面命令的意思是 修改 npm的python命令指向,我安裝的python

npm config set python C:\Users\cpeng\AppData\Local\Programs\Python\Python38-32\python.exe

?查看?python路徑

我的電腦》屬性》高級(jí)系統(tǒng)設(shè)置》高級(jí)》環(huán)境變量

npm install報(bào)錯(cuò),解決記錄,VUE,npm,前端,node.js,npm install報(bào)錯(cuò)

npm install報(bào)錯(cuò),解決記錄,VUE,npm,前端,node.js,npm install報(bào)錯(cuò)

用戶變量》Path(選定這個(gè))》點(diǎn)擊“編輯”》就可以看到Python的安裝地址了

npm install報(bào)錯(cuò),解決記錄,VUE,npm,前端,node.js,npm install報(bào)錯(cuò)

npm install報(bào)錯(cuò),解決記錄,VUE,npm,前端,node.js,npm install報(bào)錯(cuò)

第四步:怎么刪除node_modules

1、安裝npm包–rimraf,很小的一個(gè)工具包

npm install rimraf -g

2、在cmd指令下,進(jìn)入所需刪除的node_modules文件夾的位置(路徑)

在VScode等開發(fā)工具的終端進(jìn)入到對(duì)應(yīng)位置(路徑)

3、輸入以下指令進(jìn)行刪除

rimraf node_modules

這樣就可以快捷且方便地刪除到node_modules啦!

最后:說(shuō)說(shuō)是怎么解決的

1.我卸載了我電腦的python ,然后重啟的電腦

2.清理緩存

使用【第三步】的2清理緩存

3.檢查了npm的鏡像

請(qǐng)看【第二步】

4.設(shè)置成淘寶鏡像源

請(qǐng)看【第二步】

5.刪除node_modules

快速刪除,請(qǐng)看【第四步】

6.執(zhí)行安裝命令

npm install --save

7.執(zhí)行運(yùn)行命令

npm run dev

就成功啟動(dòng)項(xiàng)目了


?老師的解惑

npm install報(bào)錯(cuò),解決記錄,VUE,npm,前端,node.js,npm install報(bào)錯(cuò)

npm install報(bào)錯(cuò),解決記錄,VUE,npm,前端,node.js,npm install報(bào)錯(cuò)

老師博客地址:全棧ACE的個(gè)人空間-全棧ACE個(gè)人主頁(yè)-嗶哩嗶哩視頻

我:

老師 我設(shè)置 npm的鏡像源地址為淘寶的鏡像后, ?我的npm 指令 走的就是淘寶了嗎?

ACE老師:

不是

它就相當(dāng)于它的這個(gè)安裝包放在國(guó)內(nèi)還是國(guó)外,國(guó)內(nèi)的話就放在淘寶的服務(wù)器里面,所以稱之為淘寶鏡像源

安裝插件的時(shí)候,它的地址都是在淘寶的服務(wù)器里。所以我們安裝的速度就很快。

如果不配置鏡像源,他是在國(guó)外那么下載起來(lái)就很慢。

我:

我一直以為,淘寶鏡像https://registry.npm.taobao.org是鏡像https://registry.npmjs.org的內(nèi)容;類似于cdn加速一樣

我理解錯(cuò)了

謝謝 老師解惑

?npm install報(bào)錯(cuò),解決記錄,VUE,npm,前端,node.js,npm install報(bào)錯(cuò)

以上截圖內(nèi)容,都是ace老師視頻,且視頻都是免費(fèi)觀看;

ace老師這個(gè)人很“極客”,

作者希望,感興趣的有緣人,有空可以去看看,來(lái)增加自己的知識(shí)儲(chǔ)備量。

另外,感恩ACE老師無(wú)償分享

地址:全棧ACE的個(gè)人空間-全棧ACE個(gè)人主頁(yè)-嗶哩嗶哩視頻?文章來(lái)源地址http://www.zghlxwxcb.cn/news/detail-721535.html

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

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

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

相關(guān)文章

  • 記錄vue之npm run serve報(bào)錯(cuò)SET NODE_OPTIONS

    記錄vue之npm run serve報(bào)錯(cuò)SET NODE_OPTIONS

    一定要注意: 將 SET NODE_OPTIONS=–openssl-legacy-provider 刪除即可

    2024年04月14日
    瀏覽(34)
  • 【解決問(wèn)題】Vue 項(xiàng)目中安裝依賴 npm install 一直報(bào)錯(cuò)

    【解決問(wèn)題】Vue 項(xiàng)目中安裝依賴 npm install 一直報(bào)錯(cuò)

    在 GitHub 上面找了幾個(gè)項(xiàng)目,下載下來(lái)想執(zhí)行以下,首先根據(jù) README 文檔進(jìn)行安裝依賴: 但接下來(lái)就一直報(bào)錯(cuò),報(bào)錯(cuò)信息如下: 搜尋了好多種解決方法,依然不行,最后看到一篇博客說(shuō)是 ?C盤 User 文件夾中的??.npmrc 文件 的問(wèn)題,于是我嘗試刪除該文件,再次進(jìn)行? npm inst

    2024年02月02日
    瀏覽(41)
  • 【Node.js】解決執(zhí)行npm命令報(bào)錯(cuò):命令語(yǔ)法不正確

    List item 問(wèn)題:執(zhí)行npm命令報(bào)錯(cuò):命令語(yǔ)法不正確 分析:由于更改了npm prefix文件中的全局安裝路徑,導(dǎo)致config混亂 解決辦法:刪除C盤中的 .npmrc 文件,具體文件路徑可基于我的進(jìn)行參考 注意:用戶名填寫自己的。刪除之后全卷安裝路徑會(huì)恢復(fù)到默認(rèn)路徑。

    2024年03月24日
    瀏覽(24)
  • 深入解析npm ERR! cwebp-bin@6.1.2 postinstall: `node lib/install.js`錯(cuò)誤及解決方案

    在開發(fā)過(guò)程中,我們經(jīng)常會(huì)遇到各種各樣的錯(cuò)誤。其中,npm ERR! cwebp-bin@6.1.2 postinstall: node lib/install.js 是一個(gè)比較常見的錯(cuò)誤。本文將詳細(xì)介紹這個(gè)錯(cuò)誤的產(chǎn)生原因以及解決方案。 首先,我們需要了解這個(gè)錯(cuò)誤的含義。npm ERR! cwebp-bin@6.1.2 postinstall: node lib/install.js 表示在安裝

    2024年02月02日
    瀏覽(183)
  • 項(xiàng)目依賴安裝node-sass@^4.14.1 run “node scripts/install.js“報(bào)錯(cuò)問(wèn)題解決

    項(xiàng)目依賴安裝node-sass@^4.14.1 run “node scripts/install.js“報(bào)錯(cuò)問(wèn)題解決

    很久沒運(yùn)行的項(xiàng)目突然依賴下載報(bào)錯(cuò),讓我很頭疼,之前都是運(yùn)行正常的,于是就是開找解決辦法。 依賴下載遇到的報(bào)錯(cuò)?。?! scripts.install node-sass@^4.14.1 run “node scripts/install.js”: 大概意思就是這個(gè)地址已經(jīng)不能下載了,需要你下載到本地并且做一個(gè)代理: 第一步: nod

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

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

    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)各種按安裝問(wèn)題。且node-sass 本身就已經(jīng)是deprecated狀態(tài)了。如果不是維護(hù)老項(xiàng)目不建議再使用 由于它只用于開

    2024年02月09日
    瀏覽(28)
  • 解決npm install報(bào)錯(cuò)npm ERR Unsupported URL Type “npm:“: npm:vue-loader@^16.1.0 問(wèn)題

    node版本以及npm版本太舊會(huì)造成這個(gè)問(wèn)題 1.下載安裝nvm 網(wǎng)址:Releases · coreybutler/nvm-windows · GitHub 2.安裝 后使用nvm命令安裝切換node版本 安裝node版本: 等待安裝完成,使用命令切換版本 3.如遇到切換完版本idea提示無(wú)法識(shí)別npm命令,重啟idea即可

    2024年04月15日
    瀏覽(42)
  • 前端筆記10——Win7下node.js和npm版本兼容性問(wèn)題解決。

    前端筆記10——Win7下node.js和npm版本兼容性問(wèn)題解決。

    新版本node.js不支持WIN7。 Win7的電腦只能支持到Node v13.14.0。 可能之前裝了新版本的node,刪了重裝后,導(dǎo)致運(yùn)行npm命令老是提醒信息,說(shuō)是不支持node版本。 npm does not support Node.js v13.14.0 可是顯示版本正常 解決方法: 卸載node之后,在把npm和npm cache兩個(gè)文件夾刪掉。 刪干凈后再

    2024年02月15日
    瀏覽(40)
  • node.js 打開低版本的npm項(xiàng)目報(bào)錯(cuò)以及升級(jí)包依賴解決方案

    npm-check|升級(jí)你的 node 項(xiàng)目中依賴庫(kù)最佳方案 - 知乎 (zhihu.com) (128條消息) npm install 安裝失敗常見問(wèn)題解決辦法_npm install安裝失敗_tester_sz的博客-CSDN博客 (128條消息) 解決nodejs報(bào)錯(cuò) :Cannot find module \\\'xxx\\\'的問(wèn)題 。(自己總結(jié)的,親測(cè)有效)_cannot find module \\\'node:module_10Alexander01的博

    2024年02月11日
    瀏覽(19)
  • 「Electron|問(wèn)題記錄」解決npm install electron --save-dev 各種下載速度過(guò)慢、超時(shí)或者報(bào)錯(cuò)等問(wèn)題

    本文主要記錄安裝electron時(shí)遇到的問(wèn)題以及最終幫助我解決這些問(wèn)題的方案。 開始搗鼓桌面端,想著希望web端和桌面端同時(shí)迭代,代碼復(fù)用性可以強(qiáng)一點(diǎn),選擇了Electron作為技術(shù)選型??上г谕ㄟ^(guò)npm下載eletron的時(shí)候遇先后遇到幾個(gè)報(bào)錯(cuò): RequestError: connect ETIMEDOUT 185.199.109.133

    2024年02月16日
    瀏覽(42)

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

支付寶掃一掃打賞

博客贊助

微信掃一掃打賞

請(qǐng)作者喝杯咖啡吧~博客贊助

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

二維碼1

領(lǐng)取紅包

二維碼2

領(lǐng)紅包