text:
create-react-app -- Installation Error / Please take a look into the debug.log

Is this a bug report?
Yes

Did you try recovering your dependencies?

Yes
Which terms did you search for in User Guide?

create-react-app
Environment

Environment Info:
System:
OS: Windows 10
CPU: (4) x64 Intel(R) Core(TM) i3-3220 CPU @ 3.30GHz
Binaries:
Node: 12.1.0 - C:\Program Files\nodejs\node.EXE
Yarn: Not Found
npm: 6.9.0 - C:\Program Files\nodejs\npm.CMD
Browsers:
Edge: 44.17763.1.0
Internet Explorer: Not Found
npmPackages:
react: Not Found
react-dom: Not Found
react-scripts: Not Found
npmGlobalPackages:
create-react-app: Not Found

Steps to Reproduce

"npx create-react-app client" OR "npm i -g create-react-app --> create-react-app client"

Expected Behavior

Installation successful
Actual Behavior

C:\Users\Subho\Documents\GitHub\MERN_Stack_Development>npx create-react-app client
Creating a new React app in C:\Users\Subho\Documents\GitHub\MERN_Stack_Development\client.
Installing packages. This might take a couple of minutes.
Installing react, react-dom, and react-scripts...
npm ERR! Unexpected end of JSON input while parsing near '..."f96a4cb344e5ad39dd8c'
npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\Subho\AppData\Roaming\npm-cache_logs\2019-05-26T02_07_55_063Z-debug.log
Aborting installation.
npm install --save --save-exact --loglevel error react react-dom react-scripts has failed.
Deleting generated file... package.json
Deleting client/ from C:\Users\Subho\Documents\GitHub\MERN_Stack_Development
Done.

Debug-Log

