flow-typed failing on new project
See original GitHub issueos: macOS High Sierra node: v8.11.2 npm: 5.6.0 yarn: 1.6.0
When following the install instructions the yarn command fails.
➜ electron-app git:(master) yarn
yarn install v1.6.0
[1/4] 🔍 Resolving packages...
[2/4] 🚚 Fetching packages...
info 7zip-bin-linux@1.3.1: The platform "darwin" is incompatible with this module.
info "7zip-bin-linux@1.3.1" is an optional dependency and failed compatibility check. Excluding it from installation.
info 7zip-bin-win@2.1.1: The platform "darwin" is incompatible with this module.
info "7zip-bin-win@2.1.1" is an optional dependency and failed compatibility check. Excluding it from installation.
[3/4] 🔗 Linking dependencies...
[4/4] 📃 Building fresh packages...
$ node -r babel-register internals/scripts/CheckNativeDep.js && npm run flow-typed && npm run build-dll && electron-builder install-app-deps && node node_modules/fbjs-scripts/node/check-dev-engines.js package.json
> electron-react-boilerplate@0.13.2 flow-typed /Users/patrick/projects/electron-app
> rimraf flow-typed/npm && flow-typed install --overwrite || true
• Found 81 dependencies in package.json to install libdefs for. Searching...
UNCAUGHT ERROR: Error: react-apollo_v2.x.x/CONTRIBUTING.md: Unexpected file name. This directory can only contain test files or a libdef file named `react-apollo_v2.x.x.js`.
at validationError (/Users/patrick/projects/electron-app/node_modules/flow-typed/dist/lib/validationErrors.js:14:11)
at /Users/patrick/projects/electron-app/node_modules/flow-typed/dist/lib/npm/npmLibDefs.js:113:53
at Array.forEach (<anonymous>)
at extractLibDefsFromNpmPkgDir$ (/Users/patrick/projects/electron-app/node_modules/flow-typed/dist/lib/npm/npmLibDefs.js:95:23)
at tryCatch (/Users/patrick/projects/electron-app/node_modules/regenerator-runtime/runtime.js:65:40)
at Generator.invoke [as _invoke] (/Users/patrick/projects/electron-app/node_modules/regenerator-runtime/runtime.js:303:22)
at Generator.prototype.(anonymous function) [as next] (/Users/patrick/projects/electron-app/node_modules/regenerator-runtime/runtime.js:117:21)
at tryCatch (/Users/patrick/projects/electron-app/node_modules/regenerator-runtime/runtime.js:65:40)
at invoke (/Users/patrick/projects/electron-app/node_modules/regenerator-runtime/runtime.js:155:20)
at /Users/patrick/projects/electron-app/node_modules/regenerator-runtime/runtime.js:165:13
> electron-react-boilerplate@0.13.2 build-dll /Users/patrick/projects/electron-app
> cross-env NODE_ENV=development node --trace-warnings -r babel-register ./node_modules/webpack/bin/webpack --config webpack.config.renderer.dev.dll.js --colors
Hash: fe8b8a4cf4de11660124
Version: webpack 3.10.0
Time: 865ms
Asset Size Chunks Chunk Names
renderer.dev.dll.js 1.16 MB 0 [emitted] [big] renderer
[./node_modules/electron-debug recursive] ./node_modules/electron-debug 160 bytes {0} [built]
[./node_modules/webpack/buildin/harmony-module.js] (webpack)/buildin/harmony-module.js 596 bytes {0} [built]
[0] dll renderer 12 bytes {0} [built]
+ 148 hidden modules
WARNING in ./node_modules/electron-debug/index.js
81:45-58 Critical dependency: the request of a dependency is an expression
@ ./node_modules/electron-debug/index.js
@ dll renderer
WARNING in ./node_modules/electron-debug/index.js
84:85-106 Critical dependency: the request of a dependency is an expression
@ ./node_modules/electron-debug/index.js
@ dll renderer
• electron-builder version=19.55.3
• loaded configuration file=package.json ("build" field)
• installing production dependencies platform=darwin arch=x64 appDir=/Users/patrick/projects/electron-app/app
✨ Done in 18.40s.
This is the result of npm install:
➜ electron-app git:(master) ✗ npm install
> electron-react-boilerplate@0.13.2 postinstall /Users/patrick/projects/electron-app
> node -r babel-register internals/scripts/CheckNativeDep.js && npm run flow-typed && npm run build-dll && electron-builder install-app-deps && node node_modules/fbjs-scripts/node/check-dev-engines.js package.json
> electron-react-boilerplate@0.13.2 flow-typed /Users/patrick/projects/electron-app
> rimraf flow-typed/npm && flow-typed install --overwrite || true
• Found 81 dependencies in package.json to install libdefs for. Searching...
• rebasing flow-typed cache...
• Installing 13 libDefs...
• react-router_v4.x.x.js
└> ./flow-typed/npm/react-router_v4.x.x.js
react-router
/Users/patrick/projects/electron-app/flow-typed/npm
• flow-bin_v0.x.x.js
└> ./flow-typed/npm/flow-bin_v0.x.x.js
flow-bin
/Users/patrick/projects/electron-app/flow-typed/npm
• react-redux_v5.x.x.js
└> ./flow-typed/npm/react-redux_v5.x.x.js
react-redux
/Users/patrick/projects/electron-app/flow-typed/npm
• chalk_v2.x.x.js
└> ./flow-typed/npm/chalk_v2.x.x.js
chalk
/Users/patrick/projects/electron-app/flow-typed/npm
• enzyme_v3.x.x.js
└> ./flow-typed/npm/enzyme_v3.x.x.js
enzyme
/Users/patrick/projects/electron-app/flow-typed/npm
• react-router-dom_v4.x.x.js
└> ./flow-typed/npm/react-router-dom_v4.x.x.js
react-router-dom
/Users/patrick/projects/electron-app/flow-typed/npm
• redux_v3.x.x.js
└> ./flow-typed/npm/redux_v3.x.x.js
redux
/Users/patrick/projects/electron-app/flow-typed/npm
• jest_v22.x.x.js
└> ./flow-typed/npm/jest_v22.x.x.js
jest
/Users/patrick/projects/electron-app/flow-typed/npm
• express_v4.16.x.js
└> ./flow-typed/npm/express_v4.16.x.js
express
/Users/patrick/projects/electron-app/flow-typed/npm
• history_v4.x.x.js
└> ./flow-typed/npm/history_v4.x.x.js
history
/Users/patrick/projects/electron-app/flow-typed/npm
• react-test-renderer_v16.x.x.js
└> ./flow-typed/npm/react-test-renderer_v16.x.x.js
react-test-renderer
/Users/patrick/projects/electron-app/flow-typed/npm
• minimist_v1.x.x.js
└> ./flow-typed/npm/minimist_v1.x.x.js
minimist
/Users/patrick/projects/electron-app/flow-typed/npm
• rimraf_v2.x.x.js
└> ./flow-typed/npm/rimraf_v2.x.x.js
rimraf
/Users/patrick/projects/electron-app/flow-typed/npm
• Generating stubs for untyped dependencies...
• source-map-support@^0.5.3
└> flow-typed/npm/source-map-support_vx.x.x.js
• enzyme-to-json@^3.3.1
└> flow-typed/npm/enzyme-to-json_vx.x.x.js
• electron-debug@^1.5.0
└> flow-typed/npm/electron-debug_vx.x.x.js
• babel-plugin-dev-expression@^0.2.1
└> flow-typed/npm/babel-plugin-dev-expression_vx.x.x.js
• eslint-formatter-pretty@^1.3.0
└> flow-typed/npm/eslint-formatter-pretty_vx.x.x.js
• eslint-import-resolver-webpack@^0.8.4
└> flow-typed/npm/eslint-import-resolver-webpack_vx.x.x.js
• npm-logical-tree@^1.2.1
└> flow-typed/npm/npm-logical-tree_vx.x.x.js
• url-loader@^0.6.2
└> flow-typed/npm/url-loader_vx.x.x.js
• stylelint-config-standard@^18.0.0
└> flow-typed/npm/stylelint-config-standard_vx.x.x.js
• react-router-redux@^5.0.0-alpha.6
└> flow-typed/npm/react-router-redux_vx.x.x.js
• react-hot-loader@^4.0.0-beta.13
└> flow-typed/npm/react-hot-loader_vx.x.x.js
• babel-jest@^22.1.0
└> flow-typed/npm/babel-jest_vx.x.x.js
• redux-thunk@^2.2.0
└> flow-typed/npm/redux-thunk_vx.x.x.js
• babel-plugin-add-module-exports@^0.2.1
└> flow-typed/npm/babel-plugin-add-module-exports_vx.x.x.js
• babel-preset-react@^6.24.1
└> flow-typed/npm/babel-preset-react_vx.x.x.js
• babel-plugin-transform-class-properties@^6.24.1
└> flow-typed/npm/babel-plugin-transform-class-properties_vx.x.x.js
• babel-preset-react-optimize@^1.0.1
└> flow-typed/npm/babel-preset-react-optimize_vx.x.x.js
• font-awesome@^4.7.0
└> flow-typed/npm/font-awesome_vx.x.x.js
• babel-preset-react-hmre@^1.1.1
└> flow-typed/npm/babel-preset-react-hmre_vx.x.x.js
• babel-preset-env@^1.6.1
└> flow-typed/npm/babel-preset-env_vx.x.x.js
• babel-register@^6.26.0
└> flow-typed/npm/babel-register_vx.x.x.js
• babel-preset-stage-0@^6.24.1
└> flow-typed/npm/babel-preset-stage-0_vx.x.x.js
• detect-port@^1.2.2
└> flow-typed/npm/detect-port_vx.x.x.js
• enzyme-adapter-react-16@^1.1.1
└> flow-typed/npm/enzyme-adapter-react-16_vx.x.x.js
• electron-devtools-installer@^2.2.3
└> flow-typed/npm/electron-devtools-installer_vx.x.x.js
• file-loader@^1.1.6
└> flow-typed/npm/file-loader_vx.x.x.js
• eslint-config-airbnb@^16.1.0
└> flow-typed/npm/eslint-config-airbnb_vx.x.x.js
• redux-logger@^3.0.6
└> flow-typed/npm/redux-logger_vx.x.x.js
• sass-loader@^6.0.6
└> flow-typed/npm/sass-loader_vx.x.x.js
• style-loader@^0.20.1
└> flow-typed/npm/style-loader_vx.x.x.js
• stylefmt@^6.0.0
└> flow-typed/npm/stylefmt_vx.x.x.js
• spectron@^3.8.0
└> flow-typed/npm/spectron_vx.x.x.js
• webpack-merge@^4.1.1
└> flow-typed/npm/webpack-merge_vx.x.x.js
• concurrently@^3.5.1
└> flow-typed/npm/concurrently_vx.x.x.js
• babel-loader@^7.1.2
└> flow-typed/npm/babel-loader_vx.x.x.js
• babel-eslint@^8.2.1
└> flow-typed/npm/babel-eslint_vx.x.x.js
• babel-plugin-transform-es2015-classes@^6.24.1
└> flow-typed/npm/babel-plugin-transform-es2015-classes_vx.x.x.js
• cross-spawn@^6.0.4
└> flow-typed/npm/cross-spawn_vx.x.x.js
• cross-env@^5.1.3
└> flow-typed/npm/cross-env_vx.x.x.js
• electron-builder@^19.55.3
└> flow-typed/npm/electron-builder_vx.x.x.js
• css-loader@^0.28.9
└> flow-typed/npm/css-loader_vx.x.x.js
• eslint-plugin-react@^7.6.1
└> flow-typed/npm/eslint-plugin-react_vx.x.x.js
• eslint-plugin-import@^2.8.0
└> flow-typed/npm/eslint-plugin-import_vx.x.x.js
• eslint-plugin-compat@^2.2.0
└> flow-typed/npm/eslint-plugin-compat_vx.x.x.js
• fbjs-scripts@^0.8.1
└> flow-typed/npm/fbjs-scripts_vx.x.x.js
• extract-text-webpack-plugin@^3.0.2
└> flow-typed/npm/extract-text-webpack-plugin_vx.x.x.js
• eslint-plugin-promise@^3.6.0
└> flow-typed/npm/eslint-plugin-promise_vx.x.x.js
• identity-obj-proxy@^3.0.0
└> flow-typed/npm/identity-obj-proxy_vx.x.x.js
• uglifyjs-webpack-plugin@1.1.8
└> flow-typed/npm/uglifyjs-webpack-plugin_vx.x.x.js
• webpack-bundle-analyzer@^2.9.2
└> flow-typed/npm/webpack-bundle-analyzer_vx.x.x.js
• webpack@^3.10.0
└> flow-typed/npm/webpack_vx.x.x.js
• webpack-dev-server@^2.11.1
└> flow-typed/npm/webpack-dev-server_vx.x.x.js
• eslint-plugin-flowtype@^2.42.0
└> flow-typed/npm/eslint-plugin-flowtype_vx.x.x.js
• eslint@^4.16.0
└> flow-typed/npm/eslint_vx.x.x.js
• devtron@^1.4.0
└> flow-typed/npm/devtron_vx.x.x.js
• electron-rebuild@^1.7.3
└> flow-typed/npm/electron-rebuild_vx.x.x.js
• stylelint@^8.4.0
└> flow-typed/npm/stylelint_vx.x.x.js
• flow-typed@^2.3.0
└> flow-typed/npm/flow-typed_vx.x.x.js
• eslint-plugin-jest@^21.7.0
└> flow-typed/npm/eslint-plugin-jest_vx.x.x.js
• babel-core@^6.26.0
└> flow-typed/npm/babel-core_vx.x.x.js
• eslint-plugin-jsx-a11y@6.0.3
└> flow-typed/npm/eslint-plugin-jsx-a11y_vx.x.x.js
• sinon@^4.2.2
└> flow-typed/npm/sinon_vx.x.x.js
• flow-runtime@^0.16.0
└> flow-typed/npm/flow-runtime_vx.x.x.js
• babel-plugin-flow-runtime@^0.15.0
└> flow-typed/npm/babel-plugin-flow-runtime_vx.x.x.js
• node-sass@^4.7.2
└> flow-typed/npm/node-sass_vx.x.x.js
• electron@^1.7.11
└> flow-typed/npm/electron_vx.x.x.js
!! No flow@v0.64.0-compatible libdefs found in flow-typed for the above untyped dependencies !!
I've generated `any`-typed stubs for these packages, but consider submitting
libdefs for them to https://github.com/flowtype/flow-typed/
> electron-react-boilerplate@0.13.2 build-dll /Users/patrick/projects/electron-app
> cross-env NODE_ENV=development node --trace-warnings -r babel-register ./node_modules/webpack/bin/webpack --config webpack.config.renderer.dev.dll.js --colors
Hash: 592b5073df335b107978
Version: webpack 3.12.0
Time: 1130ms
Asset Size Chunks Chunk Names
renderer.dev.dll.js 1.22 MB 0 [emitted] [big] renderer
[./node_modules/electron-debug recursive] ./node_modules/electron-debug 160 bytes {0} [built]
[./node_modules/webpack/buildin/harmony-module.js] (webpack)/buildin/harmony-module.js 596 bytes {0} [built]
[0] dll renderer 12 bytes {0} [built]
+ 144 hidden modules
WARNING in ./node_modules/electron-debug/index.js
81:45-58 Critical dependency: the request of a dependency is an expression
@ ./node_modules/electron-debug/index.js
@ dll renderer
WARNING in ./node_modules/electron-debug/index.js
84:85-106 Critical dependency: the request of a dependency is an expression
@ ./node_modules/electron-debug/index.js
@ dll renderer
Issue Analytics
- State:
- Created 5 years ago
- Reactions:9
- Comments:9 (2 by maintainers)
Top Results From Across the Web
I just can't get flow-typed to fail test · Issue #1724 - GitHub
Running definition tests against latest 15 flow versions in /Users/squadri/Projects/flow-typed/definitions/npm... Fetching all Flow binaries ...
Read more >Failed to load plugin 'flowtype' declared in 'package.json ...
I created a new React project with create ...
Read more >flow-typed | Yarn - Package Manager
A repository of high-quality, third-party library type definitions for use with Flow. ci status npm package docs discord package health ...
Read more >Flow: A Static Type Checker for JavaScript
Code Faster. Tired of having to run your code to find bugs? Flow identifies problems as you code. Stop wasting your time guessing...
Read more >How to incrementally add Flow to an existing React app
You do not have to completely refactor an existing project to start using it. ... flow-typed create-stub bpk-component-button@latest.
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 Free
Top 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

My recommendation:
Flow is dead, use TypeScript instead 😃
Adding our vote as we just hit this also. Trying to get the base just up to test and we hit this on all our macs. I think this IS a boilerplate issue as it appears it relies on external config of a specific certain way that most of us don’t seem to follow.