Parcel: Unknown version 62 of android

Created on 21 Mar 2018  ·  37Comments  ·  Source: parcel-bundler/parcel

If I run parcel src/index.html --no-cache
I'm get error Unknown version 62 of android and build stops
.browserlistrc

>1%
last 2 versions

[email protected]
node v8.9.1
npm 5.6.0
yarn 1.5.1

log:

yarn parcel src/index.html --no-cache
$ /mnt/SSD/Projects/***/node_modules/.bin/parcel src/index.html --no-cache
Server running at http://localhost:1234
🚨  /mnt/SSD/Projects/***/src/index.js: Unknown version 62 of android
    at Function.select (/mnt/SSD/Projects/***/node_modules/babel-preset-env/node_modules/browserslist/index.js:728:17)
    at /mnt/SSD/Projects/***/node_modules/babel-preset-env/node_modules/browserslist/index.js:247:33
    at Array.forEach (<anonymous>)
    at browserslist (/mnt/SSD/Projects/***/node_modules/babel-preset-env/node_modules/browserslist/index.js:229:11)
    at getTargets (/mnt/SSD/Projects/***/node_modules/babel-preset-env/lib/targets-parser.js:103:63)
    at Object.buildPreset [as default] (/mnt/SSD/Projects/***/node_modules/babel-preset-env/lib/index.js:144:45)
    at getEnvPlugins (/mnt/SSD/Projects/***/node_modules/parcel-bundler/src/transforms/babel.js:252:34)
    at getEnvConfig (/mnt/SSD/Projects/***/node_modules/parcel-bundler/src/transforms/babel.js:219:25)
    at <anonymous>
Bug Confirmed Bug ✖️ Non-Parcel bug

Most helpful comment

I have the exact same error message with only env in babelrc's preset, and removing node_modules and .cache or .babelrc doesn't help.

All 37 comments

Can't reproduce. Do you have a .babelrc file?

{
  "presets": ["env", "react-app"],
  "plugins": ["transform-class-properties"]
}

Removed node_modules and it started to work :/ :blue_heart:

I meet the same problem... with my package browsers list:

"browserslist": [
    "> 1%",
    "last 2 versions",
    "not ie <= 10"
  ]

and remove node_modules didn't work, also I removed the browser's list in .babelrc of preset env, didn't work too...

wired question.

@vicvinc try to remove .cache and node_modules folder then start parcel with --no-cache flag again

@FDiskas Tried.. but still got the problem

vicvinc$ parcel src/index.html --no-cache
Server running at http://localhost:1234
🚨  /codebase/src/entry.js: Unknown version 62 of android
    at Function.select (/Users/vicvinc/.config/yarn/global/node_modules/parcel-bundler/node_modules/babel-preset-env/node_modules/browserslist/index.js:739:17)
    at /Users/vicvinc/.config/yarn/global/node_modules/parcel-bundler/node_modules/babel-preset-env/node_modules/browserslist/index.js:182:33
    at Array.reduce (<anonymous>)
    at resolve (/Users/vicvinc/.config/yarn/global/node_modules/parcel-bundler/node_modules/babel-preset-env/node_modules/browserslist/index.js:164:18)
    at browserslist (/Users/vicvinc/.config/yarn/global/node_modules/parcel-bundler/node_modules/babel-preset-env/node_modules/browserslist/index.js:274:16)
    at getTargets (/Users/vicvinc/.config/yarn/global/node_modules/parcel-bundler/node_modules/babel-preset-env/lib/targets-parser.js:103:63)
    at Object.buildPreset [as default] (/Users/vicvinc/.config/yarn/global/node_modules/parcel-bundler/node_modules/babel-preset-env/lib/index.js:144:45)
    at getEnvPlugins (/Users/vicvinc/.config/yarn/global/node_modules/parcel-bundler/src/transforms/babel.js:252:34)
    at getEnvConfig (/Users/vicvinc/.config/yarn/global/node_modules/parcel-bundler/src/transforms/babel.js:219:25)
    at <anonymous>

I have the exact same error message with only env in babelrc's preset, and removing node_modules and .cache or .babelrc doesn't help.

I'm also experiencing this issue after upgrading to 1.7.0. Tried the steps mentioned here, to no avail.

This issue should probably be reopened, as it's still happening.

I've also tried downgrading to 1.6.2, to no avail.

Something interesting: this also happens if I remove the env preset from the config below...
EDIT: I've realised that is because the env preset is loaded by parcel's babel transformer code.

