Failed to install reactide " Error: Cannot find module 'vs/editor/contrib/gotoSymbol/goToCommands' " - npm

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"],
}),
],

Related

Gets ENOTDIR error when yarn start for expo project

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?

npm --prefix <dependency path> run <lifecycle scripts> (preinstall/install/postinstall/preprepare/prepare/postprepare) fails

I am trying to manually run lifecycle scripts of node_module dependencies for a project with npm --prefix <path> run <lifecycle script> after running npm -w <workspaces> ci --ignore-scripts.
I am attaching a part of log outputs of the scripts I wrote below.
...
Running prepare in node_modules/node-fetch
sh: 1: cross-env: not found
sh: 1: cross-env: not found
Running prepare in node_modules/#graphql-eslint/eslint-plugin/node_modules/cross-fetch
sh: 1: husky: not found
sh: 1: husky: not found
Running prepare in node_modules/sync-fetch
sh: 1: browserify: not found
sh: 1: browserify: not found
Running prepare in node_modules/#iarna/toml
> #iarna/toml#2.2.5 prepare
> npm run setup-burntsushi-toml-suite && npm run setup-iarna-toml-suite
> #iarna/toml#2.2.5 setup-burntsushi-toml-suite
> [ -d test/burntsushi-toml-test ] || (git clone https://github.com/BurntSushi/toml-test test/burntsushi-toml-test; rimraf test/burntsushi-toml-test/.git/hooks/*); cd test/burntsushi-toml-test; git pull
Already up to date.
> #iarna/toml#2.2.5 setup-iarna-toml-suite
> [ -d test/spec-test ] || (git clone https://github.com/iarna/toml-spec-tests -b 0.5.0 test/spec-test; rimraf test/spec-test/.git/hooks/*); cd test/spec-test; git pull
Already up to date.
Running prepare in node_modules/camel-case
Running prepare in node_modules/pascal-case
Running prepare in node_modules/yargs
Running prepare in node_modules/lower-case
Running prepare in node_modules/no-case
Running prepare in node_modules/#graphql-tools/utils/node_modules/camel-case
Running prepare in node_modules/send/node_modules/mime
node:internal/modules/cjs/loader:936
throw err;
^
Error: Cannot find module 'mime-score'
Require stack:
- <path to the project>/node_modules/send/node_modules/mime/src/build.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> (<path to the project>/node_modules/send/node_modules/mime/src/build.js:7:19)
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: [
'<path to the project>/node_modules/send/node_modules/mime/src/build.js'
]
}
node:internal/modules/cjs/loader:936
throw err;
^
Error: Cannot find module 'mime-score'
Require stack:
- <path to the project>/node_modules/send/node_modules/mime/src/build.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> (<path to the project>/node_modules/send/node_modules/mime/src/build.js:7:19)
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: [
'<path to the project>/node_modules/send/node_modules/mime/src/build.js'
]
}
...
Running prepare in /node_modules/#storybook/addon-actions
node:internal/modules/cjs/loader:936
throw err;
^
Error: Cannot find module '<path to the project>/node_modules/scripts/prepare.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: []
}
node:internal/modules/cjs/loader:936
throw err;
^
Error: Cannot find module '<path to the project>/node_modules/scripts/prepare.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: []
}
...
Based on the log, it seems like npm --prefix <path> run <lifecycle script> is often trying to run scripts that does not exist or use commands not installed, and thus fails.
Since some lifecycle scripts removes some codes and tries to rebuild them, I am also failing to build services in my root project.
I was suspecting this might be because
npm ci uses hoisting
dependencies have outdated lifecycle scripts in their package.json's
but after thinking, I don't think neither would be the case and this shouldn't be happening, because npm runs lifecycle scripts after npm ci in the background, and I was able to build services successfully when I used npm -w <workspaces> ci

Error: Cannot find module 'symbol-observable' in Angular

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.

Unable to start new project generated by express-generator. Error: ENOENT: no such file or directory