0 info it worked if it ends with ok
1 verbose cli [
1 verbose cli   'C:\Program Files\nodejs\node.exe',
1 verbose cli   'C:\Users\Subho\AppData\Roaming\npm\node_modules\npm\bin\npm-cli.js',
1 verbose cli   'install',
1 verbose cli   '--save',
1 verbose cli   '--save-exact',
1 verbose cli   '--loglevel',
1 verbose cli   'error',
1 verbose cli   'react',
1 verbose cli   'react-dom',
1 verbose cli   'react-scripts'
1 verbose cli ]
2 info using npm@6.9.0
3 info using node@v12.1.0
4 verbose npm-session a5f69323147262cd
5 silly install loadCurrentTree
6 silly install readLocalPackageData
7 http fetch GET 200 https://registry.npmjs.org/react 39ms (from cache)
8 http fetch GET 200 https://registry.npmjs.org/react-dom 44ms (from cache)
9 http fetch GET 200 https://registry.npmjs.org/react-scripts 48ms (from cache)
10 silly pacote tag manifest for react@latest fetched in 75ms
11 silly pacote tag manifest for react-dom@latest fetched in 56ms
12 silly pacote tag manifest for react-scripts@latest fetched in 57ms
13 timing stage:loadCurrentTree Completed in 122ms
14 silly install loadIdealTree
15 silly install cloneCurrentTreeToIdealTree
16 timing stage:loadIdealTree:cloneCurrentTree Completed in 0ms
17 silly install loadShrinkwrap
18 timing stage:loadIdealTree:loadShrinkwrap Completed in 2ms
19 silly install loadAllDepsIntoIdealTree
20 silly resolveWithNewModule react@16.8.6 checking installable status
21 silly resolveWithNewModule react-dom@16.8.6 checking installable status
22 silly resolveWithNewModule react-scripts@3.0.1 checking installable status
23 http fetch GET 200 https://registry.npmjs.org/loose-envify 32ms (from cache)
24 http fetch GET 200 https://registry.npmjs.org/object-assign 31ms (from cache)
25 http fetch GET 200 https://registry.npmjs.org/prop-types 29ms (from cache)
26 http fetch GET 200 https://registry.npmjs.org/scheduler 33ms (from cache)
27 silly pacote range manifest for prop-types@^15.6.2 fetched in 37ms
28 silly resolveWithNewModule prop-types@15.7.2 checking installable status
29 silly pacote range manifest for loose-envify@^1.1.0 fetched in 43ms
30 silly resolveWithNewModule loose-envify@1.4.0 checking installable status
31 silly pacote range manifest for object-assign@^4.1.1 fetched in 40ms
32 silly resolveWithNewModule object-assign@4.1.1 checking installable status
33 silly pacote range manifest for scheduler@^0.13.6 fetched in 39ms
34 silly resolveWithNewModule scheduler@0.13.6 checking installable status
35 http fetch GET 200 https://registry.npmjs.org/js-tokens 6ms (from cache)
36 silly pacote range manifest for js-tokens@^3.0.0 || ^4.0.0 fetched in 8ms
37 silly resolveWithNewModule js-tokens@4.0.0 checking installable status
38 http fetch GET 200 https://registry.npmjs.org/react-is 8ms (from cache)
39 silly pacote range manifest for react-is@^16.8.1 fetched in 12ms
40 silly resolveWithNewModule react-is@16.8.6 checking installable status
41 http fetch GET 200 https://registry.npmjs.org/@svgr%2Fwebpack 42ms (from cache)
42 http fetch GET 200 https://registry.npmjs.org/@babel%2Fcore 44ms (from cache)
43 http fetch GET 200 https://registry.npmjs.org/babel-eslint 41ms (from cache)
44 http fetch GET 200 https://registry.npmjs.org/@typescript-eslint%2Feslint-plugin 47ms (from cache)
45 http fetch GET 200 https://registry.npmjs.org/@typescript-eslint%2Fparser 52ms (from cache)
46 http fetch GET 200 https://registry.npmjs.org/babel-loader 54ms (from cache)
47 http fetch GET 200 https://registry.npmjs.org/babel-plugin-named-asset-import 62ms (from cache)
48 http fetch GET 200 https://registry.npmjs.org/babel-jest 63ms (from cache)
49 http fetch GET 200 https://registry.npmjs.org/camelcase 63ms (from cache)
50 http fetch GET 200 https://registry.npmjs.org/babel-preset-react-app 65ms (from cache)
51 silly pacote version manifest for @babel/core@7.4.3 fetched in 77ms
52 silly resolveWithNewModule @babel/core@7.4.3 checking installable status
53 silly pacote version manifest for @svgr/webpack@4.1.0 fetched in 77ms
54 silly resolveWithNewModule @svgr/webpack@4.1.0 checking installable status
55 silly pacote version manifest for babel-eslint@10.0.1 fetched in 77ms
56 silly resolveWithNewModule babel-eslint@10.0.1 checking installable status
57 silly pacote version manifest for @typescript-eslint/parser@1.6.0 fetched in 79ms
58 silly resolveWithNewModule @typescript-eslint/parser@1.6.0 checking installable status
59 silly pacote version manifest for @typescript-eslint/eslint-plugin@1.6.0 fetched in 82ms
60 silly resolveWithNewModule @typescript-eslint/eslint-plugin@1.6.0 checking installable status
61 silly pacote version manifest for babel-loader@8.0.5 fetched in 80ms
62 silly resolveWithNewModule babel-loader@8.0.5 checking installable status
63 silly pacote range manifest for babel-plugin-named-asset-import@^0.3.2 fetched in 84ms
64 silly resolveWithNewModule babel-plugin-named-asset-import@0.3.2 checking installable status
65 silly pacote range manifest for babel-jest@^24.8.0 fetched in 86ms
66 silly resolveWithNewModule babel-jest@24.8.0 checking installable status
67 silly pacote range manifest for babel-preset-react-app@^9.0.0 fetched in 87ms
68 silly resolveWithNewModule babel-preset-react-app@9.0.0 checking installable status
69 silly pacote range manifest for camelcase@^5.2.0 fetched in 87ms
70 silly resolveWithNewModule camelcase@5.3.1 checking installable status
71 http fetch GET 200 https://registry.npmjs.org/case-sensitive-paths-webpack-plugin 58ms (from cache)
72 http fetch GET 200 https://registry.npmjs.org/dotenv 52ms (from cache)
73 http fetch GET 200 https://registry.npmjs.org/css-loader 60ms (from cache)
74 http fetch GET 200 https://registry.npmjs.org/dotenv-expand 57ms (from cache)
75 http fetch GET 200 https://registry.npmjs.org/eslint-config-react-app 58ms (from cache)
76 http fetch GET 200 https://registry.npmjs.org/eslint 60ms (from cache)
77 http fetch GET 200 https://registry.npmjs.org/eslint-plugin-import 70ms (from cache)
78 http fetch GET 200 https://registry.npmjs.org/eslint-loader 76ms (from cache)
79 http fetch GET 200 https://registry.npmjs.org/eslint-plugin-flowtype 76ms (from cache)
80 silly fetchPackageMetaData error for eslint-plugin-import@2.16.0 Unexpected end of JSON input while parsing near '..."f96a4cb344e5ad39dd8c'
81 silly pacote version manifest for dotenv@6.2.0 fetched in 98ms
82 silly resolveWithNewModule dotenv@6.2.0 checking installable status
83 http fetch GET 200 https://registry.npmjs.org/eslint-plugin-jsx-a11y 88ms (from cache)
84 silly pacote version manifest for case-sensitive-paths-webpack-plugin@2.2.0 fetched in 108ms
85 silly resolveWithNewModule case-sensitive-paths-webpack-plugin@2.2.0 checking installable status
86 silly pacote version manifest for css-loader@2.1.1 fetched in 110ms
87 silly resolveWithNewModule css-loader@2.1.1 checking installable status
88 silly pacote version manifest for dotenv-expand@4.2.0 fetched in 104ms
89 silly resolveWithNewModule dotenv-expand@4.2.0 checking installable status
90 silly pacote range manifest for eslint-config-react-app@^4.0.1 fetched in 105ms
91 silly resolveWithNewModule eslint-config-react-app@4.0.1 checking installable status
92 silly pacote range manifest for eslint@^5.16.0 fetched in 113ms
93 silly resolveWithNewModule eslint@5.16.0 checking installable status
94 silly pacote version manifest for eslint-loader@2.1.2 fetched in 109ms
95 silly resolveWithNewModule eslint-loader@2.1.2 checking installable status
96 silly pacote version manifest for eslint-plugin-flowtype@2.50.1 fetched in 110ms
97 silly resolveWithNewModule eslint-plugin-flowtype@2.50.1 checking installable status
98 silly pacote version manifest for eslint-plugin-jsx-a11y@6.2.1 fetched in 120ms
99 silly resolveWithNewModule eslint-plugin-jsx-a11y@6.2.1 checking installable status
100 http fetch GET 200 https://registry.npmjs.org/eslint-plugin-react 74ms (from cache)
101 http fetch GET 200 https://registry.npmjs.org/file-loader 66ms (from cache)
102 http fetch GET 200 https://registry.npmjs.org/eslint-plugin-react-hooks 69ms (from cache)
103 http fetch GET 200 https://registry.npmjs.org/html-webpack-plugin 64ms (from cache)
104 http fetch GET 200 https://registry.npmjs.org/fs-extra 67ms (from cache)
105 http fetch GET 200 https://registry.npmjs.org/identity-obj-proxy 69ms (from cache)
106 http fetch GET 200 https://registry.npmjs.org/is-wsl 66ms (from cache)
107 silly pacote version manifest for eslint-plugin-react@7.12.4 fetched in 92ms
108 silly resolveWithNewModule eslint-plugin-react@7.12.4 checking installable status
109 http fetch GET 200 https://registry.npmjs.org/jest-environment-jsdom-fourteen 58ms (from cache)
110 http fetch GET 200 https://registry.npmjs.org/jest 59ms (from cache)
111 silly fetchPackageMetaData error for jest-environment-jsdom-fourteen@0.1.0 Unexpected end of JSON input while parsing near '..."jest":"^24.1.0","mkd'
112 silly pacote version manifest for file-loader@3.0.1 fetched in 95ms
113 silly resolveWithNewModule file-loader@3.0.1 checking installable status
114 silly pacote range manifest for eslint-plugin-react-hooks@^1.5.0 fetched in 98ms
115 silly resolveWithNewModule eslint-plugin-react-hooks@1.6.0 checking installable status
116 silly pacote version manifest for html-webpack-plugin@4.0.0-beta.5 fetched in 91ms
117 silly resolveWithNewModule html-webpack-plugin@4.0.0-beta.5 checking installable status
118 http fetch GET 200 https://registry.npmjs.org/jest-resolve 65ms (from cache)
119 silly pacote version manifest for fs-extra@7.0.1 fetched in 98ms
120 silly resolveWithNewModule fs-extra@7.0.1 checking installable status
121 silly pacote version manifest for identity-obj-proxy@3.0.0 fetched in 99ms
122 silly resolveWithNewModule identity-obj-proxy@3.0.0 checking installable status
123 silly pacote range manifest for is-wsl@^1.1.0 fetched in 94ms
124 silly resolveWithNewModule is-wsl@1.1.0 checking installable status
125 silly pacote version manifest for jest@24.7.1 fetched in 88ms
126 silly resolveWithNewModule jest@24.7.1 checking installable status
127 silly pacote version manifest for jest-resolve@24.7.1 fetched in 93ms
128 silly resolveWithNewModule jest-resolve@24.7.1 checking installable status
129 http fetch GET 200 https://registry.npmjs.org/jest-watch-typeahead 58ms (from cache)
130 http fetch GET 200 https://registry.npmjs.org/mini-css-extract-plugin 54ms (from cache)
131 http fetch GET 200 https://registry.npmjs.org/optimize-css-assets-webpack-plugin 54ms (from cache)
132 http fetch GET 200 https://registry.npmjs.org/postcss-flexbugs-fixes 47ms (from cache)
133 http fetch GET 200 https://registry.npmjs.org/pnp-webpack-plugin 47ms (from cache)
134 http fetch GET 200 https://registry.npmjs.org/postcss-normalize 39ms (from cache)
135 http fetch GET 200 https://registry.npmjs.org/postcss-loader 49ms (from cache)
136 http fetch GET 200 https://registry.npmjs.org/postcss-preset-env 41ms (from cache)
137 silly pacote version manifest for jest-watch-typeahead@0.3.0 fetched in 72ms
138 silly resolveWithNewModule jest-watch-typeahead@0.3.0 checking installable status
139 http fetch GET 200 https://registry.npmjs.org/postcss-safe-parser 43ms (from cache)
140 silly pacote version manifest for mini-css-extract-plugin@0.5.0 fetched in 71ms
141 silly resolveWithNewModule mini-css-extract-plugin@0.5.0 checking installable status
142 silly pacote version manifest for optimize-css-assets-webpack-plugin@5.0.1 fetched in 74ms
143 silly resolveWithNewModule optimize-css-assets-webpack-plugin@5.0.1 checking installable status
144 silly pacote version manifest for postcss-flexbugs-fixes@4.1.0 fetched in 67ms
145 silly resolveWithNewModule postcss-flexbugs-fixes@4.1.0 checking installable status
146 silly pacote version manifest for pnp-webpack-plugin@1.2.1 fetched in 69ms
147 silly resolveWithNewModule pnp-webpack-plugin@1.2.1 checking installable status
148 http fetch GET 200 https://registry.npmjs.org/react-app-polyfill 42ms (from cache)
149 silly pacote version manifest for postcss-normalize@7.0.1 fetched in 66ms
150 silly resolveWithNewModule postcss-normalize@7.0.1 checking installable status
151 silly pacote version manifest for postcss-loader@3.0.0 fetched in 75ms
152 silly resolveWithNewModule postcss-loader@3.0.0 checking installable status
153 silly pacote version manifest for postcss-preset-env@6.6.0 fetched in 67ms
154 silly resolveWithNewModule postcss-preset-env@6.6.0 checking installable status
155 silly pacote version manifest for postcss-safe-parser@4.0.1 fetched in 67ms
156 silly resolveWithNewModule postcss-safe-parser@4.0.1 checking installable status
157 silly pacote range manifest for react-app-polyfill@^1.0.1 fetched in 65ms
158 silly resolveWithNewModule react-app-polyfill@1.0.1 checking installable status
159 http fetch GET 200 https://registry.npmjs.org/resolve 36ms (from cache)
160 http fetch GET 200 https://registry.npmjs.org/react-dev-utils 39ms (from cache)
161 http fetch GET 200 https://registry.npmjs.org/sass-loader 45ms (from cache)
162 http fetch GET 200 https://registry.npmjs.org/semver 46ms (from cache)
163 http fetch GET 200 https://registry.npmjs.org/style-loader 45ms (from cache)
164 silly pacote range manifest for react-dev-utils@^9.0.1 fetched in 58ms
165 silly resolveWithNewModule react-dev-utils@9.0.1 checking installable status
166 silly pacote version manifest for resolve@1.10.0 fetched in 60ms
167 silly resolveWithNewModule resolve@1.10.0 checking installable status
168 http fetch GET 200 https://registry.npmjs.org/terser-webpack-plugin 44ms (from cache)
169 http fetch GET 200 https://registry.npmjs.org/ts-pnp 46ms (from cache)
170 http fetch GET 200 https://registry.npmjs.org/url-loader 47ms (from cache)
171 silly pacote version manifest for sass-loader@7.1.0 fetched in 64ms
172 silly resolveWithNewModule sass-loader@7.1.0 checking installable status
173 silly pacote version manifest for semver@6.0.0 fetched in 71ms
174 silly resolveWithNewModule semver@6.0.0 checking installable status
175 http fetch GET 200 https://registry.npmjs.org/webpack 59ms (from cache)
176 silly pacote version manifest for style-loader@0.23.1 fetched in 88ms
177 silly resolveWithNewModule style-loader@0.23.1 checking installable status
178 http fetch GET 200 https://registry.npmjs.org/webpack-dev-server 63ms (from cache)
179 silly pacote version manifest for terser-webpack-plugin@1.2.3 fetched in 90ms
180 silly resolveWithNewModule terser-webpack-plugin@1.2.3 checking installable status
181 silly pacote version manifest for ts-pnp@1.1.2 fetched in 110ms
182 silly resolveWithNewModule ts-pnp@1.1.2 checking installable status
183 silly pacote version manifest for url-loader@1.1.2 fetched in 112ms
184 silly resolveWithNewModule url-loader@1.1.2 checking installable status
185 silly pacote version manifest for webpack@4.29.6 fetched in 113ms
186 silly resolveWithNewModule webpack@4.29.6 checking installable status
187 http fetch GET 200 https://registry.npmjs.org/workbox-webpack-plugin 78ms (from cache)
188 http fetch GET 200 https://registry.npmjs.org/webpack-manifest-plugin 80ms (from cache)
189 silly pacote version manifest for webpack-dev-server@3.2.1 fetched in 99ms
190 silly resolveWithNewModule webpack-dev-server@3.2.1 checking installable status
191 silly pacote version manifest for workbox-webpack-plugin@4.2.0 fetched in 82ms
192 silly resolveWithNewModule workbox-webpack-plugin@4.2.0 checking installable status
193 silly pacote version manifest for webpack-manifest-plugin@2.0.4 fetched in 84ms
194 silly resolveWithNewModule webpack-manifest-plugin@2.0.4 checking installable status
195 http fetch GET 200 https://registry.npmjs.org/fsevents 67ms (from cache)
196 silly pacote version manifest for fsevents@2.0.6 fetched in 69ms
197 silly resolveWithNewModule fsevents@2.0.6 checking installable status
198 timing stage:rollbackFailedOptional Completed in 1ms
199 timing stage:runTopLevelLifecycles Completed in 755ms
200 silly saveTree client@0.1.0
200 silly saveTree +-- react-dom@16.8.6
200 silly saveTree | +-- loose-envify@1.4.0
200 silly saveTree | | -- js-tokens@4.0.0 200 silly saveTree | +-- object-assign@4.1.1 200 silly saveTree | +-- prop-types@15.7.2 200 silly saveTree | | -- react-is@16.8.6
200 silly saveTree | -- scheduler@0.13.6 200 silly saveTree +-- react-scripts@3.0.1 200 silly saveTree | +-- @babel/core@7.4.3 200 silly saveTree | | -- resolve@1.10.0
200 silly saveTree | +-- @svgr/webpack@4.1.0
200 silly saveTree | +-- @typescript-eslint/eslint-plugin@1.6.0
200 silly saveTree | | -- @typescript-eslint/parser@1.6.0 200 silly saveTree | +-- @typescript-eslint/parser@1.6.0 200 silly saveTree | +-- babel-eslint@10.0.1 200 silly saveTree | +-- babel-jest@24.8.0 200 silly saveTree | +-- babel-loader@8.0.5 200 silly saveTree | +-- babel-plugin-named-asset-import@0.3.2 200 silly saveTree | +-- babel-preset-react-app@9.0.0 200 silly saveTree | +-- camelcase@5.3.1 200 silly saveTree | +-- case-sensitive-paths-webpack-plugin@2.2.0 200 silly saveTree | +-- css-loader@2.1.1 200 silly saveTree | +-- dotenv-expand@4.2.0 200 silly saveTree | +-- dotenv@6.2.0 200 silly saveTree | +-- eslint-config-react-app@4.0.1 200 silly saveTree | +-- eslint-loader@2.1.2 200 silly saveTree | +-- eslint-plugin-flowtype@2.50.1 200 silly saveTree | +-- eslint-plugin-jsx-a11y@6.2.1 200 silly saveTree | +-- eslint-plugin-react-hooks@1.6.0 200 silly saveTree | +-- eslint-plugin-react@7.12.4 200 silly saveTree | +-- eslint@5.16.0 200 silly saveTree | +-- file-loader@3.0.1 200 silly saveTree | +-- fs-extra@7.0.1 200 silly saveTree | +-- fsevents@2.0.6 200 silly saveTree | +-- html-webpack-plugin@4.0.0-beta.5 200 silly saveTree | +-- identity-obj-proxy@3.0.0 200 silly saveTree | +-- is-wsl@1.1.0 200 silly saveTree | +-- jest-resolve@24.7.1 200 silly saveTree | +-- jest-watch-typeahead@0.3.0 200 silly saveTree | +-- jest@24.7.1 200 silly saveTree | +-- mini-css-extract-plugin@0.5.0 200 silly saveTree | +-- optimize-css-assets-webpack-plugin@5.0.1 200 silly saveTree | +-- pnp-webpack-plugin@1.2.1 200 silly saveTree | | -- ts-pnp@1.1.2
200 silly saveTree | +-- postcss-flexbugs-fixes@4.1.0
200 silly saveTree | +-- postcss-loader@3.0.0
200 silly saveTree | +-- postcss-normalize@7.0.1
200 silly saveTree | +-- postcss-preset-env@6.6.0
200 silly saveTree | +-- postcss-safe-parser@4.0.1
200 silly saveTree | +-- react-app-polyfill@1.0.1
200 silly saveTree | +-- react-dev-utils@9.0.1
200 silly saveTree | +-- resolve@1.10.0
200 silly saveTree | +-- sass-loader@7.1.0
200 silly saveTree | +-- semver@6.0.0
200 silly saveTree | +-- style-loader@0.23.1
200 silly saveTree | +-- terser-webpack-plugin@1.2.3
200 silly saveTree | +-- ts-pnp@1.1.2
200 silly saveTree | +-- url-loader@1.1.2
200 silly saveTree | +-- webpack-dev-server@3.2.1
200 silly saveTree | +-- webpack-manifest-plugin@2.0.4
200 silly saveTree | +-- webpack@4.29.6
200 silly saveTree | -- workbox-webpack-plugin@4.2.0 200 silly saveTree -- react@16.8.6
201 verbose stack SyntaxError: Unexpected end of JSON input while parsing near '..."f96a4cb344e5ad39dd8c'
201 verbose stack     at JSON.parse ()
201 verbose stack     at parseJson (C:\Users\Subho\AppData\Roaming\npm\node_modules\npm\node_modules\json-parse-better-errors\index.js:7:17)
201 verbose stack     at C:\Users\Subho\AppData\Roaming\npm\node_modules\npm\node_modules\node-fetch-npm\src\body.js:96:50
201 verbose stack     at processTicksAndRejections (internal/process/task_queues.js:89:5)
202 verbose cwd C:\Users\Subho\Documents\GitHub\MERN_Stack_Development\client
203 verbose Windows_NT 10.0.17763
204 verbose argv "C:\Program Files\nodejs\node.exe" "C:\Users\Subho\AppData\Roaming\npm\node_modules\npm\bin\npm-cli.js" "install" "--save" "--save-exact" "--loglevel" "error" "react" "react-dom" "react-scripts"
205 verbose node v12.1.0
206 verbose npm  v6.9.0
207 error Unexpected end of JSON input while parsing near '..."f96a4cb344e5ad39dd8c'
208 verbose exit [ 1, true ]

