我在Windows 7上有一個RN開發環境。它運行良好,直到昨天它突然報告錯誤,本機「開始。 錯誤消息:react-native啓動報告:錯誤:UNKNOWN:未知錯誤,打開... 。babel.json
[2016-12-26 09:58:17] HMR Server listening on /hot
React packager ready.
fs.js:557
return binding.open(pathModule._makeLong(path), stringToFlags(flags), mode);
^
Error: UNKNOWN: unknown error, open 'C:\Users\xitao\.babel.json'
at Object.fs.openSync (fs.js:557:18)
at Object.fs.writeFileSync (fs.js:1222:33)
at save (C:\RN\LearnRN\node_modules\babel-register\lib\cache.js:45:16)
at _combinedTickCallback (internal/process/next_tick.js:67:7)
at process._tickCallback (internal/process/next_tick.js:98:9)
fs.js:557
return binding.open(pathModule._makeLong(path), stringToFlags(flags), mode);
^
Error: UNKNOWN: unknown error, open 'C:\Users\xitao\.babel.json'
at Object.fs.openSync (fs.js:557:18)
at Object.fs.writeFileSync (fs.js:1222:33)
at save (C:\RN\LearnRN\node_modules\babel-register\lib\cache.js:45:16)
at _combinedTickCallback (internal/process/next_tick.js:67:7)
at process._tickCallback (internal/process/next_tick.js:98:9)
fs.js:557
return binding.open(pathModule._makeLong(path), stringToFlags(flags), mode);
^
Error: UNKNOWN: unknown error, open 'C:\Users\xitao\.babel.json'
at Object.fs.openSync (fs.js:557:18)
at Object.fs.writeFileSync (fs.js:1222:33)
at save (C:\RN\LearnRN\node_modules\babel-register\lib\cache.js:45:16)
at _combinedTickCallback (internal/process/next_tick.js:67:7)
at process._tickCallback (internal/process/next_tick.js:98:9)
我谷歌的錯誤,沒有運氣。 我刪除.babel.json,錯誤stiil出來。 我重新開始一個新項目,依然如此。我卸載node.js和python,然後再次安裝它們,請按照RN主頁上的「入門」進行操作,仍然一樣。 我安裝react-native-cli 2.0.1和1.3.0,仍然是一樣的。
即使出現錯誤,RN項目似乎仍然有效。但你永遠不知道錯誤何時會傷害我的項目。
你有沒有找到解決方案?我有同樣的問題 – jasan