jaredpalmer / tsdx

Zero-config CLI for TypeScript package development
https://tsdx.io
MIT License
11.22k stars 507 forks source link

yarn start in the example throws Parcel error: Invalid Version: undefined #987

Closed daniele-zurico closed 3 years ago

daniele-zurico commented 3 years ago

Current Behavior

Just created a new fresh installation of tsdx:

npx tsdx create mylib
yarn
cd example
yarn
yarn start

and it throws an error:

danielezurico@Danieles-MBP example % yarn start
yarn run v1.22.10
$ parcel index.html
Server running at http://localhost:1234 
🚨  /Users/danielezurico/Desktop/mylib/example/index.tsx: Invalid Version: undefined
    at new SemVer (/Users/danielezurico/Desktop/mylib/example/node_modules/semver/semver.js:314:11)
    at compare (/Users/danielezurico/Desktop/mylib/example/node_modules/semver/semver.js:647:10)
    at lt (/Users/danielezurico/Desktop/mylib/example/node_modules/semver/semver.js:688:10)
    at /Users/danielezurico/Desktop/mylib/example/node_modules/@babel/preset-env/lib/index.js:276:22
    at Object.default (/Users/danielezurico/Desktop/mylib/example/node_modules/@babel/helper-plugin-utils/lib/index.js:22:12)
    at getEnvPlugins (/Users/danielezurico/Desktop/mylib/example/node_modules/parcel/src/transforms/babel/env.js:62:34)
    at getEnvConfig (/Users/danielezurico/Desktop/mylib/example/node_modules/parcel/src/transforms/babel/env.js:12:25)
    at async getBabelConfig (/Users/danielezurico/Desktop/mylib/example/node_modules/parcel/src/transforms/babel/config.js:32:19)
    at async babelTransform (/Users/danielezurico/Desktop/mylib/example/node_modules/parcel/src/transforms/babel/transform.js:6:16)
    at async JSAsset.pretransform (/Users/danielezurico/Desktop/mylib/example/node_modules/parcel/src/assets/JSAsset.js:83:5)

Suggested solution(s)

maybe update parcel?

Your environment

System:
    OS: macOS 10.15.7
    CPU: (16) x64 Intel(R) Core(TM) i9-9980HK CPU @ 2.40GHz
    Memory: 2.19 GB / 32.00 GB
    Shell: 5.7.1 - /bin/zsh
  Binaries:
    Node: 12.18.4 - /usr/local/bin/node
    Yarn: 1.22.10 - /usr/local/bin/yarn
    npm: 6.14.6 - /usr/local/bin/npm
  Browsers:
    Chrome: 88.0.4324.192
    Firefox: 82.0
    Safari: 14.0
  npmPackages:
    typescript: ^3.4.5 => 3.9.9 
daniele-zurico commented 3 years ago

just saw duplicated

agilgur5 commented 3 years ago

Yes this is a duplicate of #980 , which itself duplicates an upstream issue. The version is specified in the template; it is not part of TSDX itself.

maybe update parcel?

That issue goes into detail how there is currently no stable and maintained version of Parcel.