Reproducible Demo

https://github.com/isubhokarma/MERN_Stack_Development

@isubhokarma
The error you are showing here is in create-react-app command but you gave us a demo link which means that the command was successful and you pushed the results to github.
I downloaded your repository and ran npm i without any errors, Do you still have this problem??

Hello, @mohsenSy
Yes, I'm still facing the same issue. I can't install - "server-folder/ npx create-react-app client" and the installation process it is coming up with this --

C:\Users\Subho\Documents\GitHub\MERN_Stack_Development>npx create-react-app client
Creating a new React app in C:\Users\Subho\Documents\GitHub\MERN_Stack_Development\client.
Installing packages. This might take a couple of minutes.
Installing react, react-dom, and react-scripts...
npm ERR! Unexpected end of JSON input while parsing near '..."f96a4cb344e5ad39dd8c'
npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\Subho\AppData\Roaming\npm-cache_logs\2019-05-27T03_36_41_725Z-debug.log
Aborting installation.
npm install --save --save-exact --loglevel error react react-dom react-scripts has failed.
Deleting generated file... package.json
Deleting client/ from C:\Users\Subho\Documents\GitHub\MERN_Stack_Development
Done.

Please, take a look and try installing "npx create-react-app client" inside the server folder (ie. MERN_Stack_Development) and let me know ASAP.

@mohsenSy
Here's the debug.log file -- https://send.firefox.com/download/bc3fb2cea62b0096/#YkU5rEcmXgaw67aVlGB3Sg

While the installation process the terminal is showing some sudden error message like "jest-environment-jsdom-fourteen": "0.1.0 json error unexpected error".

@isubhokarma, can you please try cleaning out your npm cache?
npm cache clean --force

if that does or doesn't help, let us know!

@mrmckeb Thank You, Broo. It worked.

authors: isubhokarma mohsenSy mrmckeb


text:
production build doesn't work while develpment build do

