我試圖運行一個gulp腳本。但我得到這個權限相關的錯誤。Windows 10完全無法打開js文件,訪問被拒絕
fs.js:584
return binding.open(pathModule._makeLong(path), stringToFlags(flags), mode);
^
Error: EPERM: operation not permitted, open 'd:\CODE\project\node_modules\ttf2woff2\jssrc\ttf2woff2.js'
at Error (native)
at Object.fs.openSync (fs.js:584:18)
at Object.fs.readFileSync (fs.js:431:33)
at Object.Module._extensions..js (module.js:421:20)
at Module.load (module.js:357:32)
at Function.Module._load (module.js:314:12)
at Module.require (module.js:367:17)
at require (internal/module.js:16:19)
at Object.<anonymous> (d:\CODE\project\node_modules\ttf2woff2\jssrc\index.js:3:27)
at Module._compile (module.js:413:34)
我的操作系統:Windows 10
節點版本:v5.9.1
我設置project
文件夾的權限通過Windows和我的文件夾安全遞歸讀取所有用戶/寫已經嘗試作爲管理員運行吞噬任務。
更多信息
當我嘗試在記事本中打開ttf2woff2\jssrc\ttf2woff2.js
管理員我得到:You don't have permission to open this file, contact the file owner or an administrator to obtain permission
。
- 我已經採取了我創建了一個許可規則
Everyone
文件 - 的全部股權具有完全訪問權限
- 我已經通過
cmd
試圖複製文件以管理員身份到另一個目錄,但得到的訪問被拒絕。 - 我試過通過chrome而不是通過npm下載file direct from github,仍然無法打開它。
- 我已禁用UAC
- 我試過在git上查看原始代碼並將其複製到我創建的文件中。這在運行gulp任務時只是給了我一個javascript錯誤,我懷疑它是如何顯示所有代碼的,因爲它的縮進讓我認爲它在44k行被切斷。
仍然無法進入它。
現在有完全相同的問題。你有沒有找到解決方案? – Riduidel