status-im / react-native-desktop-qt

A Desktop port of React Native, driven by Qt, forked from Canonical
1.22k stars 85 forks source link

Windows fails with EPERM: operation not permitted, copyfile "gradle-wrapper.jar" #525

Open kenniko opened 5 years ago

kenniko commented 5 years ago

I am getting error when I tried to performing this script as administrator with ConEmu : react-native init DesktopSampleApp --version status-im/react-native-deskto

System Version Windows 10 Node v1-.16.3 npm 6.9.0 Yarn 1.19.1

Error Message

Setting up new React Native app in C:\laragon\www\DesktopSampleApp
Adding React...
yarn add v1.19.1
[1/4] Resolving packages...
[2/4] Fetching packages...
info fsevents@1.2.9: The platform "win32" is incompatible with this module.
info "fsevents@1.2.9" is an optional dependency and failed compatibility check. Excluding it from installation.
[3/4] Linking dependencies...
error An unexpected error occurred: "EPERM: operation not permitted, copyfile 'C:\\Users\\kenni\\AppData\\Local\\Yarn\\Cache\\v6\\npm-react-native-0.57.8\\node_modules\\react-native\\local-cli\\templates\\HelloWorld\\android\\gradle\\wrapper\\gradle-wrapper.jar' -> 'C:\\laragon\\www\\DesktopSampleApp\\node_modules\\react-native\\local-cli\\templates\\HelloWorld\\android\\gradle\\wrapper\\gradle-wrapper.jar'".
info If you think this is a bug, please open a bug report with the information provided in "C:\\laragon\\www\\DesktopSampleApp\\yarn-error.log".
info Visit https://yarnpkg.com/en/docs/cli/add for documentation about this command.
child_process.js:635
    throw err;
    ^

Error: Command failed: yarn add react@16.6.3
    at checkExecSyncError (child_process.js:592:13)
    at execSync (child_process.js:632:13)
    at generateProject (C:\laragon\www\DesktopSampleApp\node_modules\react-native\local-cli\init\init.js:94:5)
    at Object.init (C:\laragon\www\DesktopSampleApp\node_modules\react-native\local-cli\init\init.js:53:5)
    at run (C:\laragon\bin\nodejs\node-v8.6.0-win-x64\node_modules\react-native-cli\index.js:302:7)
    at createProject (C:\laragon\bin\nodejs\node-v8.6.0-win-x64\node_modules\react-native-cli\index.js:249:3)
    at init (C:\laragon\bin\nodejs\node-v8.6.0-win-x64\node_modules\react-native-cli\index.js:200:5)
    at Object.<anonymous> (C:\laragon\bin\nodejs\node-v8.6.0-win-x64\node_modules\react-native-cli\index.js:153:7)
    at Module._compile (module.js:624:30)
    at Object.Module._extensions..js (module.js:635:10)