{
  "presets": [
    "env",
    "flow",
    "react",
    "stage-2"
  ],
  "plugins": [
    "transform-es2015-destructuring",
    ["transform-object-rest-spread",
      {
        "useBuiltIns": true
      }
    ]
  ],
  "env": {
    "development": {
      "plugins": [
        "transform-react-jsx-source"
      ]
    },
    "production": {
      "only": [
        "app"
      ],
      "plugins": [
        "transform-react-remove-prop-types",
        "transform-react-constant-elements",
        "transform-react-inline-elements"
      ]
    },
    "test": {
      "plugins": [
        "transform-es2015-modules-commonjs",
        "dynamic-import-node"
      ]
    }
  }
}

@aurbano probably best to open up a new issue for your issue as the issue was a bug in a node_module

Sent with GitHawk

@DeMoorJasper @aurbano, maybe it's a different issue but I think parcel need to be improved on how this particular error is shown. In no way the user think it's a plugin or node_module issue.
Could we keep this current #1036 and label it as a need of improving the error report ? When throwing this error, parcel should add more context to it.

@JonathanHuot I don't mind reopening this issue, but I think it'll be better to open a new issue describing what you would like to see improved and how you'd want the error to look and referencing to this issue. Besides having a better overview of the issues that way it would also get more attention than reopening an old solved issue

Any new progress for this issue? I got this error too, like below:

$ parcel index.html
Server running at http://localhost:1234
🚨  /Users/Yuga/Desktop/VueLearning/vue-parcel/src/main.js: Unknown version 11.3 of ios_saf
    at Function.select (/Users/Yuga/Desktop/VueLearning/vue-parcel/node_modules/babel-preset-env/node_modules/browserslist/index.js:622:17)
    at /Users/Yuga/Desktop/VueLearning/vue-parcel/node_modules/babel-preset-env/node_modules/browserslist/index.js:151:33
    at Array.reduce (<anonymous>)
    at resolve (/Users/Yuga/Desktop/VueLearning/vue-parcel/node_modules/babel-preset-env/node_modules/browserslist/index.js:132:18)
    at browserslist (/Users/Yuga/Desktop/VueLearning/vue-parcel/node_modules/babel-preset-env/node_modules/browserslist/index.js:224:16)
    at getTargets (/Users/Yuga/Desktop/VueLearning/vue-parcel/node_modules/babel-preset-env/lib/targets-parser.js:103:63)
    at Object.buildPreset [as default] (/Users/Yuga/Desktop/VueLearning/vue-parcel/node_modules/babel-preset-env/lib/index.js:144:45)
    at getEnvPlugins (/Users/Yuga/Desktop/VueLearning/vue-parcel/node_modules/parcel-bundler/src/transforms/babel.js:263:34)
    at getEnvConfig (/Users/Yuga/Desktop/VueLearning/vue-parcel/node_modules/parcel-bundler/src/transforms/babel.js:230:25)
    at <anonymous>

name | version
------|----------
node | 9.3.0
parcel-bundler | 1.8.1

I'm receiving the same Unknown version 11.3 of ios_saf error. Any news?

Apparently we are using a newer version of browserslist than babel-preset-env. Parcel computes what browsers to support, then passes it off to babel. But since babel is using an old version of browserslist that doesn't know about new browsers, it fails. I opened a PR to fix it: https://github.com/babel/babel-preset-env/pull/458

Looks like it has been fixed on babel's end; babel/babel-preset-env#458 @devongovett

Cool, closing out this issue then.

I'm still having this issue with the last version of parcel, but it says:

Unknown Version 11.3 of ios_saf

×  E:\projects\streamloots-twitch-ranking\src\viewer\index.js: Unknown version 11.3 of ios_saf
    at Function.select (E:\projects\streamloots-twitch-ranking\node_modules\parcel-bundler\node_modules\babel-preset-env\node_modules\browserslist\index.js:622:17)
    at E:\projects\streamloots-twitch-ranking\node_modules\parcel-bundler\node_modules\babel-preset-env\node_modules\browserslist\index.js:151:33
    at Array.reduce (<anonymous>)
    at resolve (E:\projects\streamloots-twitch-ranking\node_modules\parcel-bundler\node_modules\babel-preset-env\node_modules\browserslist\index.js:132:18)
    at browserslist (E:\projects\streamloots-twitch-ranking\node_modules\parcel-bundler\node_modules\babel-preset-env\node_modules\browserslist\index.js:224:16)
    at getTargets (E:\projects\streamloots-twitch-ranking\node_modules\parcel-bundler\node_modules\babel-preset-env\lib\targets-parser.js:103:63)
    at Object.buildPreset [as default] (E:\projects\streamloots-twitch-ranking\node_modules\parcel-bundler\node_modules\babel-preset-env\lib\index.js:144:45)
    at getEnvPlugins (E:\projects\streamloots-twitch-ranking\node_modules\parcel-bundler\src\transforms\babel.js:263:34)
    at getEnvConfig (E:\projects\streamloots-twitch-ranking\node_modules\parcel-bundler\src\transforms\babel.js:230:25)
    at <anonymous>

