The Android Studio Emulator is not working - javascript

I have installed React Native. The Android Studio Emulator is not working. I'm getting the following error. I'm sure I've installed React Native in all its details. I have watched installation videos over and over again. I couldn't solve the problem. Please could you help?
PS C:\Users\emrec\Masaüstü\ReactNative\bulutmd> npx react-native run-android
info Starting JS server...
info Installing the app...
:ReactNative:Unexpected empty result of running '[node, C:\Users\emrec\Masaüstü\ReactNative\bulutmd\node_modules\#react-native-community\cli\build\bin.js, config]' command.
:ReactNative:Running '[node, C:\Users\emrec\Masaüstü\ReactNative\bulutmd\node_modules\#react-native-community\cli\build\bin.js, config]' command failed.
FAILURE: Build failed with an exception.
* Where:
Script 'C:\Users\emrec\Masa�st�\ReactNative\bulutmd\node_modules\#react-native-community\cli-platform-android\native_modules.gradle' line: 413
* What went wrong:
A problem occurred evaluating script.
> node:internal/modules/cjs/loader:959 throw err; ^Error: Cannot find module 'C:\Users\emrec\Masaüstü\ReactNative\bulutmd\node_modules\#react-native-community\cli\build\bin.js' at Function.Module._resolveFilename (node:internal/modules/cjs/loader:956:15) at Function.Module._load (node:internal/modules/cjs/loader:804:27) at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12) at node:internal/main/run_main_module:17:47 { code: 'MODULE_NOT_FOUND', requireStack: []}
* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
* Get more help at https://help.gradle.org
BU�LD FAILED in 7s
error Failed to install the app. Make sure you have the Android development environment set up: https://reactnative.dev/docs/environment-setup.
Error: Command failed: gradlew.bat app:installDebug -PreactNativeDevServerPort=8081
:ReactNative:Unexpected empty result of running '[node, C:\Users\emrec\Masaüstü\ReactNative\bulutmd\node_modules\#react-native-community\cli\build\bin.js, config]' command.
:ReactNative:Running '[node, C:\Users\emrec\Masaüstü\ReactNative\bulutmd\node_modules\#react-native-community\cli\build\bin.js, config]' command failed.
FAILURE: Build failed with an exception.
* Where:
Script 'C:\Users\emrec\Masa�st�\ReactNative\bulutmd\node_modules\#react-native-community\cli-platform-android\native_modules.gradle' line: 413
* What went wrong:
A problem occurred evaluating script.
> node:internal/modules/cjs/loader:959 throw err; ^Error: Cannot find module 'C:\Users\emrec\Masaüstü\ReactNative\bulutmd\node_modules\#react-native-community\cli\build\bin.js' at Function.Module._resolveFilename (node:internal/modules/cjs/loader:956:15) at Function.Module._load (node:internal/modules/cjs/loader:804:27) at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12) at node:internal/main/run_main_module:17:47 { code: 'MODULE_NOT_FOUND', requireStack: []}
* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
* Get more help at https://help.gradle.org
BU�LD FAILED in 7s
at makeError (C:\Users\emrec\Masaüstü\ReactNative\bulutmd\node_modules\execa\index.js:174:9)
at C:\Users\emrec\Masaüstü\ReactNative\bulutmd\node_modules\execa\index.js:278:16
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at async runOnAllDevices (C:\Users\emrec\Masaüstü\ReactNative\bulutmd\node_modules\#react-native-community\cli-platform-android\build\commands\runAndroid\runOnAllDevices.js:109:5)
at async Command.handleAction (C:\Users\emrec\Masaüstü\ReactNative\bulutmd\node_modules\#react-native-community\cli\build\index.js:142:9)
info Run CLI with --verbose flag for more details.
PS C:\Users\emrec\Masaüstü\ReactNative\bulutmd>

uninstall #react-native-community library and restart the server

Related

How do I solve this error message? I'm missing server.generated.js

Whenever I try to run my app with npm start in the terminal, this is the error I get:
iteh-projekat#1.0.0 start
> NODE_ENV=production node ./dist/server.generated.js
node:internal/modules/cjs/loader:936
throw err;
^
Error: Cannot find module '/Users/mihailomitrovic/Downloads/iteh_projekat/dist/server.generated.js'
at Function.Module._resolveFilename (node:internal/modules/cjs/loader:933:15)
at Function.Module._load (node:internal/modules/cjs/loader:778:27)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:77:12)
at node:internal/main/run_main_module:17:47 {
code: 'MODULE_NOT_FOUND',
requireStack: []
}
Could someone help me with fixing this? The dist folder is empty, so I'm not sure what's happening. I've done npm install when pulling it from Github, since I'm working on it with friends for a uni project. Thank you!

Yarn start not working | error `ERR_PACKAGE_PATH_NOT_EXPORTED'

I have been trying to make this React App, but when I try to do yarn start it shows the following error message:
yarn run v1.22.17
$ react-scripts start
node:internal/modules/cjs/loader:488
throw e;
^
Error [ERR_PACKAGE_PATH_NOT_EXPORTED]: Package subpath './lib/tokenize' is not defined by "exports" in /home/abhishek/Documents/Code/weather-react/weather-react/node_modules/postcss-safe-parser/node_modules/postcss/package.json
at new NodeError (node:internal/errors:371:5)
at throwExportsNotFound (node:internal/modules/esm/resolve:429:9)
at packageExportsResolve (node:internal/modules/esm/resolve:683:3)
at resolveExports (node:internal/modules/cjs/loader:482:36)
at Function.Module._findPath (node:internal/modules/cjs/loader:522:31)
at Function.Module._resolveFilename (node:internal/modules/cjs/loader:919:27)
at Function.Module._load (node:internal/modules/cjs/loader:778:27)
at Module.require (node:internal/modules/cjs/loader:999:19)
at require (node:internal/modules/cjs/helpers:102:18)
at Object.<anonymous> (/home/abhishek/Documents/Code/weather-react/weather-react/node_modules/postcss-safe-parser/lib/safe-parser.js:1:17) {
code: 'ERR_PACKAGE_PATH_NOT_EXPORTED'
}
Node.js v17.2.0
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
How do I fix this?
This is what it shows now:
Starting the development server...
/home/abhishek/Documents/Code/weather-react/weather-react/node_modules/react-scripts/scripts/start.js:19
throw err;
^
Error: error:0308010C:digital envelope routines::unsupported
at new Hash (node:internal/crypto/hash:67:19)
at Object.createHash (node:crypto:130:10)
at module.exports (/home/abhishek/Documents/Code/weather-react/weather-react/node_modules/webpack/lib/util/createHash.js:135:53)
at NormalModule._initBuildHash (/home/abhishek/Documents/Code/weather-react/weather-react/node_modules/webpack/lib/NormalModule.js:417:16)
at /home/abhishek/Documents/Code/weather-react/weather-react/node_modules/webpack/lib/NormalModule.js:452:10
at /home/abhishek/Documents/Code/weather-react/weather-react/node_modules/webpack/lib/NormalModule.js:323:13
at /home/abhishek/Documents/Code/weather-react/weather-react/node_modules/loader-runner/lib/LoaderRunner.js:367:11
at /home/abhishek/Documents/Code/weather-react/weather-react/node_modules/loader-runner/lib/LoaderRunner.js:233:18
at context.callback (/home/abhishek/Documents/Code/weather-react/weather-react/node_modules/loader-runner/lib/LoaderRunner.js:111:13)
at /home/abhishek/Documents/Code/weather-react/weather-react/node_modules/babel-loader/lib/index.js:59:103 {
opensslErrorStack: [ 'error:03000086:digital envelope routines::initialization error' ],
library: 'digital envelope routines',
reason: 'unsupported',
code: 'ERR_OSSL_EVP_UNSUPPORTED'
}
Node.js v17.2.0
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
removed /node_modules and yarn.lock file.
2.then reinstalled deleted packages/file using yarn install .
Fixed! Downgraded to node 16.13.1 :)

throw err/MODULE_NOT_FOUND

I am having this issue when trying to run node index.js in my terminal on VSC.
This is the error,
[Try the new cross-platform PowerShell https://aka.ms/pscore6
PS Z:\01 Code notes> node index.js
node:internal/modules/cjs/loader:944
throw err;
^
Error: Cannot find module 'Z:\01 Code notes\index.js'
at Function.Module._resolveFilename (node:internal/modules/cjs/loader:941:15)
at Function.Module._load (node:internal/modules/cjs/loader:774:27)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:76:12)
at node:internal/main/run_main_module:17:47 {
code: 'MODULE_NOT_FOUND',
requireStack: []
}
PS Z:\01 Code notes> ][1]
I have tried so many different things. I tried all the suggested fixes on these pages,
Node MODULE_NOT_FOUND
Why does VsCode NPM throw a module not found error?
https://github.com/Microsoft/vscode/issues/65893
Any suggestions?
That means you are using a module that you haven't installed, check your code.

Node 14.16.0: Error-Messages after Update

I've updated Node from version 12.x.x to 14.16.0. After this I get serveral error messages when I try to start the server.
In the package.json I defined under the scripts object a key "start" with value "nodemon server.
"scripts": {
"test": "Hello World",
"start": "nodemon server"
In the Terminal I call npm start and get the following error:
npm ERR! missing script: start
I also tried node server. But that isn't successful too. The message is:
internal/modules/cjs/loader.js:883 throw err; ^
Error: Cannot find module
'C:\Users\Marco\Desktop\Studium\UndsoKram\server'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:880:15) at Function.Module._load
(internal/modules/cjs/loader.js:725:27)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:72:12)
at internal/main/run_main_module.js:17:47 { code: 'MODULE_NOT_FOUND', requireStack: [] }
Have someone a idea how too fix that? Is it necessary to go back to node version 12.x.x.?

Visual Studio Code cannot find module 'typegram/callback'

im working on a telegram bot using the telegraf package. (version 4.1.1)
everything was working until i started using more modules from the telegraf package like Extra and mark-up.
I started getting this error:
internal/modules/cjs/loader.js:800
throw err;
^
Error: Cannot find module 'typegram/callback'
Require stack:
- C:\gitprojects\bot\node_modules\telegraf\lib\telegram-types.js
- C:\gitprojects\bot\node_modules\telegraf\lib\context.js
- C:\gitprojects\bot\node_modules\telegraf\lib\composer.js
- C:\gitprojects\bot\node_modules\telegraf\lib\telegraf.js
- C:\gitprojects\bot\node_modules\telegraf\lib\index.js
- C:\gitprojects\bot\index.js
←[90m at Function.Module._resolveFilename (internal/modules/cjs/loader.js:797:15)←[39m
←[90m at Function.Module._load (internal/modules/cjs/loader.js:690:27)←[39m
←[90m at Module.require (internal/modules/cjs/loader.js:852:19)←[39m
←[90m at require (internal/modules/cjs/helpers.js:74:18)←[39m
at Object.<anonymous> (C:\gitprojects\bot\node_modules\←[4mtelegraf←[24m\lib\telegram-types.js:16:14)
←[90m at Module._compile (internal/modules/cjs/loader.js:959:30)←[39m
←[90m at Object.Module._extensions..js (internal/modules/cjs/loader.js:995:10)←[39m
←[90m at Module.load (internal/modules/cjs/loader.js:815:32)←[39m
←[90m at Function.Module._load (internal/modules/cjs/loader.js:727:14)←[39m
←[90m at Module.require (internal/modules/cjs/loader.js:852:19)←[39m {
code: ←[32m'MODULE_NOT_FOUND'←[39m,
requireStack: [
←[32m'C:\\gitprojects\\bot\\node_modules\\telegraf\\lib\\telegram-types.js'←[39m,
←[32m'C:\\gitprojects\\bot\\node_modules\\telegraf\\lib\\context.js'←[39m,
←[32m'C:\\gitprojects\\bot\\node_modules\\telegraf\\lib\\composer.js'←[39m,
←[32m'C:\\gitprojects\\bot\\node_modules\\telegraf\\lib\\telegraf.js'←[39m,
←[32m'C:\\gitprojects\\bot\\node_modules\\telegraf\\lib\\index.js'←[39m,
←[32m'C:\\gitprojects\\bot\\index.js'←[39m
]
}
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! bot#1.0.0 start: `node index.js`
npm ERR! Exit status 1
'typegram/callback' is installed but is a typescript file,i don't have typescript installed but i didn't have issues before the error.
I reverted to my latest working build but the error hasn't changed..
right now this is the only line of code:
const { Telegraf } = require('telegraf');
Any tips?
Solved by downgrading to 4.1.0 version of the package.
Telegraf 1.4.x requires Node 12.x.x ++
Upgrade to the latest Node LTS (14) - you should be ok.
Well... in case anyone ever gets this error here is how i solved it.
after avoiding this issue by crying, sleeping and watching stupid youtube videos (shout out to Sseth).
ive reinstalled everything i could, nothing helped.
checked npm version and noticed my code appeared as a installed package, i thought "Die" and removed it. for some reason that fixed it. if anyone knows the reason behind this behavior i would love to know.
you're all great, have a good one.

Categories

Resources