question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Error: flow_v0.38.x <=v0.52.x: Unexpected trailing characters: <=v0.52.x

See original GitHub issue

We started getting this error when running flow-typed update today:

$ yarn run flow-typed update
yarn run v0.27.5
$ "/app/node_modules/.bin/flow-typed" "update"
• Found 93 dependencies in package.json to install libdefs for. Searching...
• rebasing flow-typed cache...


UNCAUGHT ERROR: Error: flow_v0.38.x <=v0.52.x: Unexpected trailing characters:  <=v0.52.x
    at validationError (/app/node_modules/flow-typed/dist/lib/validationErrors.js:14:11)
    at parseDirString (/app/node_modules/flow-typed/dist/lib/flowVersion.js:155:45)
    at _callee2$ (/app/node_modules/flow-typed/dist/lib/npm/npmLibDefs.js:543:146)
    at tryCatch (/app/node_modules/regenerator-runtime/runtime.js:64:40)
    at Generator.invoke [as _invoke] (/app/node_modules/regenerator-runtime/runtime.js:355:22)
    at Generator.prototype.(anonymous function) [as next] (/app/node_modules/regenerator-runtime/runtime.js:116:21)
    at tryCatch (/app/node_modules/regenerator-runtime/runtime.js:64:40)
    at invoke (/app/node_modules/regenerator-runtime/runtime.js:154:20)
    at /app/node_modules/regenerator-runtime/runtime.js:164:13
    at <anonymous>
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

I guess it’s related to these:

$ git grep '<=v' .
react-redux_v5.x.x.js:// flow-typed version: 19506e57e6/react-redux_v5.x.x/flow_>=v0.30.x <=v0.52.x
react-router-dom_v4.x.x.js:// flow-typed version: 19506e57e6/react-router-dom_v4.x.x/flow_>=v0.38.x <=v0.52.x
react-router_v4.x.x.js:// flow-typed version: 19506e57e6/react-router_v4.x.x/flow_>=v0.30.x <=v0.52.x

Currently we have a CI script that tries to sync our repo with flow-typed, which is where this error surfaced first:

#!/bin/bash -e

FLOW_CACHE=$HOME/.flow-typed
FLOW_REPO=$FLOW_CACHE/repo
FLOW_CACHE_BEFORE_UPDATE=$(cat $FLOW_CACHE/last-update || true)
yarn run flow-typed update-cache
FLOW_CACHE_AFTER_UPDATE=$(cd $FLOW_REPO && git rev-parse HEAD)

if [[ "$FLOW_CACHE_BEFORE_UPDATE" != "$FLOW_CACHE_AFTER_UPDATE" ]]; then
  echo "flow-typed cache updated, running flow-typed update."

  yarn run flow-typed update
  git add flow-typed
  if [[ -n "$(git diff-index --name-only HEAD)" ]]; then
    echo "flow-typed updated definitions, committing."
    git commit -am "Update flow-typed definitions"
  else
    echo "flow-typed did not update definitions, skipping"
  fi
else
  echo "flow-typed cache didn't update, skipping"
fi

echo $FLOW_CACHE_AFTER_UPDATE > $FLOW_CACHE/last-update

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:21
  • Comments:14 (1 by maintainers)

github_iconTop GitHub Comments

12reactions
zabutecommented, Aug 21, 2017

rm -rf flow-typed && flow-typed update works for me

5reactions
ivanichartscommented, Aug 25, 2017

For me issue was fixed by removing trailing space in react-redux_v5.x.x.js on second line, here: "v0.30.x <=v0.52.x":

The line: // flow-typed version: aff2bf770e/react-redux_v5.x.x/flow_>=v0.30.x <=v0.52.x

Read more comments on GitHub >

github_iconTop Results From Across the Web

"Unexpected trailing character" in sublime when trying to edit ...
If this error occurs when you're starting Sublime, navigate to C:/Users/{Your User}/AppData/Roaming/Sublime Text 3/Packages/User and open Plain ...
Read more >
Error trying to parse settings: Unexpected trailing characters in ...
This opens every time I start up Sublime Text. When I go to settings > preferences > key bindings, I have no user...
Read more >
Xcode 10 libfishhook.a cannot be found #19569 - GitHub
It was working fine on the previous version of xcode but now it's giving me following errors while generating the build. Error: Build...
Read more >
@react-native-community/eslint-config | Yarn - Yarn
v0.70.6. Fixed. Fixed regression: @jest/create-cache-key-function dependency was inadvertedly bumped to 29.x. We are bringing it back to 27.0.1.
Read more >
Excitations in Superfluids of Atoms and Polaritons
1.3.2 A non-equilibrium complex nonlinear Schrödinger-type model . . 52 ... of uniform flow v0 (1.2.28) by writing v( r, t) = ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found