Why can't I restart my react-native application? - react-native

I'm new at react-native.
I reached to start my application but when I want to restart it I got this :
/usr/local/lib/node_modules/expo-cli/node_modules/tree-kill/index.js:83
ps.stdout.on('data', function (data) {
^
TypeError: Cannot read property 'on' of undefined
at buildProcessTree (/usr/local/lib/node_modules/expo-cli/node_modules/tree-kill/index.js:83:15)
at /usr/local/lib/node_modules/expo-cli/node_modules/tree-kill/index.js:104:11
at Array.forEach (<anonymous>)
at ChildProcess.onClose (/usr/local/lib/node_modules/expo-cli/node_modules/tree-kill/index.js:99:31)
at ChildProcess.emit (events.js:189:13)
at maybeClose (internal/child_process.js:978:16)
at Socket.stream.socket.on (internal/child_process.js:395:11)
at Socket.emit (events.js:189:13)
at Pipe._handle.close (net.js:610:12)
Why do I get this ?
I start my react-native app with npm start !

I found the solution.
I had to remove the file .expo in my folder.

Related

agora npm start command gives me error with Error: spawn cd ENOENT

agora npm start command gives me error with Error: spawn cd ENOENT
can any one help me
`E:\Projects\Full Stack Projects\Video App by Alpha\agora-app-builder\node_modules\yoga-layout-prebuilt\yoga-layout\build\Release\nbind.js:53
throw ex;
^
Error: spawn cd ENOENT
at notFoundError (E:\Projects\Full Stack Projects\Video App by Alpha\agora-app-builder\node_modules\cross-spawn\lib\enoent.js:6:26)
at verifyENOENT (E:\Projects\Full Stack Projects\Video App by Alpha\agora-app-builder\node_modules\cross-spawn\lib\enoent.js:40:16)
at ChildProcess.cp.emit (E:\Projects\Full Stack Projects\Video App by Alpha\agora-app-builder\node_modules\cross-spawn\lib\enoent.js:27:25)
at Process.ChildProcess._handle.onexit (node:internal/child_process:291:12)
Emitted 'error' event on ChildProcess instance at:
at ChildProcess.cp.emit (E:\Projects\Full Stack Projects\Video App by Alpha\agora-app-builder\node_modules\cross-spawn\lib\enoent.js:30:37)
at Process.ChildProcess._handle.onexit (node:internal/child_process:291:12) {
code: 'ENOENT',
errno: 'ENOENT',
syscall: 'spawn cd',
path: 'cd',
spawnargs: [ 'videoapp', '&&', 'npm', 'install' ]
}`
I run npm start after npm i and show me this error while I try many times as well with cmd admin

I have trouble with constructing a vue.js project by using npm or yarn

I have trouble with constructing a vue.js project by using npm or yarn.
the cmd: $ vue init webpack my-project
# Installing project dependencies ...
# ========================
events.js:292
throw er; // Unhandled 'error' event
^
Error: spawn C:\WINDOWS\system32\cmd.exe; ENOENT
at Process.ChildProcess._handle.onexit (internal/child_process.js:269:19)
at onErrorNT (internal/child_process.js:465:16)
at processTicksAndRejections (internal/process/task_queues.js:80:21)
Emitted 'error' event on ChildProcess instance at:
at Process.ChildProcess._handle.onexit (internal/child_process.js:275:12)
at onErrorNT (internal/child_process.js:465:16)
at processTicksAndRejections (internal/process/task_queues.js:80:21) {
errno: -4058,
code: 'ENOENT',
syscall: 'spawn C:\\WINDOWS\\system32\\cmd.exe;',
path: 'C:\\WINDOWS\\system32\\cmd.exe;',
spawnargs: [ '-c', 'yarn install' ]
}
the picture

I am not able to create my react application on npm

$ npx create-react-app application
Error: EPERM: operation not permitted, mkdir 'C:\Users\snigdha'
TypeError: Cannot read property 'loaded' of undefined
at exit (C:\Program Files\nodejs\node_modules\npm\lib\utils\error-handler.js:98:27)
at errorHandler (C:\Program Files\nodejs\node_modules\npm\lib\utils\error-handler.js:216:3)
at C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js:77:20
at cb (C:\Program Files\nodejs\node_modules\npm\lib\npm.js:225:22)
at C:\Program Files\nodejs\node_modules\npm\lib\npm.js:263:24
at C:\Program Files\nodejs\node_modules\npm\lib\config\core.js:83:7
at Array.forEach ()
at C:\Program Files\nodejs\node_modules\npm\lib\config\core.js:82:13
at f (C:\Program Files\nodejs\node_modules\npm\node_modules\once\once.js:25:25)
at afterExtras (C:\Program Files\nodejs\node_modules\npm\lib\config\core.js:173:20) C:\Program
Files\nodejs\node_modules\npm\lib\utils\error-handler.js:98 var
doExit = npm.config.loaded ? npm.config.get('_exit') : true
^
TypeError: Cannot read property 'loaded' of undefined
at exit (C:\Program Files\nodejs\node_modules\npm\lib\utils\error-handler.js:98:27)
at process.errorHandler (C:\Program Files\nodejs\node_modules\npm\lib\utils\error-handler.js:216:3)
at process.emit (events.js:198:13)
at process._fatalException (internal/bootstrap/node.js:496:27) Install for create-react-app#latest failed with code 7
Try to clean your cache with
npm cache clean

Where is NPM config file?

I edited the npm config file with npm edit config. I made a syntax error in it and saved the file. Now, no matter what I try with npm, it will complain about it. I know what the syntax is and I would like to fix it, but I can't find the file anywhere.
C:\Users\Arthur>npm
Error: Failed parsing JSON config key cache: "C:\Users\Le Roi Arthur\AppData\Roaming\npm-cache"
at parseField (D:\nodejs\node_modules\npm\lib\config\core.js:376:13)
at D:\nodejs\node_modules\npm\lib\config\core.js:330:24
at Array.forEach (<anonymous>)
at Conf.add (D:\nodejs\node_modules\npm\lib\config\core.js:328:23)
at ConfigChain.addString (D:\nodejs\node_modules\npm\node_modules\config-chain\index.js:244:8)
at Conf.<anonymous> (D:\nodejs\node_modules\npm\lib\config\core.js:316:10)
at D:\nodejs\node_modules\npm\node_modules\graceful-fs\graceful-fs.js:90:16
at FSReqWrap.readFileAfterClose [as oncomplete] (internal/fs/read_file_context.js:53:3)
TypeError: Cannot read property 'loaded' of undefined
at exit (D:\nodejs\node_modules\npm\lib\utils\error-handler.js:98:27)
at errorHandler (D:\nodejs\node_modules\npm\lib\utils\error-handler.js:216:3)
at D:\nodejs\node_modules\npm\bin\npm-cli.js:77:20
at cb (D:\nodejs\node_modules\npm\lib\npm.js:225:22)
at D:\nodejs\node_modules\npm\lib\npm.js:263:24
at D:\nodejs\node_modules\npm\lib\config\core.js:83:7
at Array.forEach (<anonymous>)
at Conf.<anonymous> (D:\nodejs\node_modules\npm\lib\config\core.js:82:13)
at Conf.f (D:\nodejs\node_modules\npm\node_modules\once\once.js:25:25)
at Object.onceWrapper (events.js:286:20)
D:\nodejs\node_modules\npm\lib\utils\error-handler.js:98
var doExit = npm.config.loaded ? npm.config.get('_exit') : true
^
TypeError: Cannot read property 'loaded' of undefined
at exit (D:\nodejs\node_modules\npm\lib\utils\error-handler.js:98:27)
at process.errorHandler (D:\nodejs\node_modules\npm\lib\utils\error-handler.js:216:3)
at process.emit (events.js:198:13)
at process._fatalException (internal/bootstrap/node.js:496:27)
Error: Failed parsing JSON config key cache: "C:\Users\Le Roi Arthur\AppData\Roaming\npm-cache"
at parseField (D:\nodejs\node_modules\npm\lib\config\core.js:376:13)
at D:\nodejs\node_modules\npm\lib\config\core.js:330:24
at Array.forEach (<anonymous>)
at Conf.add (D:\nodejs\node_modules\npm\lib\config\core.js:328:23)
at ConfigChain.addString (D:\nodejs\node_modules\npm\node_modules\config-chain\index.js:244:8)
at Conf.<anonymous> (D:\nodejs\node_modules\npm\lib\config\core.js:316:10)
at D:\nodejs\node_modules\npm\node_modules\graceful-fs\graceful-fs.js:90:16
at FSReqWrap.readFileAfterClose [as oncomplete] (internal/fs/read_file_context.js:53:3)
TypeError: Cannot read property 'loaded' of undefined
at exit (D:\nodejs\node_modules\npm\lib\utils\error-handler.js:98:27)
at errorHandler (D:\nodejs\node_modules\npm\lib\utils\error-handler.js:216:3)
at D:\nodejs\node_modules\npm\bin\npm-cli.js:77:20
at cb (D:\nodejs\node_modules\npm\lib\npm.js:225:22)
at D:\nodejs\node_modules\npm\lib\npm.js:263:24
at D:\nodejs\node_modules\npm\lib\config\core.js:83:7
at Array.forEach (<anonymous>)
at Conf.<anonymous> (D:\nodejs\node_modules\npm\lib\config\core.js:82:13)
at Conf.f (D:\nodejs\node_modules\npm\node_modules\once\once.js:25:25)
at Object.onceWrapper (events.js:286:20)
D:\nodejs\node_modules\npm\lib\utils\error-handler.js:98
var doExit = npm.config.loaded ? npm.config.get('_exit') : true
^
TypeError: Cannot read property 'loaded' of undefined
at exit (D:\nodejs\node_modules\npm\lib\utils\error-handler.js:98:27)
at process.errorHandler (D:\nodejs\node_modules\npm\lib\utils\error-handler.js:216:3)
at process.emit (events.js:198:13)
at process._fatalException (internal/bootstrap/node.js:496:27)
Uninstalling and re-installing nodeJS doesn't fix the issue, the file is stored in cache somewhere. It's infuriately frustrating how hard it is to put my hands on that file.
Where can I find the npm config file ?
You need to edit npmrc file, take a look at documentation it will help you to find the appropriate one.
The four relevant files are:
Per-project config file: /path/to/my/project/.npmrc
Per-user config file: ~/.npmrc
Global config file: $PREFIX/npmrc
Built-in npm config file: /path/to/npm/npmrc
you can see the config file (and other) paths with the below command
npm config list

Cannot create vue project using vue/cli

Version vue: 3.7.0
When I type in CMD:
vue create "projectname"
I get the following response:
assert.js:85
throw new AssertionError(obj);
^
AssertionError [ERR_ASSERTION]: 5895 == 0
at ClientRequest.onConnect (C:\Users\mikag\AppData\Roaming\npm\node_modules\#vue\cli\node_modules\tunnel-agent\index.js:160:14)
at Object.onceWrapper (events.js:277:13)
at ClientRequest.emit (events.js:189:13)
at Socket.socketOnData (_http_client.js:475:11)
at Socket.emit (events.js:189:13)
at addChunk (_stream_readable.js:284:12)
at readableAddChunk (_stream_readable.js:265:11)
at Socket.Readable.push (_stream_readable.js:220:10)
at TCP.onStreamRead [as onread] (internal/stream_base_commons.js:94:17)
CMD SCREEN
Have you tried with NodeJS v12.1.0, as it is supposed to be fixed by now.
This is one of the known issues, as per: https://github.com/vuejs/vue-cli/issues/3883