Error when display a version of react-native - reactjs

When I check a version of react-native the error outputting like this:
react-native -v
fs.js:114
throw err;
^
Error: EPERM: operation not permitted, chmod '/usr/local/lib/node_modules/react-native/node_modules/#react-native-community/cli/build/commands/server/external/xsel'
at Object.chmodSync (fs.js:1027:3)
at Object.<anonymous> (/usr/local/lib/node_modules/react-native/node_modules/#react-native-community/cli/build/commands/server/copyToClipBoard.js:50:15)
at Module._compile (internal/modules/cjs/loader.js:778:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
at Module.load (internal/modules/cjs/loader.js:653:32)
at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
at Function.Module._load (internal/modules/cjs/loader.js:585:3)
at Module.require (internal/modules/cjs/loader.js:692:17)
at require (internal/modules/cjs/helpers.js:25:18)
at Object.<anonymous> (/usr/local/lib/node_modules/react-native/node_modules/#react-native-community/cli/build/commands/server/middleware/copyToClipBoardMiddleware.js:8:47)

You have a permission error it seems ¯_(ツ)_/¯
or
Now clean the project...
cd android
gradlew clean

Related

Error while running React app (npm start)

Getting this error while running react app. Was working fine yesterday with the same code.
PS C:\Users\ADMIN\Desktop\portfolio\portfolio-website> npm start
> portfolio#0.1.0 start
> react-scripts start
C:\Users\ADMIN\Desktop\portfolio\portfolio-website\node_modules\pretty-error\lib\defaultStyle.js:1
$→��m��mo�L�D��;�%g�?w��ŷ↓�▬��ovH0��a�5��*�ؒ��l͛�S�iy☺�r�O7����%L]��%��∟�hk
^
SyntaxError: Invalid or unexpected token
at wrapSafe (node:internal/modules/cjs/loader:1032:15)
at Module._compile (node:internal/modules/cjs/loader:1067:27)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1157:10)
at Module.load (node:internal/modules/cjs/loader:981:32)
at Function.Module._load (node:internal/modules/cjs/loader:822:12)
at Module.require (node:internal/modules/cjs/loader:1005:19)
at require (node:internal/modules/cjs/helpers:102:18)
at Object.<anonymous> (C:\Users\ADMIN\Desktop\portfolio\portfolio-website\node_modules\pretty-error\lib\PrettyError.js:8:16)

Something went wrong installing the "sharp" module

I already do what the error said. I removed the sharp then npm install --ignore-scripts=false --verbose but it still doesn't work.
I also tried the:
rimraf node_modules
rimraf yarn.lock
yarn
What might the problem here?
npm: 6.13.4
node: v10.18.0
python: 3.7.0
sharp: ^0.26.2
windows 10 pro 64-bit
! Error:
Something went wrong installing the "sharp" module
\\?\C:\Users\ph2200009\Desktop\TM\cplus_incident_mgnt\functions\node_modules\sharp\build\Release\sharp.node is not a valid Win32 application.
\\?\C:\Users\ph2200009\Desktop\TM\cplus_incident_mgnt\functions\node_modules\sharp\build\Release\sharp.node
- Remove the "node_modules/sharp" directory then run
"npm install --ignore-scripts=false --verbose" and look for errors
at Object.<anonymous> (C:\Users\ph2200009\Desktop\TM\cplus_incident_mgnt\functions\node_modules\sharp\lib\constructor.js:34:9)
at Module._compile (internal/modules/cjs/loader.js:778:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
at Module.load (internal/modules/cjs/loader.js:653:32)
at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
at Function.Module._load (internal/modules/cjs/loader.js:585:3)
at Module.require (internal/modules/cjs/loader.js:692:17)
at require (internal/modules/cjs/helpers.js:25:18)
at Object.<anonymous> (C:\Users\ph2200009\Desktop\TM\cplus_incident_mgnt\functions\node_modules\sharp\lib\index.js:3:15)
at Module._compile (internal/modules/cjs/loader.js:778:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
at Module.load (internal/modules/cjs/loader.js:653:32)
at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
at Function.Module._load (internal/modules/cjs/loader.js:585:3)
at Module.require (internal/modules/cjs/loader.js:692:17)
at require (internal/modules/cjs/helpers.js:25:18)
at Object.<anonymous> (C:\Users\ph2200009\Desktop\TM\cplus_incident_mgnt\functions\helpers\image.js:1:15)
at Module._compile (internal/modules/cjs/loader.js:778:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
at Module.load (internal/modules/cjs/loader.js:653:32)
at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
at Function.Module._load (internal/modules/cjs/loader.js:585:3)
! We were unable to load your functions code. (see above)
If you have an Apple M1 chip, try the following:
brew install vips
npm rebuild --verbose sharp
I used this rebuild command to fix it:
npm rebuild --verbose sharp
Try to remove the node_modules folder by typing rm -rf node_modules in terminal and then type npm i and after that try to install sharp again by npm i sharp

After running yarn eject on create-react-app throw new ERR_INVALID_ARG_TYPE('path', 'string', path);

After running yarn eject on create-react-app when I try to run yarn start the terminal shows error something like this:
$ node scripts/start.js
path.js:39
throw new ERR_INVALID_ARG_TYPE('path', 'string', path);
^
TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. R
eceived type undefined
at assertPath (path.js:39:11)
at Object.resolve (path.js:168:7)
at Object.<anonymous> (C:\projects\aditya-portfolio\config\webpack.config.d
ev.js:193:39)
at Module._compile (internal/modules/cjs/loader.js:689:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:700:10)
at Module.load (internal/modules/cjs/loader.js:599:32)
at tryModuleLoad (internal/modules/cjs/loader.js:538:12)
at Function.Module._load (internal/modules/cjs/loader.js:530:3)
at Module.require (internal/modules/cjs/loader.js:637:17)
at require (internal/modules/cjs/helpers.js:20:18)
at Object.<anonymous> (C:\projects\aditya-portfolio\scripts\start.js:31:16)
at Module._compile (internal/modules/cjs/loader.js:689:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:700:10)
at Module.load (internal/modules/cjs/loader.js:599:32)
at tryModuleLoad (internal/modules/cjs/loader.js:538:12)
at Function.Module._load (internal/modules/cjs/loader.js:530:3)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this com
mand.
I was trying to config SCSS in webpack config file but after doing the config when I try to run yarn start it always fails with the above error. How can I fix this?

Cannot find module 'true-case-path'

I am not able to run npm start am getting the below error
E:\angular2\projects2018\angularFlex>npm install
> node-sass#4.7.2 install E:\angular2\projects2018\angularFlex\node_modules\node-sass
> node scripts/install.js
module.js:471
throw err;
^
Error: Cannot find module 'true-case-path'
at Function.Module._resolveFilename (module.js:469:15)
at Function.Module._load (module.js:417:25)
at Module.require (module.js:497:17)
at require (internal/module.js:20:19)
at Object.<anonymous> (E:\angular2\projects2018\angularFlex\node_modules\node-sass\lib\extensions.js:11:22)
at Module._compile (module.js:570:32)
at Object.Module._extensions..js (module.js:579:10)
at Module.load (module.js:487:32)
at tryModuleLoad (module.js:446:12)
at Function.Module._load (module.js:438:3)
You might want to update your nodejs & npm, i just installed 9.4.0 (npm 5.4.2) and its fixed!

Mean Stack application module.js:471 throw err; ^

Getting Following error message,I tried to fix by updating npm and reinstall of mean stack application by running npm install
Error: Cannot find module 'npm'
at Function.Module._resolveFilename (module.js:469:15)
at Function.Module._load (module.js:417:25)
at Module.require (module.js:497:17)
at require (internal/module.js:20:19)
at Object.<anonymous>
(C:\Users\Laptop2\AppData\Roaming\npm\node_modules\mean-cli\lib\cli.js:5:7)
at Module._compile (module.js:570:32)
at Object.Module._extensions..js (module.js:579:10)
at Module.load (module.js:487:32)
at tryModuleLoad (module.js:446:12)
at Function.Module._load (module.js:438:3)
Update Npm by using following command issue resolve
npm install npm#latest -g
Try:
npm install npm#latest -g

Resources