BrowserslistError: Unknown browser query `dead` while running "Sanity Start" - sanity

when I try to run "Sanity Start" I get the below error.
C:\Users\Jatan\Shareme\shareme_backend>sanity start
BrowserslistError: Unknown browser query `dead`
at C:/Users/Jatan/Shareme/shareme_backend/node_modules/postcss-cssnext/node_modules/browserslist/index.js:164:11
at Array.reduce (<anonymous>)
at resolve (C:/Users/Jatan/Shareme/shareme_backend/node_modules/postcss-cssnext/node_modules/browserslist/index.js:132:18)
at browserslist (C:/Users/Jatan/Shareme/shareme_backend/node_modules/postcss-cssnext/node_modules/browserslist/index.js:224:16)
at cleanBrowsersList (C:/Users/Jatan/Shareme/shareme_backend/node_modules/postcss-cssnext/node_modules/caniuse-api/dist/utils.js:56:59)
at setBrowserScope (C:/Users/Jatan/Shareme/shareme_backend/node_modules/postcss-cssnext/node_modules/caniuse-api/dist/index.js:26:43)
at Object.<anonymous> (C:/Users/Jatan/Shareme/shareme_backend/node_modules/postcss-cssnext/node_modules/caniuse-api/dist/index.js:88:1)
at Module._compile (node:internal/modules/cjs/loader:1105:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1159:10)

Related

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

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

jest-haste-map: watch error complaining that it can't find a file in the jest-haste-map node_modules folder

I just upgraded to RN 0.56.0 and am using jest version: 22.4.3 (updating the jest version doesn't help)
When I try to run my test suite, I get the following error in the terminal:
jest-haste-map: watch error: Error: ENOENT: no such file or directory,
open '/Users/mobilepractice/builds/0bcf5ed0/0/cx-mobile/posting-
plus/PostingPlus/node_modules/jest-haste-map/build/worker.js' at Error
(native) at Object.fs.openSync (fs.js:640:18) at Object.fs.readFileSync
(fs.js:508:33) at Module._extensions..js (module.js:578:20) at
Object.require.extensions.(anonymous function) [as .js]
(/Users/mobilepractice/builds/0bcf5ed0/0/cx-mobile/posting-
plus/PostingPlus/node_modules/babel-register/lib/node.js:152:7) at
Module.load (module.js:487:32) at tryModuleLoad (module.js:446:12) at
Function.Module._load (module.js:438:3) at Module.require
(module.js:497:17) at require (internal/module.js:20:19)
and this error as well:
/Users/mobilepractice/builds/0bcf5ed0/0/cx-mobile/posting-
plus/PostingPlus/node_modules/react-native/jest/hasteImpl.js:50 ) /*:
string | void */ { ^ SyntaxError: Unexpected token ) at
Object.exports.runInThisContext (vm.js:76:16) at Module._compile
(module.js:542:28) 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) at Module.require
(module.js:497:17) at require (internal/module.js:20:19) at Object.
<anonymous> (/Users/mobilepractice/builds/0bcf5ed0/0/cx-mobile/posting-
plus/PostingPlus/node_modules/jest-runtime/node_modules/jest-haste-
map/build/worker.js:16:19) at next (native)
I can see the worker.js file in my node_modules folder, which is why the ENOENT error is confusing.
A solution is to make sure node 8 or higher is installed. This error occurs on node 6.9.1.

Detox Error: Timeout of 120000ms exceeded. For async tests and hooks

I'm trying to run some e2e tests in my react-native up I'm using Detox but I keep getting the following error
1) "before all" hook:
Error: Timeout of 120000ms exceeded. For async tests and hooks, ensure "done()" is called; if returning a Promise, ensure it resolves.
child_process.js:644
throw err;
^
Error: Command failed: node_modules/.bin/mocha e2e --opts e2e/mocha.opts
at checkExecSyncError (child_process.js:601:13)
at Object.execSync (child_process.js:641:13)
at runMocha (/Users/Almog/Full-Time-Employment/Construction-Cloud/RnD/CCMobileApp/node_modules/detox/local-cli/detox-test.js:72:6)
at Object.<anonymous> (/Users/Almog/Full-Time-Employment/Construction-Cloud/RnD/CCMobileApp/node_modules/detox/local-cli/detox-test.js:50:5)
at Module._compile (module.js:643:30)
at Object.Module._extensions..js (module.js:654:10)
at Module.load (module.js:556:32)
at tryModuleLoad (module.js:499:12)
at Function.Module._load (module.js:491:3)
at Function.Module.runMain (module.js:684:10)
Try to run it with detox test --loglevel verbose flag it may provide you additional information on what is the issue.

Running bower gives me module.js:340 throw err

When I try to run bower in the cmd I get:
C:\wamp\www\budgeteer\v4\static>bower
module.js:340
throw err;
^
Error: Cannot find module 'mout'
at Function.Module._resolveFilename (module.js:338:15)
at Function.Module._load (module.js:280:25)
at Module.require (module.js:364:17)
at require (module.js:380:17)
at Object.<anonymous> (C:\Users\Imray\AppData\Roaming\npm\node_modules\bower\bin\bower:7:12)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Function.Module.runMain (module.js:497:10)
What is this error and why am I getting it? I wish the error message would explain more
You have to remove the "bower" package from your node_modules folder.
C:\wamp\www\budgeteer\v4\static> npm uninstall bower

npm SyntaxError: Unexpected token if

I updated, or try to anyway, npm using "sudo npm update -g" and now I cannot use npm for anything. I get the following error:
/usr/local/lib/node_modules/npm/node_modules/npm-registry-client/lib/adduser.js:75
if (!error || !response || response.statusCode !== 409) {
^^
SyntaxError: Unexpected token if
at Module._compile (module.js:439:25)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Module.require (module.js:364:17)
at require (module.js:380:17)
at /usr/local/lib/node_modules/npm/node_modules/npm-registry-client/index.js:54:49
at Array.forEach (native)
at Object.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/npm-registry-client/index.js:52:47)
at Module._compile (module.js:456:26)
This was solved by uninstalling node from brew and reinstalling again.