i have this func that simply calculate ax²+bx+c
handleSubmit = (event) => {
    event.preventDefault();
    let a = this.state.a;
    let b = this.state.b;
    let c = this.state.c;
    let ac4 = a * 4 * c;
    let delta = b * b - ac4;
    let result = {};
    if (delta < 0) result = { x1: "imag.!", x2: "imag.!" };
    else {
      delta = delta ** (1 / 2);
      a = 2 * a;
      let x1 = (-b - delta) / a;
      let x2 = (-b + delta) / a;
      result = { x1, x2 };
    }

but with the production build it looks like this
            n.handleSubmit = function(e) {
                e.preventDefault();
                var t = n.state.a
                  , l = n.state.b
                  , r = l * l - 4 * t * n.state.c
                  , o = {};
                r < 0 ? o = {
                    x1: "imag.!",
                    x2: "imag.!"
                } : o = {
                    x1: (-l - (r = a.pow(r, .5))) / (t *= 2),
                    x2: (-l + r) / t
                };

and while submitting i get this error: a.pow is not a function
and the a is clearly not defined inside this function

Without knowing exactly what your target is and what browser you're using to run your code it's a bit hard to know what is going wrong.
Have you tried using Math.pow instead of **?
According to documentation it should output Math.pow when you use **. So are you sure a is not defined as Math somewhere outside the code?

i changed ** to Math.sqrt and changed the variables names from a b c to aValue bValue cValue but I still get the error :  a.sqrt is not a function
the production build code looks the same except that now it's a.sqrt(r) instead of a.pow(r, .5)

It's hard to help with the amount of info you've provided. Can you reproduce it in isolation? Can you provide browserlist target and which browser you're using?

https://react-practice-81cac.web.app/ this the website (just a test) i used chrome phone version and desktop version

 this is the website , am using ** back cuz I was having errors when I used Math.sqrt but I think it doesn't matter
anyway I am using chrome desktop version , and chrome phone version

 this is the website , am using ** back cuz I was having errors when I used Math.sqrt but I think it doesn't matter
anyway I am using chrome desktop version , and chrome phone version

@ViNoS-ab I just realized you named your component Math. Can you try renaming it something else than Math?
Try naming it MathComponent or Calculator.

ups you are right i thought of that but I wasn't sure how things get compiled , so sorry this was my bad ,
now should I close the issue or this still a problem that should get solved , because we maybe don't know all classes and get this issue again , or at least detect that there are two classes with the same name and throw an error
thanks for your help

source: gharchive/issue

authors: ViNoS-ab bjarkehs

repo: facebook/create-react-app

license: MIT

license_type: permissive

license_source: github-api


text:
Invalid modification of Webpack's build configuration

Have you read the Contributing Guidelines on issues?

[X] I have read the Contributing Guidelines on issues.

Prerequisites

[X] I'm using the latest version of Docusaurus.
[X] I have tried the npm run clear or yarn clear command.
[X] I have tried rm -rf node_modules yarn.lock package-lock.json and re-installing packages.
[X] I have tried creating a repro with https://new.docusaurus.io.
[ ] I have read the console error message carefully (if applicable).

Description
Unable to modify the output name of the image, I would like to remove the hash of the image resource
config:
plugins: [
    async function myPlugin(context, options) {
      return {
        name: 'my-plugin',
        async configureWebpack(config, isServer, utils) {
          const imageRule = config.module.rules.find(rule => rule.test && rule.test.test('.png'));
          if (imageRule) {
            imageRule.use[0].options.name = "assets/images/[name].[ext]";
          }
          console.log(config.module.rules[0].use[0].options)
        },
      };
    },
  ]

As shown in the figure, The value of name was successfully modified, but it does not take effect：

Reproducible demo
No response
Steps to reproduce
The steps provided in the official tutorial
Expected behavior
Output image name to remove hash
Actual behavior
Output image name without removing hash
Your environment

Public source code:
Public site URL:
Docusaurus version used: latest
Environment name and version (e.g. Chrome 89, Node.js 16.4): Node.js 18
Operating system and version (e.g. Ubuntu 20.04.2 LTS): windows 11 x64

Self-service

[ ] I'd be willing to fix this bug myself.

Why would you like to review move it in the first place.
It's not a bug, this hash is added on purpose for caching reasons. If you want no hash you can still put assets in the static folder

Why would you like to review move it in the first place.
It's not a bug, this hash is added on purpose for caching reasons. If you want no hash you can still put assets in the static folder

Thank you for your reply. As I would like to collaborate with OBSIDIAN to write notes, I need external link images. Without a hash, it would be very convenient. For images, my website has not received much traffic, so I can discard the image hash.

Can you show me a repeo
Where do you put the image, and what do you want the url to be?

Can you show me a repeo
Where do you put the image, and what do you want the url to be?

My repo has not uploaded any images yet. By placing the marked down images in the static folder, there will be a copy without a hash in the build output, which does not affect my website. However, it has given me a definite URL, making it very convenient for me to publish the markdown content to other communities or forums. All I need to do is copy the markdown content, replace the external links of the images with regular ones, and add the URL section of my website. This way, my website can also serve as a blueprint

I'm not sure to understand sorry 😅, is your problem solved?

I'm not sure to understand sorry 😅, is your problem solved?

Solved, sorry, my English is not very good, I am using translation software.

authors: slorber yinsel

repo: facebook/docusaurus


text:
Cannot use useEffect hook inside of a custom page (v2 only)

🐛 Bug Report
When creating custom pages inside of src/pages/something.js I am not able to use the useEffect hook there.
I can use other hooks like useBaseUrl and useRef but the useEffect creates an error of Error: Invalid hook call
To Reproduce

Create a custom page
Add the useEffect hook
Set a menu to access it
See the error in the console

Expected behavior
The page will open without errors
Actual Behavior
Nothing is rendered (not even the react error page) and you need to check the console to see the error
Reproducible Demo
No demo, but there is the code used.
const Page = props => {
  const { location } = props;
  const iframeSrc = useRef(useBaseUrl(`storybook_frame`));
  useEffect(() => iframeSrc.current = useBaseUrl(`storybook_frame${location.search}`), [location.search]);

  return (
    <Layout title={"Storybook"}>
      <main style={{ width: "100%", height: "calc(100vh - 100px)", position: "relative" }}>
        <iframe
          src={iframeSrc.current}
          id="storybook-frame"
          title="Storybook"
          style={{ width: "100%", height: "100%", border: 0, position: "absolute", overflow: "hidden" }}
          sandbox="allow-modals allow-forms allow-popups allow-scripts allow-same-origin"
        />
      </main>
    </Layout>
  );
};

export default Page;

This is not a Docusaurus bug - you cannot call a hook (useBaseUrl) inside another hook (useEffect), this is described in the hook rules here -> https://reactjs.org/docs/hooks-rules.html#only-call-hooks-from-react-functions

I was thinking of the useBaseUrl as a function and not a hook. Good catch @lex111
Thank you :)


text:
feat(v2): add cs (Czech) translations for docusaurus-theme-classic

Motivation
I use Docusaurus for my blog, I'd like not to mix content in czech with english strings.
Have you read the Contributing Guidelines on pull requests?
yes
Test Plan
None, I only added a new translation JSON, there is no test plan.
Related PRs
None

@michalsanger looks good, thanks!

source: gharchive/pull-request


text:
Linux 32 bits

As no binary is provided for Linux 32 bits, I tried to compile from source, but it fails with ex. “hh_shared.c requires a architecture that supports memfd_create”. Is this a 32 vs 64 bits platform issue?
More generally, is there a way to get Flow to work on a 32 bits machine?

No, probably not. The shared memory system relies on 64bit. It would be a significant rewrite to get it to work, and Flow often needs to address more memory than 32bit OSes can handle.
https://github.com/facebook/flow/issues/270 is the main issue for tracking this.

repo: facebook/flow


text:
Spread operator on a function should not be allowed

This code:
// @flow
const x = [];
const y : Array<{ hello: string }> = [...x.concat, { hello: "there" }];

Passes flow currently, however the result of ...x.concat is undefined which results in a value being assigned to y that violates the type.

This is caused by https://github.com/facebook/flow/issues/106

authors: singpolyma-shopify vkurchatkin


text:
Options object destroys type checking.

A simple options object applied as a spread do an object seems to mess up type checking.
type Foo = { a: number, b: 'foo' }

const newFoo = (a: number, options?: {} = {}): Foo => ({
  a,
  b: 'foo',
  ...options
})

newFoo(1, { b: 'a' }) // No error!

Here's a Flow Try link.
I would expect it to throw an error. Am I doing something wrong?

I'm not sure why this doesn't trigger an error, but if you change the type of your options to $Shape<Foo> it will at least check that options has valid properties:
type Foo = { a: number, b: 'foo' }

const newFoo = (a: number, options?: $Shape<Foo> = {}): Foo => ({
  a,
  b: 'foo',
  ...options
})

// Error: Expected string literal `foo`, got `a` instead
newFoo(1, { b: 'a' });

Argh! I forgot about $Shape! Rats, that's exactly the utility method I was trying to figure out.

authors: AndrewSouthpaw kevanstannard


text:
Better error messages with async/await

async function f () {
  let [res] = await k()
  console.log(res.status)
}
async function k (): Promise<[?Object]> {
  return [null]
}

will get this strange error message:
let [res] = await k()
                       ^ Cannot call await with `k()` bound to `p` because an indexer property is missing in `Promise` [1].

    References:

    5: async function k (): Promise<[?Object]> {
                            ^ [1]

But if I change the function order:
async function k (): Promise<[?Object]> {
  return [null]
}
async function f () {
  let [res] = await k()
  console.log(res.status)
}

the message is ok:
console.log(res.status)
                     ^ Cannot get `res.status` because property `status` is missing in null or undefined [1].

    References:

    1: async function k (): Promise<[?Object]> {
                                     ^ [1]```

I'm getting the same problem and oddly doing await await seems to work -- but I don't think that should be right. (If you do that in your example above, it works.)

I often have such error and I don't always able to find solution. It's very badly that this bug exists already long ago and developers don't try to fix it. I more and more think to look to Typescript.

@MrEfrem I have rewritten my app with typescript. it is much better than flow.

@weijarz It's not. It just better fits your needs.

@TrySound ok, I really want to give chance flow. But sometimes I can’t understand how it works and why I've an error. Have you got information how then to debug flow in thouse cases when an error message not enough?

I would find the problem with binary search and rise an issue in this repo. Flow team is more active last few weeks so you will get a response and eventually a fix.

@TrySound I created an issue: https://github.com/facebook/flow/issues/7464

Same error than @weijarz, thanks @scottstraley for your temporary hack.

so what's the status with this issue? Is the suggestion that we use this "temporary hack" with await await?

Error message is much better now

authors: MrEfrem SamChou19815 TrySound jfloodnet rimiti scottstraley weijarz


text:
Regression in 0.70.0 with exact objects

Hello dear flow maintainers!
I discovered something that seems like a bug; I am able to assign an object with more keys than it should have to an exact type. (Flow try link)
type A = {a: 1};
const a: A = {a: 1, b: 2};   // Works with no error, expected

const b: $Exact<A> = {...a}; // Works with no error, unexpected?

This bug is first present in 0.70.0. I think it may have been introduced in 1916b7d392feb254eb6ecdf392ad9c93651dd070[0]
[0] https://github.com/facebook/flow/commit/1916b7d392feb254eb6ecdf392ad9c93651dd070#diff-3bbc1792ef10ae5965c3bf2776988e14R2284

This is fixed a while ago.


text:
Enum entries cannot be used as keys.

Enum values are constants, so I don't really get how flow comes up with such an error. In any case, it is probably wrong. It would also be extremely beneficial to be able to do this.
Flow version: 0.171.0
Expected behavior
Enum entries are used as keys.
Actual behavior
Cannot assign computed property using Keys [1]. [invalid-computed-prop]

Link to Try-Flow: See this on tryflow.

https://flow.org/en/docs/enums/using-enums/#toc-mapping-enums-to-other-values

authors: deadalnix gkz


text:
Alternative defaultProps not working with component syntax

Flow version: 0.235.1
Expected behavior
defaultProps works when declaring it as:
type Props = {
    name: string
}
component Test(...props: Props) {
   return <h1>{`Hello ${props.name}!`}</h1>;
}
component.defaultProps = {
   name: 'World'
}

Actual behavior
Cannot assign object literal to "Test.defaultProps" because property defaultProps is missing in "React.AbstractComponentStatics"

Try-Flow Link
At the end of the docs detaling React class/function components, there's an "alternative" way to declare defaultProps which we have been using so far. However, this doesn't quite seem to work with component syntax, which is kinda weird because one would assume that they largely follow the rules for functional components.
Is this intentional?

This is intentional. Note that it will stop working for functions as well starting from React 19: https://react.dev/blog/2024/04/25/react-19-upgrade-guide#removed-proptypes-and-defaultprops


text:
Parse type instantiation in JSX

Discussion: #7672
Example:
const foo = <Bar<number> />

Not sure how this desugars into React.createElement
import * as React from 'react'

declare class M<T> extends React.Component<{callback: T => void}> {}
declare function H<T>(props: {callback: T => void}): void;

declare var A: H<number> // Can't apply function type arguments before-hand
declare var B: Class<M<number>>

// Error: Cannot use function type as a type because function type is a value. To get the type of a value use `typeof`
React.createElement(A, {callback: data => {
   data // empty
}})

React.createElement(B, {callback: data => {
   data // number
}})


text:
Jest Should consistently report paths to files for easy navigation

Jest is inconsistent in the way it reports paths to files so it makes it difficult to navigate to the offending file:

In the example above the second link is relative to the tests/ directory but I am not in the tests/ directory when I run the tests. The first link tests/unit/users/userEnabled.test.js works nicely and I can click on it (in VS Code) to navigate to the file.
Jest 24.9.0, NodeJS 14, Windows.

Also the link above Object.getEmailPreferences (../src/users.js:17:15) is again relative to tests/ and not the directory above where the tests were started from.
package.json
  "jest": {
    "rootDir": "tests"
  },

repo: facebook/jest


text:
coverage outputting some html files in src directory

Reproducible on two win 10 machines (desktop + laptop)

Windows 10
git bash or command prompt (same result)
node v6.0.0
jest-cli v12.0.2

scott@LeanMachine MINGW64 ~/dev/sotdl-chargen (1_test_suite)
$ gs
On branch 1_test_suite
Your branch is up-to-date with 'origin/1_test_suite'.
nothing to commit, working directory clean

scott@LeanMachine MINGW64 ~/dev/sotdl-chargen (1_test_suite)
$ ./node_modules/.bin/jest --coverage --verbose true
Using Jest CLI v12.0.2, jasmine2, babel-jest
 PASS  __tests__\utils\capitalize-test.js (0.422s)
capitalize
  ✓ it has loaded the module
  ✓ it capitalizes a basic string
  ✓ it does nothing to TestString

 PASS  __tests__\components\ActionBar-test.js (0.781s)
ActionBar Component
  for view mode
    ✓ it renders the container element
    ✓ it renders three buttons
    ✓ it triggers no event functions yet
    for viewButton
      ✓ it is not hidden from the User
      when onClick is triggered
        ✓ it triggers onEdit
        ✓ it triggers no other event functions
    when onClick is called on editButton
      ✓ it is hidden from the User
      ✓ it triggers onView
      ✓ it triggers no other event functions
    when onClick is called on createButton
      ✓ it triggers createButton
      ✓ it triggers no other event functions
  for edit mode
    ✓ it hides the view button
    ✓ it shows the edit button

16 tests passed (16 total in 2 test suites, run time 2.297s)
-----------------------------------------------------|----------|----------|----------|----------|----------------|
File                                                 |  % Stmts | % Branch |  % Funcs |  % Lines |Uncovered Lines |
-----------------------------------------------------|----------|----------|----------|----------|----------------|
 C:\Users\scott\dev\sotdl-chargen\src\js\components\ |      100 |     87.5 |      100 |      100 |                |
  ActionBar.js                                       |      100 |     87.5 |      100 |      100 |                |
 C:\Users\scott\dev\sotdl-chargen\src\js\utils\      |      100 |      100 |      100 |      100 |                |
  capitalize.js                                      |      100 |      100 |      100 |      100 |                |
 src/js\                                             |      100 |      100 |      100 |      100 |                |
  EmptyModule.js                                     |      100 |      100 |      100 |      100 |                |
-----------------------------------------------------|----------|----------|----------|----------|----------------|
All files                                            |      100 |    91.67 |      100 |      100 |                |
-----------------------------------------------------|----------|----------|----------|----------|----------------|

scott@LeanMachine MINGW64 ~/dev/sotdl-chargen (1_test_suite)
$ gs
On branch 1_test_suite
Your branch is up-to-date with 'origin/1_test_suite'.
Untracked files:
  (use "git add <file>..." to include in what will be committed)

        src/js/components/ActionBar.js.html
        src/js/components/index.html
        src/js/utils/capitalize.js.html
        src/js/utils/index.html

nothing added to commit but untracked files present (use "git add" to track)

scott@LeanMachine MINGW64 ~/dev/sotdl-chargen (1_test_suite)
$ ls coverage/lcov-report/src/js/
EmptyModule.js.html  index.html

Branch is here:
https://github.com/ScottMaclure/sotdl-chargen/tree/1_test_suite
Will add more details here as I find them.

thanks for bringing this up. Unfortunately Windows support for Jest is mostly self-service – we don't have the resources to support this at FB. If you'd like to dig into this, I'm pretty sure this must be an istanbul bug and it isn't a Jest bug because we don't write these files. We call istanbul's writer here: https://github.com/facebook/jest/blob/master/packages/jest-cli/src/reporters/IstanbulTestReporter.js#L38
I'm going to close this out because it doesn't seem like a bug in Jest. Thank you so much for providing a repository with a repro, I hope that someone working on istanbul can take a look at this. If this does turn out to be a bug in Jest, I'm happy to receive any PRs that make this situation better for you.

authors: ScottMaclure cpojer


text:
User ignores stopped working

Given the following configuration: https://github.com/NixOS/nixpkgs/blob/master/.mention-bot
User still got mentioned on a new PR https://github.com/NixOS/nixpkgs/pull/19492#issuecomment-253291745

Actually, I think the whole file is being ignored. I'm in "alwaysNotifyForPaths" for pkgs/top-level/python-packages.nix and there have been several PR's this week where I wasn't notified but others were.

Yep, seeing the same thing here:
https://github.com/discourse/wp-discourse/pull/254

@vjeux

Hey, I'm sorry but I don't have the time to look into it. Would be nice if you could run your own instance and put console.log in places and troubleshot what's going on. Sorry about this!

@vjeux this could be duplicate of https://github.com/facebook/mention-bot/issues/173

@domenkozar we only have mention-bot configured in one of our org's repos:
https://github.com/Katello/katello/blob/master/.mention-bot
But yet it's still ignoring our userBlacklist:
https://github.com/Katello/katello/pull/6408

Tackled in https://github.com/facebook/mention-bot/pull/186.
And issue description in #185

https://github.com/NixOS/nixpkgs/blob/master/.mention-bot doesnt have one

@domenkozar I have just tried your configurations and it works fine even without the patch.
Sorry for bothering you, I will try if I can find out what's breaking your repo. :)

Same happen here https://github.com/SatelliteQE/robottelo/blob/master/.mention-bot
Even with that names in ignore list, bot keeps mentioning as you can see here: https://github.com/SatelliteQE/robottelo/pull/4217

Also happening to me at https://github.com/nextcloud/server/pull/3382#issuecomment-277616965.

authors: FRidh daviddavis domenkozar erlend-sh jeffreyleeon luckydonald rochacbruno vjeux

repo: facebook/mention-bot

license_source: bigquery


text:
Made RemoteWebElement extendable

newElement uses the actual class' constructor to create new objects.
An alternative would have been to make the method protected (it is now private).
This change enables users to extend the RemoteWebElement API by subclassing it.

Sounds good.  Thanks!

authors: drjayvee gfosco

repo: facebook/php-webdriver


text:
Update redline rpm plugin version

Update the version fo redlinerpm-maven-plugin to the latest.  This fixes
the error that occured if a build was attempted when artifacts existed.
Now it will always overwrite existing artifacts.
This version of redlinerpm-maven-plugin also brings in the latest version
of redline-rpm, which has some fixes for compatiblity with later versions
of the rpm library.  One of those fixes- supporting large inode values -
is not compatible with versions of rpm before 4.6.
Add a profile that builds the rpm using the older version of redline-rpm
Testing: confirmed could build multiple times. Confirmed inode type in
rpm header is 32bit int for old-rpm profile and 64bit int for the default.

merged, thanks!

authors: martint rschlussel

repo: facebook/presto


text:
Level the playing field for navigation libraries

Introduction
The aim is to move towards some new text for the "Navigating Between Screens” page that’s fair to all navigation libraries, both old and new.
The Core of It
The first two promises on the front page of the React Native website are:

The apps you are building with React Native aren't mobile web apps because React Native uses the same fundamental UI building blocks as regular iOS and Android apps
React Native uses the same design as React, letting you compose a rich mobile UI using declarative components

Documenting the pros and cons of a navigation library should be done with these promises in mind
Discussion points
For a navigation library to keep the first promise it must use the same fundamental navigation building blocks as regular iOS and Android apps. React Navigation breaks this promise. Although it uses UIViewControllers, thanks to react-native-screens, it doesn’t use the UINavigationBar, for example. The UINavigationBar is a fundamental navigation building block. One of its many jobs is displaying titles, large or small, and animating them as screens are popped and pushed.
To keep the second promise, a navigation library must provide declarative components for constructing its UI. React Native Navigation breaks this promise because it doesn’t have any components at all (apart from SharedElement). All of its UI elements, like headers and buttons are configured through static options and global function calls. React Navigation also relies on static options because, without portals, it owns the UI where the headers and buttons live.
React Native already comes with a Modal component that uses the underlying native API on both platforms. So why then do React Navigation and React Native Navigation come with their own Modal APIs that break both the promises?
The Navigation router is the only navigation library that keeps both the promises of React Native. It uses the underlying native APIs on Android and iOS and you compose all its UI using components. That’s why, although it’s a new library, it deserves a mention in the documentation.

The Navigating Between Screens is still biased towards React Navigation. It should be rewritten so it’s fair to all navigation libraries. React Native wrote an excellent blog about it's Team Principles. Perhaps an even-handed approach could be to compare the community navigation libraries against these principles?

repo: facebook/react-native-website


text:
Remove unnecessary import (Handling Text Input)

Import (Component) removed because there is no use in the example.
import React, { Component, useState } from 'react';

Deploy preview for react-native processing.
Building with commit ef054154e6f559bb1a758ab8d0691bbc9bea5176
https://app.netlify.com/sites/react-native/deploys/5e7fb8a2d50b520008c4c3b2

authors: charpeni edilsonalves


text:
Update broken links.

The link should be the updated guide: https://reactnavigation.org/docs/redux-integration.html

authors: JChord charpeni


text:
Link to the actual Upgrade Helper, not the GitHub repo for it

CLA signed


text:
Remove layout only views to optimize view hierarchy

Right now we create a view for every /shadow node, which shouldn't be necessary since many shadow nodes are used only to compute layout or attributed text.

This almost works, but mutating children is problematic.  Tracked internally as #6851970

Thank you for reporting this issue and appreciate your patience. We've  notified the core team for an update on this issue. We're looking for a response within the next 30 days or the issue may be closed.

Hi there! This issue is being closed because it has been inactive for a while.
But don't worry, it will live on with ProductPains! Check out its new home: https://productpains.com/post/react-native/perf-remove-layout-only-views-to-optimize-view-hierarchy
ProductPains helps the community prioritize the most important issues thanks to its voting feature.
It is easy to use - just login with GitHub.
Also, if this issue is a bug, please consider sending a PR with a fix. We rely on the community to provide
bugfixes as the core team is focused on performance.

authors: facebook-github-bot-8 mkonicek sahrens

repo: facebook/react-native


text:
Same RCTPromiseResolveBlock instance for different methods calls

Is this a bug report?
yes

Have you read the Contributing Guidelines?
yes
Environment

react-native -v: 0.41
node -v: v6.9.5
npm -v: 4.6.1

Target Platform: iOS

Development Operating System: macOS

Build tools: Xcode

Steps to Reproduce

Exported methods from a native module will reuse the same instance of RCTPromiseResolveBlock for every method defined in the module. Calling asynchronous methods at the same time will fail because RN only allows callbacks to be called once.
RCT_EXPORT_METHOD(foo:(RCTPromiseResolveBlock)resolver rejecter:(RCTPromiseRejectBlock)rejecter) {
    // resolver to be called later on.
}

RCT_EXPORT_METHOD(bar:(RCTPromiseResolveBlock)resolver rejecter:(RCTPromiseRejectBlock)rejecter) {
    // resolver to be called later on.
}

If we call those methods at the same time:
NativeModules.MyModule.foo().then(function(){console.log("foo")})
NativeModules.MyModule.bar().then(function(){console.log("bar")})

We then get this RN error:
Illegal callback invocation from native module.
This callback type only permits a single invocation from native code.

Debugging the app show the same instance of RCTPromiseResolveBlock is used in both calls. Is this expected?
Expected Behavior
Sequential async methods calls from a react native module should work. A new RCTPromiseResolveBlock instance should be created for every function call.
Actual Behavior
RCTPromiseResolveBlock instance is reused, not allowing more than one async function call at a time.

The bug was in my native module implementation. Was overriding the previous reference of RCTPromiseResolveBlock when calling a new method.


text:
CI fails on test_android

Looks like miss some buck dependency
+ buck fetch ReactAndroid/src/androidTest/...
2018-09-22 04:23:22,325 [WARNING][buck_tool.py:450] Not using buckd because watchman isn't installed.
Picked up _JAVA_OPTIONS: -XX:+UnlockExperimentalVMOptions -XX:+UseCGroupMemoryLimitForHeap
PARSING BUCK FILES... 0.0s (100%)
No build file at ReactAndroid/src/main/java/com/facebook/fbreact/fabricxx/BUCK when resolving target //ReactAndroid/src/main/java/com/facebook/fbreact/fabricxx:fabricxx.

This error happened while trying to get dependency '//ReactAndroid/src/main/java/com/facebook/fbreact/fabricxx:fabricxx' of target '//ReactAndroid/src/androidTest/java/com/facebook/react/testing:testing'
Exited with code 1

Sorry for the trouble with the bot. I've added you to the core contributor white list which should prevent it from closing your issues automatically.

authors: gengjiawen hramos


text:
Responder Lifecycle props cannot be set via setNativeProps

[x] Review the documentation: https://facebook.github.io/react-native
[x] Search for existing issues: https://github.com/facebook/react-native/issues
[ ] Use the latest React Native release: https://github.com/facebook/react-native/releases

Environment
Environment:
OS: macOS 10.14
Node: 10.11.0
Yarn: 1.10.1
npm: 6.4.1
Watchman: 4.9.0
Xcode: Xcode 10.0 Build version 10A255
Android Studio: 3.1 AI-173.4907809
Packages: (wanted => installed)
react: 16.3.1 => 16.3.1
react-native: ~0.55.2 => 0.55.4
Description
The Responder Lifecycle props cannot be set via setNativeProps.
Reproducible Demo
https://snack.expo.io/BJLEH-I27

same issue with 0.57 version


text:
framework not found React,inker command failed with exit code 1

I get am error on one of the libraries,all builds are failing,I'm using CocoaPods to manage dependencies.
ld: framework not found React
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Ld /Users/mypc/Library/Developer/Xcode/DerivedData/projectx-agmovfcichistxhkaamivrarvpqp/Build/Products/Debug-iphonesimulator/RNReanimated/RNReanimated.framework/RNReanimated normal x86_64
React Native version:
React native info output:
  React Native Environment Info:
 System:
  OS: macOS 10.14.5
  CPU: (4) x64 Intel(R) Core(TM) i5-6600 CPU @ 3.30GHz
  Memory: 23.73 MB / 8.00 GB
 Shell: 3.2.57 - /bin/bash
  Binaries:
  Node: 10.15.0 - /usr/local/bin/node
  npm: 6.5.0 - /usr/local/bin/npm
  Watchman: 4.9.0 - /usr/local/bin/watchman
 SDKs:
  iOS SDK:
  Platforms: iOS 12.2, macOS 10.14, tvOS 12.2, watchOS 5.2
    Android SDK:
    API Levels: 23, 24, 25, 26, 27, 28
    Build Tools: 26.0.2, 27.0.3, 28.0.3
  System Images: android-27 | Google Play Intel x86 Atom
  IDEs:
  Android Studio: 3.3 AI-182.5107.16.33.5199772
  Xcode: 10.2.1/10E1001 - /usr/bin/xcodebuild
 npmPackages:
  react: ^16.8.3 => 16.8.6
 react-native: ^0.59.10 => 0.59.10
  npmGlobalPackages:
  create-react-native-app: 2.0.2
 react-native-cli: 2.0.1
 react-native-git-upgrade: 0.2.7

Steps To Reproduce
 1. npm i
2. react-native link
3. all libraries were linked
4. cd ios
5. pod install

platform :ios, '9.0'

 use_frameworks!

 target 'projectx' do

 pod 'RNReanimated', :path => '../node_modules/react-native-reanimated'

 pod 'react-native-config', :path => '../node_modules/react-native-config'

pod 'RNVectorIcons', :path => '../node_modules/react-native-vector-icons'

pod 'react-native-maps', :path => '../node_modules/react-native-maps'

 pod 'React', :path => '../node_modules/react-native',:subspecs => [
  'Core',
  'CxxBridge'
 ]
 pod 'yoga', :path => '../node_modules/react-native/ReactCommon/yoga'

 # Third party deps podspec link
 pod 'Folly', :podspec => '../node_modules/react-native/third-party-podspecs/Folly.podspec'
 target 'VFGReactMVA10Tests' do
  inherit! :search_paths
   # Pods for testing
end
 post_install do |installer|
  installer.pods_project.targets.each do |target|
   if target.name == "React"
    target.remove_from_project
   end
  end
  end
   end

Describe what you expected to happen:
Successful build on iOS

I am also getting this issue even after upgrading to latest react-native version
Unable to resolve module ../NativeAnimatedHelper from MyProject/node_modules/react-native/Libraries/Animated/src/nodes/AnimatedInterpolation.js: The module ../NativeAnimatedHelper could not be found from MyProject/node_modules/react-native/Libraries/Animated/src/nodes/AnimatedInterpolation.js. Indeed, none of these files exist:
#Versions :
info Fetching system and libraries information...
System:
OS: macOS 10.14.5
CPU: (4) x64 Intel(R) Core(TM) i5-4278U CPU @ 2.60GHz
Memory: 41.89 MB / 8.00 GB
Shell: 3.2.57 - /bin/bash
Binaries:
Node: 11.14.0 - /usr/local/bin/node
npm: 6.7.0 - /usr/local/bin/npm
SDKs:
iOS SDK:
Platforms: iOS 12.2, macOS 10.14, tvOS 12.2, watchOS 5.2
IDEs:
Android Studio: 3.1 AI-173.4907809
Xcode: 10.2.1/10E1001 - /usr/bin/xcodebuild
npmPackages:
react: 16.8.6 => 16.8.6
react-native: ^0.60.4 => 0.60.4
npmGlobalPackages:
react-native-cli: 2.0.1

I am having the same issue but I don't want to upgrade to react native to the latest. and I want the fix for the version of react-native that I am using. i.e 0.57.7

Same issue

@waheedakhter @arthedza I am using 0.59.9 and I don;t want to upgrade right now because upgrades are painful :(
Have you found a solution in an RN version that is older than 0.60?


text:
ScrollView not scrolling on Android if TextInput components are right-aligned

When TextInput components with right-aligned text are used within a ScrollView, scrolling does not work on Android.
React Native version: 0.60.5
This demo shows input fields in a scroll view—it scrolls just fine:
https://snack.expo.io/r1oQbV4vS
This demo is the same as the one above, but the input text is right-aligned. It doesn't scroll:
https://snack.expo.io/SyxJHb4NDr
I would expect both demos to scroll, regardless of text alignment.

React Native version: 0.60.5

Issue #25594 may be related.


text:
react native project creation error in  windows

90045 verbose linkMans left-pad@0.0.3
90046 verbose rebuildBundles left-pad@0.0.3
90047 info install concat-map@0.0.1
90048 info install js-tokens@1.0.2
90049 info install left-pad@0.0.3
90050 silly gunzTarPerm extractEntry library/fn/math/hypot.js
90051 silly gunzTarPerm extractEntry library/fn/math/clz32.js
90052 info install left-pad@0.0.3
90053 verbose linkBins left-pad@0.0.3
90054 verbose linkMans left-pad@0.0.3
90055 verbose rebuildBundles left-pad@0.0.3
90056 info install js-tokens@1.0.2
90057 info install left-pad@0.0.3
90058 info install left-pad@0.0.3
90059 info postinstall js-tokens@1.0.2
90060 info install left-pad@0.0.3
90061 info postinstall js-tokens@1.0.2
90062 silly gunzTarPerm extractEntry library/fn/math/index.js
90063 silly gunzTarPerm extractEntry library/fn/math/log10.js
90064 info postinstall concat-map@0.0.1
90065 silly gunzTarPerm extractEntry library/fn/math/index.js
90066 silly gunzTarPerm extractEntry library/fn/math/log10.js
90067 info postinstall js-tokens@1.0.2
90068 info postinstall left-pad@0.0.3
90069 info postinstall left-pad@0.0.3
90070 silly gunzTarPerm extractEntry library/fn/math/index.js
90071 silly gunzTarPerm extractEntry library/fn/math/log10.js
90072 info postinstall js-tokens@1.0.2
90073 info postinstall left-pad@0.0.3
90074 silly gunzTarPerm extractEntry library/fn/math/hypot.js
90075 silly gunzTarPerm extractEntry library/fn/math/clz32.js
90076 info postinstall left-pad@0.0.3
90077 info postinstall left-pad@0.0.3
90078 silly install resolved []
90079 verbose about to build C:\Users\Navi\Desktop\MyProject\node_modules\react-native\node_modules\babel-preset-react-native\node_modules\babel-plugin-transform-regenerator\node_modules\babel-core\node_modules\minimatch\node_modules\brace-expansion\node_modules\balanced-match
90080 info build C:\Users\Navi\Desktop\MyProject\node_modules\react-native\node_modules\babel-preset-react-native\node_modules\babel-plugin-transform-regenerator\node_modules\babel-core\node_modules\minimatch\node_modules\brace-expansion\node_modules\balanced-match
90081 verbose unlock done using C:\Users\Navi\AppData\Roaming\npm-cache_locks\js-tokens-059158e293ac5ea9.lock for C:\Users\Navi\Desktop\MyProject\node_modules\react-native\node_modules\babel-preset-react-native\node_modules\babel-plugin-transform-regenerator\node_modules\babel-traverse\node_modules\invariant\node_modules\loose-envify\node_modules\js-tokens
90082 verbose about to build C:\Users\Navi\Desktop\MyProject\node_modules\react-native\node_modules\babel-preset-react-native\node_modules\babel-plugin-transform-regenerator\node_modules\babel-traverse\node_modules\invariant\node_modules\loose-envify
90083 info build C:\Users\Navi\Desktop\MyProject\node_modules\react-native\node_modules\babel-preset-react-native\node_modules\babel-plugin-transform-regenerator\node_modules\babel-traverse\node_modules\invariant\node_modules\loose-envify
90084 silly gunzTarPerm extractEntry library/fn/math/expm1.js
90085 silly gunzTarPerm extractEntry library/fn/math/fround.js
90086 verbose unbuild node_modules\react-native\node_modules\babel-preset-react-native\node_modules\babel-plugin-transform-regenerator\node_modules\babel-core\node_modules\babel-generator\node_modules\detect-indent\node_modules\minimist
90087 verbose unbuild node_modules\react-native\node_modules\babel-preset-react-native\node_modules\babel-plugin-transform-regenerator\node_modules\babel-core\node_modules\babel-generator\node_modules\detect-indent\node_modules\get-stdin
90088 verbose unlock done using C:\Users\Navi\AppData\Roaming\npm-cache_locks\js-tokens-d8d72ebd3053d7fe.lock for C:\Users\Navi\Desktop\MyProject\node_modules\react-native\node_modules\babel-preset-react-native\node_modules\babel-plugin-transform-es2015-computed-properties\node_modules\babel-template\node_modules\babel-traverse\node_modules\invariant\node_modules\loose-envify\node_modules\js-tokens
90089 verbose about to build C:\Users\Navi\Desktop\MyProject\node_modules\react-native\node_modules\babel-preset-react-native\node_modules\babel-plugin-transform-es2015-computed-properties\node_modules\babel-template\node_modules\babel-traverse\node_modules\invariant\node_modules\loose-envify
90090 info build C:\Users\Navi\Desktop\MyProject\node_modules\react-native\node_modules\babel-preset-react-native\node_modules\babel-plugin-transform-es2015-computed-properties\node_modules\babel-template\node_modules\babel-traverse\node_modules\invariant\node_modules\loose-envify
90091 silly gunzTarPerm extractEntry library/fn/math/hypot.js
90092 silly gunzTarPerm extractEntry library/fn/math/clz32.js
90093 silly gunzTarPerm extractEntry library/fn/math/index.js
90094 silly gunzTarPerm extractEntry library/fn/math/log10.js
90095 verbose unlock done using C:\Users\Navi\AppData\Roaming\npm-cache_locks\concat-map-f96abf1cbb0429ef.lock for C:\Users\Navi\Desktop\MyProject\node_modules\react-native\node_modules\babel-preset-react-native\node_modules\babel-plugin-transform-regenerator\node_modules\babel-core\node_modules\minimatch\node_modules\brace-expansion\node_modules\concat-map
90096 verbose unlock done using C:\Users\Navi\AppData\Roaming\npm-cache_locks\js-tokens-e1ecb775b22fb808.lock for C:\Users\Navi\Desktop\MyProject\node_modules\react-native\node_modules\babel-preset-react-native\node_modules\babel-plugin-transform-es2015-modules-commonjs\node_modules\babel-template\node_modules\babel-traverse\node_modules\invariant\node_modules\loose-envify\node_modules\js-tokens
90097 verbose about to build C:\Users\Navi\Desktop\MyProject\node_modules\react-native\node_modules\babel-preset-react-native\node_modules\babel-plugin-transform-es2015-modules-commonjs\node_modules\babel-template\node_modules\babel-traverse\node_modules\invariant\node_modules\loose-envify
90098 info build C:\Users\Navi\Desktop\MyProject\node_modules\react-native\node_modules\babel-preset-react-native\node_modules\babel-plugin-transform-es2015-modules-commonjs\node_modules\babel-template\node_modules\babel-traverse\node_modules\invariant\node_modules\loose-envify
90099 verbose unlock done using C:\Users\Navi\AppData\Roaming\npm-cache_locks\left-pad-faa6241a1d1d57a5.lock for C:\Users\Navi\Desktop\MyProject\node_modules\react-native\node_modules\babel-preset-react-native\node_modules\babel-plugin-transform-regenerator\node_modules\babel-core\node_modules\babel-code-frame\node_modules\line-numbers\node_modules\left-pad
90100 verbose about to build C:\Users\Navi\Desktop\MyProject\node_modules\react-native\node_modules\babel-preset-react-native\node_modules\babel-plugin-transform-regenerator\node_modules\babel-core\node_modules\babel-code-frame\node_modules\line-numbers
90101 info build C:\Users\Navi\Desktop\MyProject\node_modules\react-native\node_modules\babel-preset-react-native\node_modules\babel-plugin-transform-regenerator\node_modules\babel-core\node_modules\babel-code-frame\node_modules\line-numbers
90102 verbose unlock done using C:\Users\Navi\AppData\Roaming\npm-cache_locks\left-pad-7752d31625d40b10.lock for C:\Users\Navi\Desktop\MyProject\node_modules\react-native\node_modules\babel-preset-react-native\node_modules\babel-plugin-transform-es2015-modules-commonjs\node_modules\babel-template\node_modules\babel-traverse\node_modules\babel-code-frame\node_modules\line-numbers\node_modules\left-pad
90103 verbose about to build C:\Users\Navi\Desktop\MyProject\node_modules\react-native\node_modules\babel-preset-react-native\node_modules\babel-plugin-transform-es2015-modules-commonjs\node_modules\babel-template\node_modules\babel-traverse\node_modules\babel-code-frame\node_modules\line-numbers
90104 info build C:\Users\Navi\Desktop\MyProject\node_modules\react-native\node_modules\babel-preset-react-native\node_modules\babel-plugin-transform-es2015-modules-commonjs\node_modules\babel-template\node_modules\babel-traverse\node_modules\babel-code-frame\node_modules\line-numbers
90105 verbose unlock done using C:\Users\Navi\AppData\Roaming\npm-cache_locks\js-tokens-bdc014a950abf5e7.lock for C:\Users\Navi\Desktop\MyProject\node_modules\react-native\node_modules\babel-preset-react-native\node_modules\babel-plugin-transform-es2015-modules-commonjs\node_modules\babel-types\node_modules\babel-traverse\node_modules\invariant\node_modules\loose-envify\node_modules\js-tokens
90106 verbose about to build C:\Users\Navi\Desktop\MyProject\node_modules\react-native\node_modules\babel-preset-react-native\node_modules\babel-plugin-transform-es2015-modules-commonjs\node_modules\babel-types\node_modules\babel-traverse\node_modules\invariant\node_modules\loose-envify
90107 info build C:\Users\Navi\Desktop\MyProject\node_modules\react-native\node_modules\babel-preset-react-native\node_modules\babel-plugin-transform-es2015-modules-commonjs\node_modules\babel-types\node_modules\babel-traverse\node_modules\invariant\node_modules\loose-envify
90108 verbose unlock done using C:\Users\Navi\AppData\Roaming\npm-cache_locks\left-pad-7ecef5e128d88aa4.lock for C:\Users\Navi\Desktop\MyProject\node_modules\react-native\node_modules\babel-preset-react-native\node_modules\babel-plugin-transform-es2015-computed-properties\node_modules\babel-template\node_modules\babel-traverse\node_modules\babel-code-frame\node_modules\line-numbers\node_modules\left-pad
90109 verbose about to build C:\Users\Navi\Desktop\MyProject\node_modules\react-native\node_modules\babel-preset-react-native\node_modules\babel-plugin-transform-es2015-computed-properties\node_modules\babel-template\node_modules\babel-traverse\node_modules\babel-code-frame\node_modules\line-numbers
90110 info build C:\Users\Navi\Desktop\MyProject\node_modules\react-native\node_modules\babel-preset-react-native\node_modules\babel-plugin-transform-es2015-computed-properties\node_modules\babel-template\node_modules\babel-traverse\node_modules\babel-code-frame\node_modules\line-numbers
90111 verbose unlock done using C:\Users\Navi\AppData\Roaming\npm-cache_locks\left-pad-001cb2401c8aaaf7.lock for C:\Users\Navi\Desktop\MyProject\node_modules\react-native\node_modules\babel-preset-react-native\node_modules\babel-plugin-transform-regenerator\node_modules\babel-traverse\node_modules\babel-code-frame\node_modules\line-numbers\node_modules\left-pad
90112 verbose about to build C:\Users\Navi\Desktop\MyProject\node_modules\react-native\node_modules\babel-preset-react-native\node_modules\babel-plugin-transform-regenerator\node_modules\babel-traverse\node_modules\babel-code-frame\node_modules\line-numbers
90113 info build C:\Users\Navi\Desktop\MyProject\node_modules\react-native\node_modules\babel-preset-react-native\node_modules\babel-plugin-transform-regenerator\node_modules\babel-traverse\node_modules\babel-code-frame\node_modules\line-numbers
90114 silly gunzTarPerm extractEntry library/fn/math/index.js
90115 silly gunzTarPerm extractEntry library/fn/math/log10.js

I can't find the error in this log dump. Please look to Stack Overflow for questions like these. :smile:

authors: dsibiski navihr


text:
[Android] fetch https then app crash

When I fetch an https domain it will crash then exit the app,But for http domain it works fine.
What might cause this problem?Thanks
something like this
    fetch(REQUEST_URL)
      .then((responseData) => {

        console.log(responseData)
      })
      .done();

Can you provide a reproducible sample, and the crash log?

Hi there! This issue is being closed because it has been inactive for a while.
But don't worry, it will live on with ProductPains! Check out its new home: https://productpains.com/post/react-native/android-fetch-https-then-app-crash
Product Pains has been very useful in highlighting the top bugs and feature requests:
https://productpains.com/product/react-native?tab=top
Also, if this issue is a bug, please consider sending a pull request with a fix.


text:
react-native upgrade with 0.31

When launching react-native upgrade with the last version (0.31), it stops immediately with this error:
rnpm-upgrade ERR! ERRPACKAGEJSON No package found. Are you sure it's a React Native project?

config.getProjectConfig is not a function

We tried with different node versions but always have this error.
Anyone has an idea? cc @grabbou

Maybe the internalisation of rnpm ? cc @grabbou

@magrinj: You must have rnpm-plugin-upgrade as a dev dependency.  Since rnpm has been merged into react-native, you should just be able to use react-native upgrade instead of rnpm upgrade.

@rozele Thanks for your answer, but I already have rnpm-plugin-upgrade as a dev dependency, and I use the react-native upgrade command.

cc @Kureev how about merging rnpm-plugin-upgrade to RN core? It'll enable us to remove the yeoman dependency altogether.

same error.

I'll try to hack it on the weekend if I have a time

I had the same problem but I solved it:

remove rnpm-plugin-upgrade dev dependency in package.json
clean node_modules with npm prune
run react-native upgrade works fine :)

@oziks Fine!!!Thx

Thanks @oziks, for those who have an error like Can't find rnpm-plugin-upgrade after doing @oziks instruction, juste remove your node_modules folder and run an npm i (npm prune doesn't solve the problem for me). Don't forget to remove rnpm-plugin-upgrade in your dev dependency before that.

@oziks Thanks!

I solved it just tow steps:
1.remove rnpm-plugin-upgrade dev dependency in package.json
2.run react-native upgrade

authors: Bhullnatik Kureev Richard-Cao duzliang magrinj oziks rozele satya164


text:
Add description to require a key for each child in ViewPageAndroid

Change the header description and example code.
Thanks for submitting a PR! Please read these instructions carefully:

[x] Explain the motivation for making this change.
[x] Provide a test plan demonstrating that the code is solid.
[x] Match the code formatting of the rest of the codebase.
[x] Target the master branch, NOT a "stable" branch.

Motivation (required)
What existing problem does the pull request solve?
Clarify extra requirements for a Component.
Test Plan (required)
A good test plan has the exact commands you ran and their output, provides screenshots or videos if the pull request changes UI or updates the website. See What is a Test Plan? to learn more.
Go to documentation, see changes.
If you have added code that should be tested, add tests.
Next Steps
Sign the CLA, if you haven't already.
Small pull requests are much easier to review and more likely to get merged. Make sure the PR does only one thing, otherwise please split it.
Make sure all tests pass on both Travis and Circle CI. PRs that break tests are unlikely to be merged.
For more info, see the "Pull Requests" section of our "Contributing" guidelines.

Hi there! This issue is being closed because it has been inactive for a while.
But don't worry, it will live on with Canny! Check out its new home: https://react-native.canny.io/feature-requests/p/add-description-to-require-a-key-for-each-child-in-viewpageandroid

@hramos Is there a problem with the pull request?

authors: hramos huyanhh


text:
Make react-native link play nicely with CocoaPods-based iOS projects.

The core React Native codebase already has full support for CocoaPods. However, react-native link doesn’t play nicely with CocoaPods, so installing third-party libs from the RN ecosystem is really hard.
This change will allow to link projects that contains its own .podspec file to CocoaPods-based projects. In case link detect Podfile in iOS directory, it will look for related .podspec file in linked project directory, and add it to Podfile. If Podfile and .podspec files are not present, it will fall back to previous implementation.
Test Plan

Build a React Native project where the iOS part uses CocoaPods to manage its dependencies. The most common scenario here is to have React Native be a Pod dependency, among others.
Install a RN-related library, that contains .podspec file, with react-native link (as an example it could be: react-native-maps
Building the resulting iOS workspace should succeed (and there should be new entry in Podfile)

@mironiasty once again, great job 🙌  Really enjoy reviewing high-quality PRs

@Kureev Thanks :)
Also another way to test it, is to create Expo project, and then use exp detach on it. This should create iOS project with Podfile. And such project could be updated with modified implementation of react-native link.

This looks really solid. Let me get back to you on that tomorrow latest. Pretty sure will be flawless :)

Based on your comments, I've updated code to support new marker in Podfile. If there will be comment(s) # Add new pods below this line somewhere in Podfile, new pod will be added below such line(s). If there is no such line, code will follow old path - guessing where pod could be added. I think it is easier way to support multiple targets or case described by @andrejunges . And if user has just simple Podfile, generated from expo detach, this should still work for him.
I've also added variable indentations - code is trying to guess how many spaces should be inserted before pod ....

@grabbou Can you take a look on improved version of this feature?

Hey, looks good - I am planning to land it today. Only thing is that I removed mockFs dependency in the meantime on master in this commit: https://github.com/facebook/react-native/commit/1f498010e8a10ab8b7f240988cbf892ef71c3154
Would you have time to perform such update? If not, I am happy to do it.
Anyway, this should've been within 0.50.0-rc.0 and I am going to cherry-pick it as the delay has been because of me :)

I will try to find some time to make this update later today or tomorrow.

Thanks, I will be keeping an eye on it.
On Fri, 13 Oct 2017 at 10:51 Miron Pawlik notifications@github.com wrote:

I will try to find some time to make this update later today or tomorrow.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/facebook/react-native/pull/15460#issuecomment-336391011,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ACWcxmGPyQ0hX_2MotzQ2pSkzZyMbLY3ks5srySHgaJpZM4O0UAz
.

@grabbou I've updated tests to remove mock-fs dependency.

Sorry for these tabs, I hope it is fixed now. (I've been working on other project with tabs, and priettier used that config on react-native files)

@facebook-github-bot shipit

One of the core maintainers of https://github.com/invertase/react-native-firebase here.
We've spent the last year battling with RN's lack of integration with Cocoapods and the pain this causes our users.  Having given up on the Cocoapods approach and switching to usage of react-native link as it used to be, we are in the position where we have a .podspec for legacy support, but do not wish this to be used for new projects due to the complications this brings with needing to also add the appropriate React pod and subspecs.
Since this change, our .podspec is picked up automatically, but it seems this PR provides no way for us to opt out of that decision and override the presence of the podspec.
return {
    sourceDir: path.dirname(projectPath),
    folder: folder,
    pbxprojPath: path.join(projectPath, 'project.pbxproj'),
    podfile: findPodfilePath(projectPath),
    podspec: findPodspecName(folder),
    projectPath: projectPath,
    projectName: path.basename(projectPath),
    libraryFolder: userConfig.libraryFolder || 'Libraries',
    sharedLibraries: mapSharedLibaries(userConfig.sharedLibraries || []),
    plist: userConfig.plist || [],
  };

As such, this has fundamentally broken our on-boarding flow for new users and leaves us with only two options:

To remove the .podspec completely which removes backwards compatibility for those devs who have been using the .podspec previously
To switch back to the .podspec approach and introduce the added step of having the users need to set up React and subspecs as pod - something which we know causes issues based on our past experiences

Neither of these are particularly viable alternatives and both involve compromises.
As somebody that has tried to submit PRs to improve the build process customisability in the past (on the Android side), only for the PR to be completely ignored, it's incredibly frustrating to now be affected by a change that hasn't taken into consideration what this might mean for some libraries.

One thing that might be worth to mention here: this change would only work for users that have Pods configured for their iOS project (so users without Podfile should not be affected). But from react-native-firebase installation documentation, I see that configuring pods is recommended step for users.
I don't know what is exact problem with linking your project using CocoaPods. If problem is related to missing react entries in Podfile, maybe you can recommend creating project with create-react-native-app and detaching project from Expo (this way, user should have fully working Podfile).
As for adding option to opt-out from linking podspecs: I can think of two ways of doing it:

Adding new parameter to link (react-native link react-native-firebase --ignore-pods)
Checking for predefined comment in project .podspec file (like #REACT_NATIVE_IGNORE_FOR_LINKING)

I'm not sure which one would be better. Also adding any of them, would again increase complexity of linking process.

@mironiasty thanks for your response.
Our users need to configure pods in order to use the Firebase dependencies, as this is the approach that Google recommend and we don't want to deviate from it.
We also categorically don't want to recommend people creating projects using Expo as a way of getting started.  This has also caused us numerous problems down the line and is not a viable alternative given the large dependency that react-native-firebase has on native code.
Regarding your options above:

This would only work when linking just this library, anybody running react-native link without the library would encounter problems
This would work, though feels somewhat hacky

A much better option (and one that keeps in sync with the rest of the rnpm settings) would be to allow this to be overridden as part of the package.json.  For example, setting an ignorePodSpec as so:
"rnpm": {
    "ios" {
      "ignorePodSpec": true,
    }
  },

authors: Kureev chrisbianca grabbou mironiasty


text:
Expose isLocalUserInfoKey to keyboard event notifications

Summary

Given two apps loaded side-by-side and when a Keyboard event is triggered, there is no way to ascertain which app triggered the keyboard event. This ambiguity can arise in slide over/split view scenarios.
This pull request exposes the isLocalUserInfoKey property of the native UIKeyboard iOS events to the Keyboard event listener; this property will return true for the app that triggered the keyboard event.
(Also, I threw in a couple of Keyboard.js tests just for fun 😅)
Changelog

[iOS][Added] - Expose isLocalUserInfoKey to keyboard event notifications
Test Plan

Load two apps side-by-side, with the app on the left side subscribing to the keyboard events (and logging out the events as they happen)
Trigger a keyboard to appear with the left app. The logged keyboard event will contain the isEventFromThisApp property which will be true.
Dismiss the keyboard
Trigger a keyboard to appear with the right app. The left app will still log the keyboard event, but the event's isEventFromThisApp property will be false (because the left app didn't trigger the keyboard event)

Thanks for increasing our test coverage!

authors: hramos nossbigg


text:
Fix onPress prop for Touchable Components being called twice on Android Tv

Summary
Due to an update to react-native on the  android tv platform tapping the select button on a remote calls the onPress prop twice for TouchableHighlight, TouchableOpacity, and TouchableWithoutFeedback. This is happening because touchableHandlePress gets called from two places. First from the onClick prop in the touchable component and second from the TVEventHandler in the TouchableMixin.
Changelog
[Android] [Fixed] - Adds a not android check to the select case of the TVEventHandler callback in the TouchableMixin.
Test Plan
Confirmed on Android Tv and Apple Tv

Add a TouchableOpacity to a screen with an onPress callback
Run app
Focus the TouchableOpacity
Press the Select Button on the Remote

Expected Results
onPress is called once

Adding a check for android here feels like it probably isn't the right fix. You mention that the issue is from "the onClick prop in the touchable component and second from the TVEventHandler in the TouchableMixin". Should this fix instead be a part of TVEventHandler?

@TheSavior I thought about updating TVEventHandler to not fire on android when the select button is pressed but I was afraid that would break other places that expect TVEventHandler trigger when select is pressed.

I’m a little nervous to merge this as is. Since this problem only occurs with tv, making a change to the code that effects all platforms feels a little strange to me. Also, having the solution be a check for Android when the problem impacts android tv but not android mobile also seems a bit scary.
Can you help me understand this change a bit more, why this is safe for all platforms,  and why this change shouldn’t live in tv specific code?

@TheSavior There is a platform check with an early return if the platform isn't tv above the code that this pr is modifying. So this code will only run on tv platforms.

First from the onClick prop in the touchable component
@dbarr33 Could you please point out the firs place where the onPress is called? What is the call stack of the onClick call? Is it called from native somewhere? Thank you in advance.

authors: TheSavior dbarr33 dblachut-adb


text:
fix: jvm 11 error message from build.gradle.kts, ReactPlugin.kt and react.gradle

Summary
you can see discussion here: https://github.com/reactwg/react-native-releases/discussions/13#discussioncomment-2069527
we were getting this error message when we build Gradle with other than 11 JVM
> Task :react-native-gradle-plugin:compileJava FAILED
2 actionable tasks: 2 executed

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':react-native-gradle-plugin:compileJava'.
> invalid source release: 11

this solution is suggested by @mikehardy
after this PR, now the error is like this
**************************************************************************************************************

ERROR: react-native-gradle-plugin builds with JVM version 11.
Incompatible major version detected: '8'

**************************************************************************************************************

Changelog

[Android] [Fixed] - jvm 11 error message from react-native-gradle-plugin
Test Plan
install other than 11 java version and just run ./scripts/test-manual-e2e.sh this command at the root of RN repo than this error will appair invalid source release: 11

I like this as a guard rail, the only thing I don't like is that it will require maintenance going forward, now there will be 3 spots to bump the JDK version in if the requirement moves. Isn't the real requirement that JDK is > 8? So perhaps there could be an integer parse and check for > 8 vs a fixed "11. That way JDK14 and 16 etc will work with no further work?

I like this as a guard rail, the only thing I don't like is that it will require maintenance going forward, now there will be 3 spots to bump the JDK version in if the requirement moves. Isn't the real requirement that JDK is > 8? So perhaps there could be an integer parse and check for > 8 vs a fixed "11. That way JDK14 and 16 etc will work with no further work?

Agree. That's why having this inside react-native doctor was maybe a better approach.
On the other hand, if we want to add a quick warning on the Gradle side that will help people migrate to .68, that's probably the way to go

I like this as a guard rail, the only thing I don't like is that it will require maintenance going forward, now there will be 3 spots to bump the JDK version in if the requirement moves. Isn't the real requirement that JDK is > 8? So perhaps there could be an integer parse and check for > 8 vs a fixed "11. That way JDK14 and 16 etc will work with no further work?

Agree. That's why having this inside react-native doctor was maybe a better approach. On the other hand, if we want to add a quick warning on the Gradle side that will help people migrate to .68, that's probably the way to go

@cortinico  Agree, I will also make another PR for doctor CLI.
@mikehardy you are right, I am done with the changes that you told

I like this a lot more! it won't just irritatingly break in the future now, but does protect against the JDK8 past. The only thing I can think of now is that the error message is not really consistent with the test(s) anymore. Should probably say "... requires JDK11 or higher" ?
I do think this error message will help a lot of people though, even in the much much smaller developer community that is the AnkiDroid project (maybe 20 developers?) this helped a few people. Here in react-native for 0.68 I bet this helps hundreds, most of whom probably do not know about doctor yet

@mikehardy Thanks, I have changed the error message with ERROR: requires JDK11 or higher.

install idk 11;
AndroidStudio->file->ProjectStructure->click Gradle Settings->choose idk 11 ->sync;

authors: bozaigao cortinico mikehardy nomi9995


text:
Fix TextInput vertical alignment issue when using lineHeight prop on iOS (Paper - old arch)

Summary:
Adding paragraphStyle.maximumLineHeight to a iOS UITextField displays the text under the UITextField (ios-screenshot-1, ios-screenshot-2, ios-screenshot-3). The issue reproduces on Storyboard App (iOS) using UITextField and  paragraphStyle.maximumLineHeight. It is not caused by react-native.
The issue is caused by a private class _UITextLayoutFragmentView (a CALayer children of UITextField), which assumes the wrong position when setting the lineHeight. _UITextLayoutFragmentView frame's y coordinates are set to 30, instead of 0 (react-native-screenshot-1, react-native-screenshot-2)

The _UITextLayoutFragmentView layer does not correctly position
The issue is caused by adding paragraphStyle.maximumLineHeight to UITextField.attributedText
The parent UITextField bounds do not correctly position child _UITextLayoutFragmentView.
The issue causes the below text Sdfsd to display under the TextInput.

I was able to fix the issue and correctly align the private layout view _UITextLayoutFragmentView using the public API RCTUITextField textRectForBound, which allows modifying the UITextField frame and inset.
The solution consists in the following steps, applied only to UITextField with lineHeight prop:

set _UITextLayoutFragmentView to vertically align to the top. Required to correctly align _UITextLayoutFragmentView.
apply custom bounds with RCTUITextField textRectForBound to align _UITextLayoutFragmentView with the correct y coordinates and height
Adjust text baseline to be center aligned

fixes https://github.com/facebook/react-native/issues/28012 fixes https://github.com/facebook/react-native/issues/33986
Related https://github.com/facebook/react-native/issues/35741 https://github.com/facebook/react-native/issues/31112
Changelog:
[IOS] [FIXED] - Fix TextInput vertical alignment issue when using lineHeight prop on iOS (Paper - old arch)
Test Plan:
Extensive test included in the PR comments https://github.com/facebook/react-native/pull/37465#issuecomment-1551459879

Test Cases after applying the fix

https://github.com/Expensify/App/assets/24992535/5b9c0945-6415-4ce8-a1f2-c9d13838a92c

Test Cases before applying the fix

https://github.com/Expensify/App/assets/24992535/86cdcd45-0289-498c-a36e-6bc8d7fadd73

before fix - increase/decrease padding top

to make the video more clear, we change the style paddingTop to both TextInput

after fix - increase/decrease padding top

We change the style paddingTop only for the first TextInput

before fix - increase/decrease border

https://github.com/Expensify/App/assets/24992535/fc905f79-728f-4875-b03c-aad10bf49486

after fix - increase/decrease border

https://github.com/Expensify/App/assets/24992535/3720a9a1-0a7e-4225-a405-2808dc59125c

before the fix - text is not correctly aligned with different lineHeight, fontSize and height

https://github.com/Expensify/App/assets/24992535/4cb1fe3f-65cf-4685-b84a-c469d481141c

after fix - text is correctly aligned with different lineHeight, fontSize and height

https://github.com/Expensify/App/assets/24992535/3e7636fc-3387-4f45-852d-878183094104

Before - behaviour single line TextInput without lineHeight prop

https://github.com/Expensify/App/assets/24992535/1cdc96c4-3e54-4d81-8ef2-e6ec1fe89c0b

Before - behaviour single line TextInput with lineHeight prop

https://github.com/Expensify/App/assets/24992535/57968f55-d9cb-4399-8280-24cb86055ffe

Before - behaviour multi line TextInput without lineHeight prop

https://github.com/Expensify/App/assets/24992535/a681e7ec-72de-4760-8c46-bf7ffa0ead02

Before - behaviour multi line TextInput with a lineHeight prop

https://github.com/Expensify/App/assets/24992535/9c5e025d-18a5-41e0-9f3b-c896c1cffe8f

After - multi line TextInput with a lineHeight prop (first video)

https://github.com/Expensify/App/assets/24992535/7ea05a6d-a169-4085-a58a-820e055d0152

After - multi line TextInput with a lineHeight prop (second video)

https://github.com/Expensify/App/assets/24992535/d1c5fd82-d896-4824-8e4b-efe89bf44758

After - multi line TextInput without a lineHeight prop

https://github.com/Expensify/App/assets/24992535/c0c3d74c-2464-4578-a62b-509e7667cad4

After - Testing paddingTop on a single line TextInput

After - Testing borderWidth with single-line textinput

Before - using fontSize multiplayer and lineHeight with TextInput

Test Case
fontSizeMultiplier setting

After - using fontSize multiplayer and lineHeight with TextInput

https://github.com/Expensify/App/assets/24992535/543a646d-6850-4631-a8ab-45fec612bbc8
https://github.com/Expensify/App/assets/24992535/2b126f32-45a8-428b-9385-81dc849d06f4

https://github.com/facebook/react-native/assets/24992535/230bff56-9f84-4c1e-a8c9-d1c5747b7b00

@sammy-SC Disabling the debug flag did not show any errors. Could you please share the errors? Thanks a lot. I wish you a good day.

OMG, you fixed it? I'm almost having a ulcer trying to fix it in my code... Merge it, please! 😃

Thanks a lot 🙏  @NandoMB

Issues https://github.com/facebook/react-native/issues/28012 and https://github.com/facebook/react-native/issues/33986. They are fixed with the PR
Issue https://github.com/facebook/react-native/issues/31112 I replied in https://github.com/facebook/react-native/issues/31112#issuecomment-1562331521

@sammy-SC Disabling the debug flag did not show any warning. Could you please share the log of the CI step Facebook Internal - Linter? Thanks a lot. I wish you a good day.

Sorry for the slow reply, I was away for +2 weeks on vacation. I will just just fix the linter. No worries.

Hello @fabriziobertoglio1987
we will have to revert this change and evaluate next steps.
The change causes a slight difference on how text is rendered. I realise the change is small but it can lead to text's baselines being off, which we don't want.

Thanks, @sammy-SC, could you please share the source code for this example?

Update 12/07
There is a difference in the baseline computation between RCTTextShadowView postprocessAttributedText and RCTTextAttributes effectiveParagraphStyle.
Given the following example:
<Text style={{lineHeight: 500, fontSize: 15, backgroundColor: 'red'}}>
  font size 15
  <Text style={{fontSize: 50, lineHeight: 500}}>font size 50</Text>
</Text>

The RCTTextShadowView implementation calculates the same baseline for the entire Text based on the highest lineHeight/fontSize
The RCTTextAttributes implementation calculates different baseline for each Text span, based on the Text span lineHeight and fontSize

Thanks, @sammy-SC. I published PR https://github.com/facebook/react-native/pull/38359 to fix the regression from comment https://github.com/facebook/react-native/pull/37465#issuecomment-1625110372.

authors: NandoMB fabriziobertoglio1987 sammy-SC


text:
Handle function drgn type when enumerating types

Summary
Handle function types when enumerating types.
Test plan
A test needs adding.

Codecov Report
Attention: 5 lines in your changes are missing coverage. Please review.

Comparison is base (9e2b48d) 68.70% compared to head (86e97e7) 68.68%.
Report is 1 commits behind head on main.

Files
Patch %
Lines

oi/type_graph/DrgnParser.cpp
0.00%
5 Missing :warning:

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #422      +/-   ##
==========================================
- Coverage   68.70%   68.68%   -0.03%
==========================================
  Files         119      119
  Lines       11642    11647       +5
  Branches     1920     1920
==========================================
+ Hits         7999     8000       +1
- Misses       2670     2674       +4
  Partials      973      973

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

I'm wondering if this change makes total sense - we're taking in a function type which is explicitly unsized, and stating that it's a sized type StubbedPointer. I wonder if it would make more sense to immediately return an Incomplete from this switch case, along with a depth decrement. That would work if the goal is to prevent hitting the catch statement. I could be missing something though!
I wrote this bit of code which I think neatens up the depth decrement, if we do decrement in this specific switch case it would make sense to use something like this: https://github.com/JakeHillion/object-introspection/blob/6be7e7708bfd69c75faa46d42df81a79734eab46/oi/type_graph/ClangTypeParser.cpp#L45-L55

Finding a test case for this proved difficult. Putting this on hold until we hit this issue in production again.

authors: JakeHillion ajor codecov-commenter tyroguru