package.json:

 "scripts": {
    "start": "concurrently \"yarn watch:viewer\" \"yarn watch:config\" \"yarn watch:live_config\" \"yarn dev-server\"",
    "dev-server": "node server.js",
    "watch:viewer": "parcel watch src/viewer/viewer.html -d dist --public-url ./",
    "watch:config": "parcel watch src/config/config.html -d dist --public-url ./",
    "watch:live_config": "parcel watch src/live-config/live_config.html -d dist --public-url ./",
    "build": "npm run build:viewer && npm run build:config && npm run build:live_config",
    "build:viewer": "parcel build src/viewer/viewer.html -d dist --no-minify --public-url ./",
    "build:config": "parcel build src/config/config.html -d dist --no-minify --public-url ./",
    "build:live_config": "parcel build src/live-config/live_config.html -d dist --no-minify --public-url ./",
    "zip": "cross-env bestzip dist_zip/$npm_package_version.zip dist/*",
    "package": "npm run build && npm run zip"
  },
  "dependencies": {
    "autoprefixer": "8.5.0",
    "babel-polyfill": "6.26.0",
    "mobx": "4.2.1",
    "mobx-react": "5.1.2",
    "moment": "2.22.1",
    "postcss": "6.0.22",
    "postcss-cssnext": "3.1.0",
    "postcss-modules": "1.1.0",
    "react": "16.3.2",
    "react-dom": "16.3.2"
  },
  "devDependencies": {
    "babel-cli": "6.26.0",
    "babel-eslint": "8.2.3",
    "babel-plugin-transform-class-properties": "6.24.1",
    "babel-plugin-transform-decorators-legacy": "^1.3.4",
    "babel-plugin-transform-object-rest-spread": "6.26.0",
    "babel-plugin-transform-remove-console": "6.9.4",
    "babel-preset-env": "1.7.0",
    "babel-preset-flow": "6.23.0",
    "babel-preset-react": "6.24.1",
    "bestzip": "1.1.4",
    "body-parser": "1.18.3",
    "concurrently": "3.5.1",
    "cross-env": "5.1.5",
    "eslint": "4.19.1",
    "eslint-config-react-app": "2.1.0",
    "eslint-plugin-flowtype": "2.46.3",
    "eslint-plugin-import": "2.12.0",
    "eslint-plugin-jsx-a11y": "6.0.3",
    "eslint-plugin-react": "7.8.2",
    "express": "4.16.3",
    "flow-bin": "0.72.0",
    "fs": "0.0.1-security",
    "https": "1.0.0",
    "parcel-bundler": "1.8.1",
    "path": "0.12.7",
    "prettier": "1.12.1"
  }

@josemigg the babel-preset-env dep didn't probably update yet for you, should work if you update it

@DeMoorJasper do you mean in my project? All the packages are updated.

1.7.0 is the last version of babel-preset-env

And I also tried to remove node_modules and install them again.

I meant inside parcel, but if you removed node_modules it should have updated it.

Ok, it was my fault :) yarn install only installs the exact version of the packages, as the babel-preset-env version in parcel is ^1.6.1, I had to execute yarn upgrade

Thanks for the help @DeMoorJasper you helped me figure it out

I'm still facing this issue. All I'm doing is <script src="./node_modules/bootstrap/dist/js/bootstrap.min.js"></script> in my index.html. I don't have any config either.

Good catch :)
Could you try different src?
./node_modules/bootstrap/js/src/index.js

Yup, I tried with both minified and unminified versions of the file, none of them worked.

For anyone else having this issue - you're not alone. There doesn't seem to be a single issue causing it.

I encountered a similar issue today, but for Unknown Version 58 of Opera. The issue was corrected once I ran:
yarn add @babel/core

This is why I stopped using yarn

How is this any better than webpack, I wonder, with errors like this?

