yup npm package throws "Invalid Version: undefined" error
See original GitHub issueDo you want to request a feature or report a bug?
Bug
What is the current behavior?
When you have the yup
package as a dependency, ie:
"dependencies": {
"yup": "0.28.5"
}
And then you run flow-typed install --ignoreDeps dev
, flow-typed crashes with:
• Found 1 dependencies in package.json to install libdefs for. Searching...
• rebasing flow-typed cache...
UNCAUGHT ERROR: TypeError: Invalid Version: undefined
at new SemVer (/Users/evhaus/Git/myapp/node_modules/flow-typed/node_modules/semver/classes/semver.js:22:13)
at compare (/Users/evhaus/Git/myapp/node_modules/flow-typed/node_modules/semver/functions/compare.js:3:3)
at Object.lt (/Users/evhaus/Git/myapp/node_modules/flow-typed/node_modules/semver/functions/lt.js:2:29)
at Promise.all.libDefsToSearchForEntries.map (/Users/evhaus/Git/myapp/node_modules/flow-typed/dist/commands/install.js:287:28)
error Command failed with exit code 1.
If the current behavior is a bug, please provide the steps to reproduce.
Reproducible with a tiny package.json
:
{
"name": "test",
"dependencies": {
"yup": "0.28.5"
},
"devDependencies": {
"flow-bin": "0.124.0",
"flow-typed": "3.1.0"
}
}
Then install via npm install
and then run npx flow-typed install --ignoreDeps dev
.
What is the expected behavior?
Libdefs should be installed, or ignored. But not a hard crash.
Local Environment Information
System:
OS: macOS 10.15.4
CPU: (8) x64 Intel(R) Core(TM) i5-8279U CPU @ 2.40GHz
Memory: 295.04 MB / 16.00 GB
Shell: 5.7.1 - /bin/zsh
Binaries:
Node: 10.17.0 - ~/.nvm/versions/node/v10.17.0/bin/node
Yarn: 1.22.4 - /usr/local/bin/yarn
npm: 6.14.5 - ~/.nvm/versions/node/v10.17.0/bin/npm
Watchman: 4.9.0 - /usr/local/bin/watchman
Managers:
Homebrew: 2.2.16 - /usr/local/bin/brew
pip3: 20.0.2 - /usr/local/bin/pip3
RubyGems: 3.0.3 - /usr/bin/gem
Utilities:
Make: 3.81 - /usr/bin/make
GCC: 4.2.1 - /usr/bin/gcc
Git: 2.26.2 - /usr/local/bin/git
Clang: 1103.0.32.59 - /usr/bin/clang
Subversion: 1.10.4 - /usr/bin/svn
Servers:
Apache: 2.4.41 - /usr/sbin/apachectl
Virtualization:
Docker: 19.03.8 - /usr/local/bin/docker
SDKs:
iOS SDK:
Platforms: iOS 13.4, DriverKit 19.0, macOS 10.15, tvOS 13.4, watchOS 6.2
IDEs:
Atom: 1.47.0-beta0
Nano: 2.0.6 - /usr/bin/nano
VSCode: 1.44.2 - /usr/local/bin/code
Vim: 8.1 - /usr/bin/vim
Xcode: 11.4.1/11E503a - /usr/bin/xcodebuild
Languages:
Bash: 3.2.57 - /bin/bash
Go: 1.14.2 - /usr/local/bin/go
Perl: 5.18.4 - /usr/bin/perl
PHP: 7.3.11 - /usr/bin/php
Python: 2.7.16 - /usr/bin/python
Python3: 3.7.7 - /usr/local/bin/python3
Ruby: 2.6.3 - /usr/bin/ruby
Databases:
PostgreSQL: 12.2 - /usr/local/bin/postgres
SQLite: 3.28.0 - /usr/bin/sqlite3
Browsers:
Chrome: 81.0.4044.138
Chrome Canary: 84.0.4144.2
Firefox: 76.0
Safari: 13.1
Issue Analytics
- State:
- Created 3 years ago
- Reactions:6
- Comments:6 (4 by maintainers)
Top Results From Across the Web
Yup - npm
Yup is a JavaScript schema builder for value parsing and validation. Define a schema, transform a value to match, validate the shape of...
Read more >npm install fails "invalid version" - Stack Overflow
I was using 1.0 as the version which was giving me an error. Changing it to 1.0.0 worked. Thanks! – Rizwan Javaid. Sep...
Read more >yup - npm Package Health Analysis - Snyk
An important project maintenance signal to consider for yup is that it hasn't seen any new versions released to npm in the past...
Read more >yup - npm.io
Require a value for the schema. All field values apart from undefined meet this requirement. mixed.typeError(message: string): Schema. Define an error message ...
Read more >Error Messages | Cypress Documentation
Support File Errors. Support file missing or invalid. The supportFolder option was removed from Cypress in version 0.18.0 and was replaced by module...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Confirmed. My issue is now resolved (using
flow-typed@3.2.1
).I’m seeing the same error, I have not isolated which dependencies it fails on here, but the console output I get is: