Dev Env – 挨踢攻城獅學習之路 https://blog.cwlove.idv.tw 不太詳細紀錄 Sat, 16 Jan 2021 00:38:34 +0000 zh-TW hourly 1 WSL2:運行 npm install 錯誤 https://blog.cwlove.idv.tw/wsl2-npm-install-no-such-file-or-directory/ https://blog.cwlove.idv.tw/wsl2-npm-install-no-such-file-or-directory/#respond Sat, 16 Jan 2021 00:29:56 +0000 https://blog.cwlove.idv.tw/?p=2131 錯誤提示:-bash: /mnt/c/Program Files/nodejs/npm: /bin/sh^M: bad interpreter: No such file or directory
餵狗得到這篇解法:Cannot run NPM Commands

看覺得是環境變數問題,所以照著操作確認
$ echo $PATH
得到/mnt/c… 等許多for Windows 用的路徑,因此需要調整為 WSL 下使用的,參考解答

$ vim ~/.bashrc
加入 PATH=$(echo “$PATH” | sed -e ‘s/:\/mnt.*//g’) # strip out problematic Windows %PATH%
完成後
source ~/.bashrc

$ echo $PATH
/home/qoo/go/bin:/usr/lib/go-1.15/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games

就可以順利 $ npm install 了

]]>
https://blog.cwlove.idv.tw/wsl2-npm-install-no-such-file-or-directory/feed/ 0
IDE:Emmet for Visual Studio https://blog.cwlove.idv.tw/emmet-for-visual-studio-ide/ https://blog.cwlove.idv.tw/emmet-for-visual-studio-ide/#respond Sat, 12 Oct 2019 16:05:50 +0000 https://blog.cwlove.idv.tw/?p=1747 Visual Studio IDE內寫HTML實在辛苦,習慣用div#col-lg-6*2 這類寫法
在VS IDE上都得照實產出<div></div> 再去設定id、class 完成後再複製或重打,很浪費時間

今天總算受不了爬文了一下!如果你有跟我一樣困擾 ,可試試我爬到的結果: ZenCoding
參考來源:How to use Emmet for visual studio 2017 IDE

]]>
https://blog.cwlove.idv.tw/emmet-for-visual-studio-ide/feed/ 0
XAMPP(mac): Apache Index of / 索引亂碼 https://blog.cwlove.idv.tw/xamppmac%ef%bc%9a-apache-index-of-%e7%b4%a2%e5%bc%95%e4%ba%82%e7%a2%bc/ https://blog.cwlove.idv.tw/xamppmac%ef%bc%9a-apache-index-of-%e7%b4%a2%e5%bc%95%e4%ba%82%e7%a2%bc/#respond Thu, 31 Jan 2019 03:22:21 +0000 https://blog.cwlove.idv.tw/?p=1039 如圖畫面,預設會亂碼,但在XAMPP(win)沒碰到

修改/Applications/XAMPP/xamppfiles/etc/httpd.conf,在網頁目錄下加入
IndexOptions Charset=UTF-8
存檔後
restart Apache Web Server即可

]]>
https://blog.cwlove.idv.tw/xamppmac%ef%bc%9a-apache-index-of-%e7%b4%a2%e5%bc%95%e4%ba%82%e7%a2%bc/feed/ 0
XAMPP(win):Apache 索引檔名長度導致亂碼問題 https://blog.cwlove.idv.tw/xampp-apache-index/ https://blog.cwlove.idv.tw/xampp-apache-index/#respond Sun, 06 Jan 2019 05:03:43 +0000 https://blog.cwlove.idv.tw/?p=871 碰到狀況如下圖,查看短檔名的沒問題,長檔名的尾部就呈現亂碼

Google了下,解法就是修改httpd-autoindex.con內
IndexOptions FancyIndexing HTMLTable VersionSort
這段後面加入NameWidth=*
IndexOptions FancyIndexing HTMLTable VersionSort NameWidth=*
重啟服務即解決

]]>
https://blog.cwlove.idv.tw/xampp-apache-index/feed/ 0