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)
Related
i am trying to host my website made with react on firebase but when i run firebase login i get
ode:internal/modules/cjs/loader:936
throw err;
^
Error: Cannot find module 'semver'
Require stack:
- C:\Users\dell\AppData\Roaming\npm\node_modules\firebase-tools\lib\bin\firebase.js
at Function.Module._resolveFilename (node:internal/modules/cjs/loader:933:15)
at Function.Module._load (node:internal/modules/cjs/loader:778:27)
at Module.require (node:internal/modules/cjs/loader:1005:19)
at require (node:internal/modules/cjs/helpers:102:18)
at Object.<anonymous> (C:\Users\dell\AppData\Roaming\npm\node_modules\firebase-tools\lib\bin\firebase.js:3:16)
at Module._compile (node:internal/modules/cjs/loader:1105:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1159:10)
at Module.load (node:internal/modules/cjs/loader:981:32)
at Function.Module._load (node:internal/modules/cjs/loader:822:12)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:77:12) {
code: 'MODULE_NOT_FOUND',
requireStack: [
'C:\\Users\\dell\\AppData\\Roaming\\npm\\node_modules\\firebase-tools\\lib\\bin\\firebase.js'
]
i have tried deleting the package.lock.json ,reinstalling node ,rerunning npm install but i still get the above the error .
please someone help. please
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
After installation of Node JS and NPM. The expo init createprojects brings the following error;
throw err;
^
Error: Cannot find module 'core-js/library/fn/promise'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:649:15)
at Function.Module._load (internal/modules/cjs/loader.js:575:25)
at Module.require (internal/modules/cjs/loader.js:705:19)
at require (internal/modules/cjs/helpers.js:14:16)
at Object.<anonymous> (C:\Users\KEVIN PC\AppData\Roaming\npm\node_modules\expo-cli\node_modules\babel-runtime\core-js\promise.js:1:31)
at Module._compile (internal/modules/cjs/loader.js:799:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:810:10)
at Module.load (internal/modules/cjs/loader.js:666:32)
at tryModuleLoad (internal/modules/cjs/loader.js:606:12)
at Function.Module._load (internal/modules/cjs/loader.js:598:3)
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?
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!