Closed lacolaco closed 5 years ago
I saw something similar in our setup as well, which I had to fix in https://github.com/angular/angular-cli/pull/14303.
I'm not sure what we can do here. It seems like a dependency problem in browserslist
.
Simple workaround for yarn is resolutions
field in package.json and re-run yarn install --force
.
{
....
"resolutions": {
"caniuse-lite": "1.0.30000971"
}
}
We have the same issue with upgrade to angular 8 and @angular-devkit/architect 0.800.0
Same issue encountered while upgrading to v8 from v7. Upgraded node to v12.3.1 from v10.15.3 and running the below upgrade command
ng update @angular/cli @angular/core
Logs below :
ng serve
Unknown browser kaios
BrowserslistError: Unknown browser kaios
at checkName (D:\fmcts\node_modules\browserslist\index.js:132:20)
at Function.select (D:\fmcts\node_modules\browserslist\index.js:830:18)
at D:\fmcts\node_modules\browserslist\index.js:176:33
at Array.reduce (<anonymous>)
at resolve (D:\fmcts\node_modules\browserslist\index.js:158:18)
at browserslist (D:\fmcts\node_modules\browserslist\index.js:278:16)
at Object.isSupported (D:\fmcts\node_modules\caniuse-api\dist\index.js:62:37)
at Object.isEs5SupportNeeded (D:\fmcts\node_modules\@angular-devkit\build-angular\src\utils\differential-loading.js:22:21)
at Object.getCommonConfig (D:\fmcts\node_modules\@angular-devkit\build-angular\src\angular-cli-files\models\webpack-configs\common.js:65:88)
at D:\fmcts\node_modules\@angular-devkit\build-angular\src\browser\index.js:48:27
at D:\fmcts\node_modules\@angular-devkit\build-angular\src\utils\webpack-browser-config.js:56:26
at Array.map (<anonymous>)
at generateWebpackConfig (D:\fmcts\node_modules\@angular-devkit\build-angular\src\utils\webpack-browser-config.js:31:26)
at async Object.generateBrowserWebpackConfigFromContext (D:\fmcts\node_modules\@angular-devkit\build-angular\src\utils\webpack-browser-config.js:98:20)
at async setup (D:\fmcts\node_modules\@angular-devkit\build-angular\src\dev-server\index.js:70:37)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! logy-ui@0.0.0 start: `ng serve`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the logy-ui@0.0.0 start 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\sartaj\AppData\Roaming\npm-cache\_logs\2019-05-30T04_22_22_135Z-debug.log
Is there any workaround for NPM? Node v12.3.1
I had the same problem until I cleaned up a bit:
rm -fr node_modules
rm package-lock.json
npm i
after that it worked.
doing what @shprink said also solved the problem for me.
I had the same problem until I cleaned up a bit:
rm -fr node_modules rm package-lock.json npm i
after that it worked.
My bad really...I did not do "npm install" at all after doing an upgrade from v7 to v8 (school boy mistake). I am doing that now but I have other issues to solve...Will post details as soon as I am done.
Having same issue all above does not fix it.
Unknown browser kaios BrowserslistError: Unknown browser kaios
Unknown browser kaios BrowserslistError: Unknown browser kaios at checkName (C:\git\node_modules\browserslist\index.js:171:20) at Function.select (C:\git\node_modules\browserslist\index.js:881:18) at C:\git\node_modules\browserslist\index.js:215:33 at Array.reduce (<anonymous>) at resolve (C:\git\node_modules\browserslist\index.js:197:18) at browserslist (C:\git\node_modules\browserslist\index.js:317:16) at Object.isSupported (C:\git\node_modules\caniuse-api\dist\index.js:62:37) at Object.isEs5SupportNeeded (C:\git\node_modules\@angular-devkit\build-angular\src\utils\differential-loading.js:22:21) at Object.getCommonConfig (C:\git\node_modules\@angular-devkit\build-angular\src\angular-cli-files\models\webpack-configs\common.js:66:92) at C:\git\node_modules\@angular-devkit\build-angular\src\browser\index.js:48:27 at C:\git\node_modules\@angular-devkit\build-angular\src\utils\webpack-browser-config.js:56:26
@Sevensnake the solution from @shprink worked to for me but i have to clean the cache, have u tried this ?
rm -rf node_modules
rm package-lock.json
# just to be sure
npm cache clean --force
npm i
Hi all, is this still reproducible with Angular CLI 8.0.3?
Thanks for reporting this issue. This issue is now obsolete due to changes in the recent releases. Please update to the most recent Angular CLI version.
If the problem persists after upgrading, please open a new issue, provide a simple repository reproducing the problem, and describe the difference between the expected and current behavior.
This issue has been automatically locked due to inactivity. Please file a new issue if you are encountering a similar or related problem.
Read more about our automatic conversation locking policy.
This action has been performed automatically by a bot.
π Bug report
Command (mark with an
x
)Is this a regression?
Yes, the previous version in which this bug was not present was: .... ### Description A clear and concise description of the problem... After `ng update @angular/cli` from Anguar CLI v7.3.6, `ng build` command throws such error. ## π¬ Minimal ReproductionI didn't get a repro yet. In my situation, the project has some caniuse-related dependencies;
Diff of
yarn.lock
is here;Before
After
ng update
π₯ Exception or Error
π Your Environment
Anything else relevant?
This seems the same problem to https://stackoverflow.com/questions/55681358/browserslisterror-unknown-browser-kaios