@aceofspades Not reproducible any more. No errors. so war. For simple use case parcel is ok. But in my opinion parcel is not production ready. :dancers:

just faced issue like this

I just tried to use Parcel like in Getting Started and got this:

~/Sites/parcel-learn
⇡6% ➜ parcel index.html
Server running at http://localhost:1234
⠼ Building index.js...Browserslist: caniuse-lite is outdated. Please run next command `yarn upgrade caniuse-lite browserslist`
🚨  /Users/grawl/Sites/parcel-learn/index.js: Unknown version 74 of chrome
    at Function.select (/Users/grawl/.config/yarn/global/node_modules/browserslist/index.js:766:17)
    at /Users/grawl/.config/yarn/global/node_modules/browserslist/index.js:155:33
    at Array.reduce (<anonymous>)
    at resolve (/Users/grawl/.config/yarn/global/node_modules/browserslist/index.js:136:18)
    at browserslist (/Users/grawl/.config/yarn/global/node_modules/browserslist/index.js:252:16)
    at getTargets (/Users/grawl/.config/yarn/global/node_modules/@babel/preset-env/lib/targets-parser.js:184:50)
    at _default (/Users/grawl/.config/yarn/global/node_modules/@babel/preset-env/lib/index.js:187:46)
    at Object.default (/Users/grawl/.config/yarn/global/node_modules/@babel/helper-plugin-utils/lib/index.js:19:12)
    at getEnvPlugins (/Users/grawl/.config/yarn/global/node_modules/parcel-bundler/src/transforms/babel/env.js:51:34)
    at getEnvConfig (/Users/grawl/.config/yarn/global/node_modules/parcel-bundler/src/transforms/babel/env.js:12:25)
Browserslist: caniuse-lite is outdated. Please run next command `yarn upgrade caniuse-lite browserslist`
^C

fixed with installing Parcel in package.json, and it's fixed

still having the issue here too, just freshly installed parcel and created an index.html pointing to a main.js and I got the error...

c:\PROJECTS\WEB\MAISONFUTARI\GURAFIKKU  ([email protected])                                                       
λ parcel --version                                                                                              
1.12.3                                                                                                          

c:\PROJECTS\WEB\MAISONFUTARI\GURAFIKKU  ([email protected])                                                       
λ parcel public\index.html                                                                                      
Server running at http://localhost:1234                                                                         
×  c:\PROJECTS\WEB\MAISONFUTARI\GURAFIKKU\public\js\main.js: Unknown version 60 of opera                        
    at Function.select (C:\Users\darku\AppData\Local\Yarn\Data\global\node_modules\browserslist\index.js:942:17)
    at C:\Users\darku\AppData\Local\Yarn\Data\global\node_modules\browserslist\index.js:243:33                  
    at Array.reduce (<anonymous>)                                                                               
    at resolve (C:\Users\darku\AppData\Local\Yarn\Data\global\node_modules\browserslist\index.js:225:18)        
    at browserslist (C:\Users\darku\AppData\Local\Yarn\Data\global\node_modules\browserslist\index.js:349:16)   
    at getTargets (C:\Users\darku\AppData\Local\Yarn\Data\global\node_modules\@babel\preset-env\lib\targets-pars
er.js:184:50)                                                                                                   
    at _default (C:\Users\darku\AppData\Local\Yarn\Data\global\node_modules\@babel\preset-env\lib\index.js:187:4
6)                                                                                                              
    at Object.default (C:\Users\darku\AppData\Local\Yarn\Data\global\node_modules\@babel\helper-plugin-utils\lib
\index.js:19:12)                                                                                                
    at getEnvPlugins (C:\Users\darku\AppData\Local\Yarn\Data\global\node_modules\parcel-bundler\src\transforms\b
abel\env.js:51:34)                                                                                              
    at getEnvConfig (C:\Users\darku\AppData\Local\Yarn\Data\global\node_modules\parcel-bundler\src\transforms\ba
bel\env.js:12:25)                                                                                               

Try using npm instead of yarn :/

Just tried yarn installing and running parcel-bundler for the first time on a create-react-app Typescript project, ran into this:

.../src/main.tsx: Unknown version 63 of opera

I have no .babelrc. We have to use yarn for our project.

Yupp.. Yarn was the problem.
After doing npm install -g parcel-bundler, it began working properly.

@yashspr comment solves this. Maybe opening an issue to yarn to debug this?

Was this page helpful?
0 / 5 - 0 ratings