internal/modules/cjs/loader.js:895
throw err;
^
Error: Cannot find module 'C:\Users\Jobay\AppData\Roaming\npm\node_modules\expo-cli\bin\expo.js'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:892:15)
at Function.Module._load (internal/modules/cjs/loader.js:742: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: []
}
This error came to becose expo cli can't install poperlay. so we need to install expo cli perfectly .
You can try this comman it's work perfectly fine.
npm install -g expo-cli --force
Related
I activated yarn by following yarn official docs (https://yarnpkg.com/getting-started/install)
I created an expo app with yarn by following react native official docs (https://reactnative.dev/docs/environment-setup)
But when I run yarn start I get below error
node:internal/errors:465
ErrorCaptureStackTrace(err);
^
Error: spawn ENOTDIR
at ChildProcess.spawn (node:internal/child_process:413:11)
at Object.spawn (node:child_process:700:9)
at spawn (/Users/minseok/Repository/test/.yarn/cache/cross-spawn-npm-6.0.5-2deab6c280-f893bb0d96.zip/node_modules/cross-spawn/index.js:12:24)
at run (/Users/minseok/Repository/test/.yarn/unplugged/expo-npm-46.0.10-310b54dc3f/node_modules/expo/bin/cli.js:11:12)
at Object.<anonymous> (/Users/minseok/Repository/test/.yarn/unplugged/expo-npm-46.0.10-310b54dc3f/node_modules/expo/bin/cli.js:6:1)
at Module._compile (node:internal/modules/cjs/loader:1105:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1159:10)
at Object.require$$0.Module._extensions..js (/Users/minseok/Repository/test/.pnp.cjs:20807:33)
at Module.load (node:internal/modules/cjs/loader:981:32)
at Function.require$$0.Module._load (/Users/minseok/Repository/test/.pnp.cjs:20630:22) {
errno: -20,
code: 'ENOTDIR',
syscall: 'spawn'
}
How can I fix this?
I try to install reactide on Windows 10. After cloning its git repository and installing dependencies. When I run the command npm run webpack-production I get the following errors:
C:\reactide(3.0-release -> origin) (reactide#3.0.0)
λ npm run webpack-production
> reactide#3.0.0 webpack-production
> webpack --mode production
C:\reactide\node_modules\webpack-cli\bin\cli.js:281
throw err;
^
Error: Cannot find module 'vs/editor/contrib/gotoSymbol/goToCommands'
Require stack:
- C:\reactide\node_modules\monaco-editor-webpack-plugin\out\index.js
- C:\reactide\webpack.config.js
- C:\reactide\node_modules\webpack-cli\bin\utils\convert-argv.js
- C:\reactide\node_modules\webpack-cli\bin\cli.js
- C:\reactide\node_modules\webpack\bin\webpack.js
at Function.Module._resolveFilename (node:internal/modules/cjs/loader:933:15)
at Function.resolve (C:\reactide\node_modules\v8-compile-cache\v8-compile-cache.js:164:23)
at resolveMonacoPath (C:\reactide\node_modules\monaco-editor-webpack-plugin\out\index.js:34:28)
at C:\reactide\node_modules\monaco-editor-webpack-plugin\out\index.js:173:63
at Array.map (<anonymous>)
at createLoaderRules (C:\reactide\node_modules\monaco-editor-webpack-plugin\out\index.js:173:43)
at MonacoEditorWebpackPlugin.apply (C:\reactide\node_modules\monaco-editor-webpack-plugin\out\index.
at webpack (C:\reactide\node_modules\webpack\lib\webpack.js:51:13)
at processOptions (C:\reactide\node_modules\webpack-cli\bin\cli.js:272:16)
at C:\reactide\node_modules\webpack-cli\bin\cli.js:364:3
at Object.parse (C:\reactide\node_modules\yargs\yargs.js:576:18)
at C:\reactide\node_modules\webpack-cli\bin\cli.js:49:8
at Object.<anonymous> (C:\reactide\node_modules\webpack-cli\bin\cli.js:366:3)
at Module._compile (node:internal/modules/cjs/loader:1103:14)
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:\reactide\node_modules\webpack\bin\webpack.js:156:2)
at Module._compile (node:internal/modules/cjs/loader:1103:14)
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 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: [
'C:\\reactide\\node_modules\\monaco-editor-webpack-plugin\\out\\index.js',
'C:\\reactide\\webpack.config.js',
'C:\\reactide\\node_modules\\webpack-cli\\bin\\utils\\convert-argv.js',
'C:\\reactide\\node_modules\\webpack-cli\\bin\\cli.js',
'C:\\reactide\\node_modules\\webpack\\bin\\webpack.js'
]
}
npm ERR! code 1
npm ERR! path C:\reactide
npm ERR! command failed
npm ERR! command C:\WINDOWS\system32\cmd.exe /d /s /c "webpack --mode production"
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\user\AppData\Local\npm-cache\_logs\2022-07-08T13_47_50_402Z-debug.log
I tried looking for the solution on this GitHub page and this stack overflow question but no success. I have installed all the dependencies.
The error occurs in monaco-editor-webpack-plugin used in webpack.config.js:
plugins: [
new MonacoWebpackPlugin(),
],
I found this issue in official repo with a similar error and I fixed the problem like this:
plugins: [
new MonacoWebpackPlugin({
features: ["!gotoSymbol"],
languages: ["!abap"],
}),
],
I am new to react-native programming and getting issues when creating a new react native project (npx react-native init AwesomeProject)
I have followed the steps listed here:
https://reactnative.dev/docs/environment-setup
OS: Windows | node: v16.14.2 | npm: 8.7.0 | chocolatey: 1.1.0
Error message:
C:\Users\Arvin>npx react-native init AwesomeProject
node:internal/modules/cjs/loader:936
throw err;
^
Error: Cannot find module './lib/source-map-generator'
Require stack:
- C:\Users\Arvin\AppData\Local\npm-cache\_npx\7930a8670f922cdb\node_modules\source-map\source-map.js
- C:\Users\Arvin\AppData\Local\npm-cache\_npx\7930a8670f922cdb\node_modules\#babel\generator\lib\source-map.js
- C:\Users\Arvin\AppData\Local\npm-cache\_npx\7930a8670f922cdb\node_modules\#babel\generator\lib\index.js
- C:\Users\Arvin\AppData\Local\npm-cache\_npx\7930a8670f922cdb\node_modules\#babel\traverse\lib\path\index.js
- C:\Users\Arvin\AppData\Local\npm-cache\_npx\7930a8670f922cdb\node_modules\#babel\traverse\lib\context.js
- C:\Users\Arvin\AppData\Local\npm-cache\_npx\7930a8670f922cdb\node_modules\#babel\traverse\lib\traverse-node.js
- C:\Users\Arvin\AppData\Local\npm-cache\_npx\7930a8670f922cdb\node_modules\#babel\traverse\lib\index.js
- C:\Users\Arvin\AppData\Local\npm-cache\_npx\7930a8670f922cdb\node_modules\metro-source-map\src\generateFunctionMap.js
- C:\Users\Arvin\AppData\Local\npm-cache\_npx\7930a8670f922cdb\node_modules\metro-source-map\src\source-map.js
- C:\Users\Arvin\AppData\Local\npm-cache\_npx\7930a8670f922cdb\node_modules\metro\src\DeltaBundler\Serializers\sourceMapGenerator.js
- C:\Users\Arvin\AppData\Local\npm-cache\_npx\7930a8670f922cdb\node_modules\metro\src\DeltaBundler\Serializers\sourceMapString.js
- C:\Users\Arvin\AppData\Local\npm-cache\_npx\7930a8670f922cdb\node_modules\metro\src\lib\getAppendScripts.js
- C:\Users\Arvin\AppData\Local\npm-cache\_npx\7930a8670f922cdb\node_modules\metro\src\DeltaBundler\Serializers\baseBytecodeBundle.js
- C:\Users\Arvin\AppData\Local\npm-cache\_npx\7930a8670f922cdb\node_modules\metro\src\Server.js
- C:\Users\Arvin\AppData\Local\npm-cache\_npx\7930a8670f922cdb\node_modules\metro\src\shared\output\bundle.js
- C:\Users\Arvin\AppData\Local\npm-cache\_npx\7930a8670f922cdb\node_modules\#react-native-community\cli\node_modules\#react-native-community\cli-plugin-metro\build\commands\bundle\buildBundle.js
- C:\Users\Arvin\AppData\Local\npm-cache\_npx\7930a8670f922cdb\node_modules\#react-native-community\cli\node_modules\#react-native-community\cli-plugin-metro\build\commands\bundle\bundle.js
- C:\Users\Arvin\AppData\Local\npm-cache\_npx\7930a8670f922cdb\node_modules\#react-native-community\cli\node_modules\#react-native-community\cli-plugin-metro\build\commands\bundle\index.js
- C:\Users\Arvin\AppData\Local\npm-cache\_npx\7930a8670f922cdb\node_modules\#react-native-community\cli\node_modules\#react-native-community\cli-plugin-metro\build\commands\index.js
- C:\Users\Arvin\AppData\Local\npm-cache\_npx\7930a8670f922cdb\node_modules\#react-native-community\cli\node_modules\#react-native-community\cli-plugin-metro\build\index.js
- C:\Users\Arvin\AppData\Local\npm-cache\_npx\7930a8670f922cdb\node_modules\#react-native-community\cli\build\commands\index.js
- C:\Users\Arvin\AppData\Local\npm-cache\_npx\7930a8670f922cdb\node_modules\#react-native-community\cli\build\index.js
- C:\Users\Arvin\AppData\Local\npm-cache\_npx\7930a8670f922cdb\node_modules\#react-native-community\cli\build\bin.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\Arvin\AppData\Local\npm-cache\_npx\7930a8670f922cdb\node_modules\source-map\source-map.js:6:30)
at Module._compile (node:internal/modules/cjs/loader:1103:14)
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) {
code: 'MODULE_NOT_FOUND',
requireStack: [
'C:\\Users\\Arvin\\AppData\\Local\\npm-cache\\_npx\\7930a8670f922cdb\\node_modules\\source-map\\source-map.js',
'C:\\Users\\Arvin\\AppData\\Local\\npm-cache\\_npx\\7930a8670f922cdb\\node_modules\\#babel\\generator\\lib\\source-map.js',
'C:\\Users\\Arvin\\AppData\\Local\\npm-cache\\_npx\\7930a8670f922cdb\\node_modules\\#babel\\generator\\lib\\index.js',
'C:\\Users\\Arvin\\AppData\\Local\\npm-cache\\_npx\\7930a8670f922cdb\\node_modules\\#babel\\traverse\\lib\\path\\index.js',
'C:\\Users\\Arvin\\AppData\\Local\\npm-cache\\_npx\\7930a8670f922cdb\\node_modules\\#babel\\traverse\\lib\\context.js',
'C:\\Users\\Arvin\\AppData\\Local\\npm-cache\\_npx\\7930a8670f922cdb\\node_modules\\#babel\\traverse\\lib\\traverse-node.js',
'C:\\Users\\Arvin\\AppData\\Local\\npm-cache\\_npx\\7930a8670f922cdb\\node_modules\\#babel\\traverse\\lib\\index.js',
'C:\\Users\\Arvin\\AppData\\Local\\npm-cache\\_npx\\7930a8670f922cdb\\node_modules\\metro-source-map\\src\\generateFunctionMap.js',
'C:\\Users\\Arvin\\AppData\\Local\\npm-cache\\_npx\\7930a8670f922cdb\\node_modules\\metro-source-map\\src\\source-map.js',
'C:\\Users\\Arvin\\AppData\\Local\\npm-cache\\_npx\\7930a8670f922cdb\\node_modules\\metro\\src\\DeltaBundler\\Serializers\\sourceMapGenerator.js',
'C:\\Users\\Arvin\\AppData\\Local\\npm-cache\\_npx\\7930a8670f922cdb\\node_modules\\metro\\src\\DeltaBundler\\Serializers\\sourceMapString.js',
'C:\\Users\\Arvin\\AppData\\Local\\npm-cache\\_npx\\7930a8670f922cdb\\node_modules\\metro\\src\\lib\\getAppendScripts.js',
'C:\\Users\\Arvin\\AppData\\Local\\npm-cache\\_npx\\7930a8670f922cdb\\node_modules\\metro\\src\\DeltaBundler\\Serializers\\baseBytecodeBundle.js',
'C:\\Users\\Arvin\\AppData\\Local\\npm-cache\\_npx\\7930a8670f922cdb\\node_modules\\metro\\src\\Server.js',
'C:\\Users\\Arvin\\AppData\\Local\\npm-cache\\_npx\\7930a8670f922cdb\\node_modules\\metro\\src\\shared\\output\\bundle.js',
'C:\\Users\\Arvin\\AppData\\Local\\npm-cache\\_npx\\7930a8670f922cdb\\node_modules\\#react-native-community\\cli\\node_modules\\#react-native-community\\cli-plugin-metro\\build\\commands\\bundle\\buildBundle.js',
'C:\\Users\\Arvin\\AppData\\Local\\npm-cache\\_npx\\7930a8670f922cdb\\node_modules\\#react-native-community\\cli\\node_modules\\#react-native-community\\cli-plugin-metro\\build\\commands\\bundle\\bundle.js',
'C:\\Users\\Arvin\\AppData\\Local\\npm-cache\\_npx\\7930a8670f922cdb\\node_modules\\#react-native-community\\cli\\node_modules\\#react-native-community\\cli-plugin-metro\\build\\commands\\bundle\\index.js',
'C:\\Users\\Arvin\\AppData\\Local\\npm-cache\\_npx\\7930a8670f922cdb\\node_modules\\#react-native-community\\cli\\node_modules\\#react-native-community\\cli-plugin-metro\\build\\commands\\index.js',
'C:\\Users\\Arvin\\AppData\\Local\\npm-cache\\_npx\\7930a8670f922cdb\\node_modules\\#react-native-community\\cli\\node_modules\\#react-native-community\\cli-plugin-metro\\build\\index.js',
'C:\\Users\\Arvin\\AppData\\Local\\npm-cache\\_npx\\7930a8670f922cdb\\node_modules\\#react-native-community\\cli\\build\\commands\\index.js',
'C:\\Users\\Arvin\\AppData\\Local\\npm-cache\\_npx\\7930a8670f922cdb\\node_modules\\#react-native-community\\cli\\build\\index.js',
'C:\\Users\\Arvin\\AppData\\Local\\npm-cache\\_npx\\7930a8670f922cdb\\node_modules\\#react-native-community\\cli\\build\\bin.js'
]
}
I have tried removing the node modules and executed 'npm install' but to no avail. Also tried the following:
npm install -g npm-check-updates
ncu -u
npm update
npm install
Your help will be greatly appreciated.
Thanks in advance.
When I run yarn start this error is showing with error command failed with exit code. How can I solve this?
yarn run v1.22.18
$ node -r #babel/register ./.erb/scripts/check-port-in-use.js && yarn start:renderer
node:internal/modules/cjs/loader:936
throw err;
^
Error: Cannot find module '#babel/register'
Require stack:
- internal/preload
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 Module._preloadModules (node:internal/modules/cjs/loader:1282:12)
at loadPreloadModules (node:internal/bootstrap/pre_execution:539:5)
at prepareMainThreadExecution (node:internal/bootstrap/pre_execution:85:3)
at node:internal/main/run_main_module:7:1 {
code: 'MODULE_NOT_FOUND',
requireStack: [ 'internal/preload' ]
I'm getting the below error while running ng new. Tried with cmd opening as Administrator, but not helping.
D:\Training\Angular>ng new test
internal/modules/cjs/loader.js:797
throw err;
^
Error: Cannot find module 'symbol-observable'
Require stack:
- C:\Users\mubarakm\AppData\Roaming\npm\node_modules\#angular\cli\lib\init.js
- C:\Users\mubarakm\AppData\Roaming\npm\node_modules\#angular\cli\bin\ng
←[90m at Function.Module._resolveFilename (internal/modules/cjs/loader.js:794:15)←[39m
←[90m at Function.Module._load (internal/modules/cjs/loader.js:687:27)←[39m
←[90m at Module.require (internal/modules/cjs/loader.js:849:19)←[39m
←[90m at require (internal/modules/cjs/helpers.js:74:18)←[39m
at Object.<anonymous> (C:\Users\mubarakm\AppData\Roaming\npm\node_modules\←[4m#angular←[24m\cli\lib\init.js:10:1)
←[90m at Module._compile (internal/modules/cjs/loader.js:956:30)←[39m
←[90m at Object.Module._extensions..js (internal/modules/cjs/loader.js:973:10)←[39m
←[90m at Module.load (internal/modules/cjs/loader.js:812:32)←[39m
←[90m at Function.Module._load (internal/modules/cjs/loader.js:724:14)←[39m
←[90m at Module.require (internal/modules/cjs/loader.js:849:19)←[39m {
code: ←[32m'MODULE_NOT_FOUND'←[39m,
requireStack: [
←[32m'C:\\Users\\mubarakm\\AppData\\Roaming\\npm\\node_modules\\#angular\\cli\\lib\\init.js'←[39m,
←[32m'C:\\Users\\mubarakm\\AppData\\Roaming\\npm\\node_modules\\#angular\\cli\\bin\\ng'←[39m
]
}
npm i --save symbol-observable (or Yarn, then, Yarn add symbol-observable)
npm install (or Yarn)
npm outdated (or yarn outdated) to check for outdated dependencies(symbol-observable) then upgrading it to the corresonding version if needed by entering yarn upgrade symbol-observable #[version]
Else,
check if you import it correctly from
import { Observable } from 'rxjs/Observable';
to
import { Observable } from 'rxjs';
otherwise,you may have Rxjs issues as mentionned here https://github.com/angular/angular-cli/issues/4756
Simply check for any outdated dependencies using "npm outdated", and if there are any update the angular cli using command "npm update -g #angular/cli", should be good to go.