So I created a git repo -> npm init -> running express-generator getting this error
well it's something related to the sass I guess
$end:DEBUG='src:*'; npm start
ObjectNotFound: Cannot find drive. A drive with the name 'end' does not exist.
> src#0.0.0 start
> node ./bin/www
internal/fs/utils.js:307
throw err;
^
Error: ENOENT: no such file or directory, scandir 'C:\Users\MegaMind\Projects\inventoryInExpress\src\node_modules\node-sass\vendor'
at Object.readdirSync (fs.js:1021:3)
at Object.getInstalledBinaries (C:\Users\MegaMind\Projects\inventoryInExpress\src\node_modules\node-sass\lib\extensions.js:133:13)
at foundBinariesList (C:\Users\MegaMind\Projects\inventoryInExpress\src\node_modules\node-sass\lib\errors.js:20:15)
at foundBinaries (C:\Users\MegaMind\Projects\inventoryInExpress\src\node_modules\node-sass\lib\errors.js:15:5)
at Object.module.exports.missingBinary (C:\Users\MegaMind\Projects\inventoryInExpress\src\node_modules\node-sass\lib\errors.js:45:5)
at module.exports (C:\Users\MegaMind\Projects\inventoryInExpress\src\node_modules\node-sass\lib\binding.js:15:30)
at Object.<anonymous> (C:\Users\MegaMind\Projects\inventoryInExpress\src\node_modules\node-sass\lib\index.js:14:35)
at Module._compile (internal/modules/cjs/loader.js:1063:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)
at Module.load (internal/modules/cjs/loader.js:928:32) {
errno: -4058,
syscall: 'scandir',
code: 'ENOENT',
path: 'C:\\Users\\MegaMind\\Projects\\inventoryInExpress\\src\\node_modules\\node-sass\\vendor'
}

I got an Error: ENOENT: no such file or directory, scandir

I am a newbie and I am trying to run npm run-script watch command and it gives me that error:
Error: ENOENT: no such file or directory, scandir
Log:
> scroller#1.0.0 watch C:\JOB\promocatalog\front
> webpack --mode development --progress --watch
C:\JOB\promocatalog\front\node_modules\webpack-cli\bin\cli.js:93
throw err;
^
Error: ENOENT: no such file or directory, scandir
at Object.readdirSync (fs.js:974:3)
at Object.<anonymous> (C:\JOB\promocatalog\front\webpack.config.js:26:26)
at Module._compile (C:\JOB\promocatalog\front\node_modules\v8-compile-cache\v8-compile-cache.js:194:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1220:10)
at Module.load (internal/modules/cjs/loader.js:1049:32)
at Function.Module._load (internal/modules/cjs/loader.js:937:14)
at Module.require (internal/modules/cjs/loader.js:1089:19)
at require (C:\JOB\promocatalog\front\node_modules\v8-compile-cache\v8-compile-cache.js:161:20)
at WEBPACK_OPTIONS (C:\JOB\promocatalog\front\node_modules\webpack-cli\bin\utils\convert-argv.js:114:13)
at requireConfig (C:\JOB\promocatalog\front\node_modules\webpack-cli\bin\utils\convert-argv.js:116:6)
at C:\JOB\promocatalog\front\node_modules\webpack-cli\bin\utils\convert-argv.js:123:17
at Array.forEach (<anonymous>)
at module.exports (C:\JOB\promocatalog\front\node_modules\webpack-cli\bin\utils\convert-argv.js:121:15)
at C:\JOB\promocatalog\front\node_modules\webpack-cli\bin\cli.js:71:45
at Object.parse (C:\JOB\promocatalog\front\node_modules\yargs\yargs.js:576:18)
at C:\JOB\promocatalog\front\node_modules\webpack-cli\bin\cli.js:49:8
at Object.<anonymous> (C:\JOB\promocatalog\front\node_modules\webpack-cli\bin\cli.js:366:3)
at Module._compile (internal/modules/cjs/loader.js:1200:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1220:10)
at Module.load (internal/modules/cjs/loader.js:1049:32)
at Function.Module._load (internal/modules/cjs/loader.js:937:14)
at Module.require (internal/modules/cjs/loader.js:1089:19)
at require (internal/modules/cjs/helpers.js:73:18)
at Object.<anonymous> (C:\JOB\promocatalog\front\node_modules\webpack\bin\webpack.js:156:2)
at Module._compile (internal/modules/cjs/loader.js:1200:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1220:10)
at Module.load (internal/modules/cjs/loader.js:1049:32)
at Function.Module._load (internal/modules/cjs/loader.js:937:14)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:71:12)
at internal/main/run_main_module.js:17:47 {
errno: -4058,
syscall: 'scandir',
code: 'ENOENT'
}
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! scroller#1.0.0 watch: `webpack --mode development --progress --watch`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the scroller#1.0.0 watch script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Stepa\AppData\Roaming\npm-cache\_logs\2020-07-08T14_34_22_349Z-debug.log
Can anyone help me with this?