I want to create React Native Application using WebStorm. but some errors occurs while doing it.
/usr/local/bin/node /usr/local/lib/node_modules/react-native-cli/index.js init untitled
yes
prompt: Directory untitled already exists. Continue?: (no) yes
This will walk you through creating a new React Native project in /Users/sinamnouri/ReactNative/untitled
Using yarn v1.16.0
Installing react-native...
yarn add v1.16.0
error An unexpected error occurred: "EACCES: permission denied, scandir '/Users/sinamnouri/.config/yarn/link'".
info If you think this is a bug, please open a bug report with the information provided in "/Users/sinamnouri/ReactNative/untitled/yarn-error.log".
info Visit https://yarnpkg.com/en/docs/cli/add for documentation about this command.
Error: Command failed: yarn add react-native --exact
at checkExecSyncError (child_process.js:616:11)
at execSync (child_process.js:652:15)
at run (/usr/local/lib/node_modules/react-native-cli/index.js:294:5)
at createProject (/usr/local/lib/node_modules/react-native-cli/index.js:249:3)
at /usr/local/lib/node_modules/react-native-cli/index.js:217:7
at /usr/local/lib/node_modules/react-native-cli/node_modules/prompt/lib/prompt.js:316:32
at /usr/local/lib/node_modules/react-native-cli/node_modules/async/lib/async.js:142:25
at assembler (/usr/local/lib/node_modules/react-native-cli/node_modules/prompt/lib/prompt.js:313:9)
at /usr/local/lib/node_modules/react-native-cli/node_modules/prompt/lib/prompt.js:322:32
at /usr/local/lib/node_modules/react-native-cli/node_modules/prompt/lib/prompt.js:597:5 {
status: 1,
signal: null,
output: [ null, null, null ],
pid: 16730,
stdout: null,
stderr: null
}
Command `yarn add react-native --exact` failed.
Done
it looks like it's about permission, how can I handle permission in WebStorm.
You can't handle permissions in WebStorm (and this actually has nothing to do with the IDE). Such errors usually mean that the .config folder in your HOME is not owned by you, so you have no permissions to write to it. Check if your user (the one you run WebStorm with) has the right privileges in ~/.config, and give it the needed permissions ( sudo chown -R $USER:$GROUP ~/.config )
Related
I get this error when I use CRA and I start it with yarn. Although I searched for that on the stack I can't find a solution for that:
info There appears to be trouble with your network connection. Retrying...
info There appears to be trouble with your network connection. Retrying...
error Couldn't find package "jest-watch-typeahead#^1.0.0" required by "react-scripts" on the "npm" registry.
info Visit https://yarnpkg.com/en/docs/cli/add for documentation about this command.
Aborting installation.
yarnpkg add --exact react react-dom react-scripts cra-template --cwd F:\projects\notes has failed.
Deleting generated file... package.json
Deleting notes/ from F:\projects
Done.
error Command failed.
Exit code: 1
Command: C:\Users\arman\AppData\Local\Yarn\bin\create-react-app
Arguments: notes
Directory: F:\projects
Output:
info Visit https://yarnpkg.com/en/docs/cli/create for documentation about this command.
It says about network connections, but my connection doesn't have any problem and I ran it several times. Is it possible that my problem is sanctions against Iran?
What's the problem and what do I have to do for fixing it?
whenever I create a new project then it throws the following Error. I did update any settings. everything was working fine before yesterday. Here is my issue.
[1/4] Resolving packages...
error Couldn't find package **"#typescript-eslint/parser#^4.22.1"** required by **"#react-native-community/eslint-config"** on the "npm" registry.
info Visit https://yarnpkg.com/en/docs/cli/add for documentation about this command.
E:\example\project\node_modules\execa\index.js:174
err = new Error(`Command failed: ${joinedCmd}${output}`);
^
Error: Command failed: yarn add -D #babel/core #babel/runtime #react-native-community/eslint-config eslint jest babel-jest metro-react-native-babel-preset react-test-renderer#17.0.1
at makeError (E:\example\project\node_modules\execa\index.js:174:9)
at E:\example\project\node_modules\execa\index.js:278:16
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at async generateProject (E:\example\project\node_modules\#react-native-community\cli\build\commands\init\initCompat.js:128:3)
at async Object.initCompat (E:\example\project\node_modules\#react-native-community\cli\build\commands\init\initCompat.js:105:3) {
code: 1,
stdout: null,
stderr: null,
failed: true,
signal: null,
cmd: 'yarn add -D #babel/core #babel/runtime #react-native-community/eslint-config eslint jest babel-jest metro-react-native-babel-preset react-test-renderer#17.0.1',
timedOut: false,
killed: false
}
I did all remove a node, update node, removed react-native-CLI, and update it and it was fixed for some time. but I was unable to install any package.
it's now day 2 and I am stuck here.
before running react-native init try running npm install #typescript-eslint/parser#^4.22.1 I hope it resolves the issue.
if the issue persists try clearing cache with:
npm cache clean --force
Finally after search for a long time. I found a solution. just go to the network setting and turn off automatic proxy setting detection.
I'm getting this issue when I try to get archive.
I got react-native 0.63,
I got expo, expo-cli.
I tried to reinstall pod, removed nodule modules and reinstall etc.
what could be the solution?
info Writing bundle output to:, /Users/tufancagkansokmen/Library/Developer/Xcode/DerivedData/lastsisapp-gtlfysxutnqqnrbbwrcxtyldvttq/Build/Intermediates.noindex/ArchiveIntermediates/lastsisapp/BuildProductsPath/Release-iphoneos/lastsisapp.app/main.jsbundle
info Done writing bundle output
info Copying 76 asset files
info Done copying assets
+ [[ false != true ]]
+ [[ ! -f /Users/tufancagkansokmen/Library/Developer/Xcode/DerivedData/lastsisapp-gtlfysxutnqqnrbbwrcxtyldvttq/Build/Intermediates.noindex/ArchiveIntermediates/lastsisapp/BuildProductsPath/Release-iphoneos/lastsisapp.app/main.jsbundle ]]
Welcome to React Native!
Learn once, write anywhere
node:events:306
throw er; // Unhandled 'error' event
^
Error: EMFILE: too many open files, watch
at FSEvent.FSWatcher._handle.onchange (node:internal/fs/watchers:178:28)
Emitted 'error' event on NodeWatcher instance at:
at NodeWatcher.checkedEmitError (/Users/tufancagkansokmen/works/lastsis-app/node_modules/sane/src/node_watcher.js:143:12)
at FSWatcher.emit (node:events:329:20)
at FSEvent.FSWatcher._handle.onchange (node:internal/fs/watchers:184:12) {
errno: -24,
syscall: 'watch',
code: 'EMFILE',
filename: null
}
Command PhaseScriptExecution failed with a nonzero exit code
try to reinstall watchman. For me this one worked.
brew reinstall watchman
But you can try also these.
brew update
brew install watchman
I had similar errors. Deleting yarn.lock file and running
yarn install
fixed the problem.
I'm following the steps provided in the Documentation to set up the environment for React Native.
I have installed create-react-native-app as well as expo-cli .
Further I have created an app using expo init.
Now when I'm trying to run the app with yarn start or npm start I get the following error:
Error: spawn powershell ENOENT
at Process.ChildProcess._handle.onexit (internal/child_process.js:240:19)
at onErrorNT (internal/child_process.js:415:16)
at process._tickCallback (internal/process/next_tick.js:63:19)
error Command failed with exit code 1.
How do i solve it? is that something related to powershell? (But i get it in Command Prompt too)
P.S. I'm using Windows 8, Expo 3.24.2, yarn 1.22.4, node 10.15.3
I also faced the same error while running yarn start.
To fix this: go to
Control Panel -> System and Security -> System -> Advanced System Settings ->
Environment Variables.
Under User variables -> Variable PATH -> add a new path i.e,
(C:\Windows\System32\WindowsPowerShell\v1.0)
Then click Ok and close the Control Panel.
Now open Windows Powersell and write:
Set-ExecutionPolicy Unrestricted -Scope CurrentUser -Force
Click enter and close the powershell
reopen the cmd and type yarn start or npm start
Error is gone :)
I am trying to install realm to a react-native project (on Windows). I executed the following commands.
npm install --save realm
react-native link realm
I got the following error message - where <Project-Folder> is my project folder.
error EPERM: operation not permitted, scandir '<Project-Folder>/android/app/build/intermediates/signing_config/debug/out/signing-config.json'
The problem was resolved by executing the following command in Admin mode, i.e. you need to open cmd.exe as Administrator.
react-native link realm