Report-native start report: Error: UNKNOWN: unknown error, open ... \. babel.json

I have an RN development environment in Windows 7. It has been working fine until yesterday, and it suddenly reports an error after starting the "native response". Error message:

[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)

I have google error, no luck. I delete .babel.json, stiil error appears. I am creating a new project again, all the same. I uninstall node.js and python and then install them again following the “Getting Started” on the RN main page, all the same. I install response-native-cli 2.0.1 and 1.3.0, still the same.

The RN project seems to work even with an error. But you never know when an error will harm my project.

+5
5

node.js 7.5.0.

7.10.0 , .

+1

, . - :

  • babel-register ~/.babel.json,
  • , node
  • node , Java, node

, , native ...

React Native, , babel-register... GitHub.

+2

.babel.json, .

babel.json C:\Users\Me, . . React Native .

https://github.com/facebook/react-native/issues/11803

  • .babel.json
  • response-native run-android ( .babel.json)
  • C:\Users\yourUserName\ Windows ( IE)
  • .babel.json >
  • > > ... > ...
  • , "", ""
  • "", " ", ""
  • ""
  • real-native run-android ( )
+1

git bush

chmod 777 .babel.json

, , .

0

; %temp%/metro-cache .

( ), , :

  1. Packager , /

  2. react-native init ( expo), :

npm start -- --reset-cache

(those who use expo-clishould run expo start -cinstead of the above)

But, nevertheless, deleting a file ~/.babel.json(in a Windows file %userProfile%/.babel.json), as suggested here, cannot harm, I mean, I checked, and the above command was not deleted and / or modify the file .babel.json.

0
source

Source: https://habr.com/ru/post/1664875/


All Articles