問(wèn)題描述
所以我一直在嘗試安裝 gulp
并且不斷收到:
So I've been trying to install gulp
and I keep getting:
module.js:471^throw err : 找不到模塊 'C:cUsersJoe's Steezy筆記本電腦AppDataRoaming pm ode_modulesgulp-cliingulp.js'
module.js:471^throw err : cannot find module 'C:cUsersJoe's Steezy LaptopAppDataRoaming pm ode_modulesgulp-cliingulp.js'
如您所見(jiàn),我的 username
中有空格,我讀到 npm
無(wú)法讀取有空格的路徑.我的問(wèn)題是我該如何解決這個(gè)問(wèn)題?我知道有執(zhí)行符號(hào)鏈接
的選項(xiàng),并且有一個(gè)選項(xiàng)可以創(chuàng)建一個(gè)全新的用戶并確保用戶名文件夾這次沒(méi)有任何空格.
As you can see my username
has spaces in it and I read that npm
cant read paths that have spaces. my question is how do i fix this? I know theres the option to do symbolic links
, and there is an option to make a whole new user and make sure the username folder doesn't have any spaces in it this time.
還有其他方法可以做到這一點(diǎn)嗎?我對(duì)自己沒(méi)有足夠的信心來(lái)做一個(gè) symbolic link
因?yàn)槲易x到如果你把它搞砸了,它真的會(huì)搞砸你的系統(tǒng).我也不想在我的筆記本電腦上創(chuàng)建一個(gè)全新的用戶,因?yàn)槟菢游揖捅仨氈匦掳惭b我所有的程序,這太糟糕了.如果有人可以提供幫助,將不勝感激!
Is there another way I can do this? I don't trust myself enough to do a symbolic link
because i read that it can really mess up your system if you mess it up. I also don't really want to make a whole new user on my laptop because then i have to install all my programs all over again which kind of sucks. Please if anyone can help, it would be much appreciated!
推薦答案
這適用于 windows
.您可以在環(huán)境變量中使用短路徑名,例如使用 "C:PROGRA~1
odejs"
而不是 "C:Progam Files
odejs"
.
This works for windows
. You can use the short path name in the environment variable, e.g. use "C:PROGRA~1
odejs"
instead of "C:Progam Files
odejs"
.
您可以通過(guò)在父文件夾中執(zhí)行 dir/x
找到正確的文件夾短名稱.
You can find out the correct short name of your folder by executing dir /x
in the parent folder.
這篇關(guān)于PATH npm 中的空格的文章就介紹到這了,希望我們推薦的答案對(duì)大家有所幫助,也希望大家多多支持html5模板網(wǎng)!