Unknown browser query basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
BrowserslistError: Unknown browser query basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
at error (C:\Users\gegej\Desktop\EasyWayProjects\AngularLearning\AppWork\node_modules\browserslist\index.js:37:11)
at C:\Users\gegej\Desktop\EasyWayProjects\AngularLearning\AppWork\node_modules\browserslist\index.js:222:9
at Array.forEach (native)
at browserslist (C:\Users\gegej\Desktop\EasyWayProjects\AngularLearning\AppWork\node_modules\browserslist\index.js:196:13)
at cleanBrowsersList (C:\Users\gegej\Desktop\EasyWayProjects\AngularLearning\AppWork\node_modules\caniuse-api\dist\utils.js:56:59)
at setBrowserScope (C:\Users\gegej\Desktop\EasyWayProjects\AngularLearning\AppWork\node_modules\caniuse-api\dist\index.js:30:43)
at Object. (C:\Users\gegej\Desktop\EasyWayProjects\AngularLearning\AppWork\node_modules\caniuse-api\dist\index.js:92:1)
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)
at Module.require (module.js:497:17)
at require (internal/module.js:20:19)
at Object. (C:\Users\gegej\Desktop\EasyWayProjects\AngularLearning\AppWork\node_modules\postcss-merge-rules\dist\lib\ensureCompatibility.js:7:19)
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)
at Module.require (module.js:497:17)
at require (internal/module.js:20:19)
at Object. (C:\Users\gegej\Desktop\EasyWayProjects\AngularLearning\AppWork\node_modules\postcss-merge-rules\dist\index.js:21:28)
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)
at Module.require (module.js:497:17)
at require (internal/module.js:20:19)
at Object. (C:\Users\gegej\Desktop\EasyWayProjects\AngularLearning\AppWork\node_modules\cssnano\dist\index.js:113:26)
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)
at Module.require (module.js:497:17)
at require (internal/module.js:20:19)
at Object. (C:\Users\gegej\Desktop\EasyWayProjects\AngularLearning\AppWork\node_modules\angular-cli\models\webpack-configs\styles.js:6:15)
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)
at Module.require (module.js:497:17)
at require (internal/module.js:20:19)
at Object. (C:\Users\gegej\Desktop\EasyWayProjects\AngularLearning\AppWork\node_modules\angular-cli\models\webpack-configs\index.js:8:10)
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)
at Module.require (module.js:497:17)
at require (internal/module.js:20:19)
at Object. (C:\Users\gegej\Desktop\EasyWayProjects\AngularLearning\AppWork\node_modules\angular-cli\models\webpack-config.js:4:25)
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)
at Module.require (module.js:497:17)
at require (internal/module.js:20:19)
at Object. (C:\Users\gegej\Desktop\EasyWayProjects\AngularLearning\AppWork\node_modules\angular-cli\tasks\serve.js:11:24)
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)
at Module.require (module.js:497:17)
at require (internal/module.js:20:19)
at Object. (C:\Users\gegej\Desktop\EasyWayProjects\AngularLearning\AppWork\node_modules\angular-cli\commands\serve.run.js:6:15)
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)
at Module.require (module.js:497:17)
at require (internal/module.js:20:19)
at Class.run (C:\Users\gegej\Desktop\EasyWayProjects\AngularLearning\AppWork\node_modules\angular-cli\commands\serve.js:67:16)
at Class. (C:\Users\gegej\Desktop\EasyWayProjects\AngularLearning\AppWork\node_modules\angular-cli\ember-cli\lib\models\command.js:134:17)
at process._tickCallback (internal/process/next_tick.js:103:7)
Unknown browser query basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
BrowserslistError: Unknown browser query basedir=$(dirname "$(echo "$0" | sed -
e 's,\\,/,g')")
at error (E:\DAVSProjects\testing\angular-frontend\node_modules\browserslist
\index.js:37:11)
at E:\DAVSProjects\testing\angular-frontend\node_modules\browserslist\index.
js:222:9
at Array.forEach ()
at browserslist (E:\DAVSProjects\testing\angular-frontend\node_modules\brows
erslist\index.js:196:13)
at cleanBrowsersList (E:\DAVSProjects\testing\angular-frontend\node_modules
caniuse-api\dist\utils.js:56:59)
at setBrowserScope (E:\DAVSProjects\testing\angular-frontend\node_modules\ca
niuse-api\dist\index.js:29:43)
at Object. (E:\DAVSProjects\testing\angular-frontend\node_modules
\caniuse-api\dist\index.js:91:1)
at Module._compile (module.js:635:30)
at Object.Module._extensions..js (module.js:646:10)
at Module.load (module.js:554:32)
at tryModuleLoad (module.js:497:12)
at Function.Module._load (module.js:489:3)
at Module.require (module.js:579:17)
at require (internal/module.js:11:18)
at Object. (E:\DAVSProjects\testing\angular-frontend\node_modules
\postcss-merge-rules\dist\lib\ensureCompatibility.js:7:19)
at Module._compile (module.js:635:30)
@anilkumarkatta204 search for browserlist and browserlist.cmd file in your node_modules or outside the node_modules if you able to find that delete that from there and again apply ng serve and it will work fine if still not work you can ask me.
@Anindo94 found the browserlist folder but not browserlist.cmd. (actually, after writing this post, I did find it and it solved! Its on the root project folder, not node_modules. And browserlist is a file, not a folder. So you can do this or that below).
@anilkumarkatta204 search for browserlist and browserlist.cmd file in your node_modules or outside the node_modules if you able to find that delete that from there and again apply ng serve and it will work fine if still not work you can ask me.
After deleted browserlist and browserlist.cmd file Still Errors coming:
`[ng] Cannot find module 'browserslist'
[ng] Error: Cannot find module 'browserslist'
[ng] at Function.Module._resolveFilename (internal/modules/cjs/loader.js:636:15)
[ng] at Function.Module._load (internal/modules/cjs/loader.js:562:25)
[ng] at Module.require (internal/modules/cjs/loader.js:690:17)
[ng] at require (internal/modules/cjs/helpers.js:25:18)
[ng] at Object. (F:\HybridMobileApp\latest\Pdf_Viewer\node_modules\autoprefixer\lib\autoprefixer.js:3:20)
[ng] at Module._compile (internal/modules/cjs/loader.js:776:30)
[ng] at Object.Module._extensions..js (internal/modules/cjs/loader.js:787:10)
[ng] at Module.load (internal/modules/cjs/loader.js:653:32)
[ng] at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
[ng] at Function.Module._load (internal/modules/cjs/loader.js:585:3)
[ng] at Module.require (internal/modules/cjs/loader.js:690:17)
[ng] at require (internal/modules/cjs/helpers.js:25:18)
[ng] at Object. (F:\HybridMobileApp\latest\Pdf_Viewer\node_modules@angular-devkit\build-angular\src\angular-cli-files\models\webpack-configs\styles.js:13:22)
[ng] at Module._compile (internal/modules/cjs/loader.js:776:30)
[ng] at Object.Module._extensions..js (internal/modules/cjs/loader.js:787:10)
[ng] at Module.load (internal/modules/cjs/loader.js:653:32)
[ERROR] ng has unexpectedly closed (exit code 1).`