Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Helium App yarn install error in windows10 #1204

Closed
lingtaoluo opened this issue Jan 12, 2022 · 6 comments
Closed

Helium App yarn install error in windows10 #1204

lingtaoluo opened this issue Jan 12, 2022 · 6 comments
Labels
bug Something isn't working

Comments

@lingtaoluo
Copy link
Contributor

Describe the bug
I cloned the open source code of Helium App for local runtime. When I install the dependencies using yarn install I get the following error.Have you ever encountered such a problem? Can you give me any tips on what I need to do? Thank you very much.

yarn install v1.22.17
[1/4] Resolving packages...
[2/4] Fetching packages...
[3/4] Linking dependencies...
warning " > @helium/react-native-sdk@0.1.2" has unmet peer dependency "events@^3.3.0".
warning " > @helium/react-native-sdk@0.1.2" has incorrect peer dependency "h3-js@^3.7.2".
warning " > @helium/react-native-sdk@0.1.2" has incorrect peer dependency "query-string@^7.0.1".
warning " > @helium/react-native-sdk@0.1.2" has unmet peer dependency "readable-stream@^3.6.0".
warning " > @helium/react-native-sdk@0.1.2" has unmet peer dependency "stream@^0.0.2".
warning " > @react-native-community/async-storage@1.12.1" has incorrect peer dependency "react@^16.8".
warning " > @react-native-mapbox-gl/maps@8.4.0" has unmet peer dependency "prop-types@>=15.5.8".
warning " > @react-navigation/stack@5.14.4" has unmet peer dependency "@react-native-community/masked-view@>= 0.1.0".
warning "expo-camera > @koale/useworker@4.0.2" has incorrect peer dependency "react@^16.8.0".
warning "react-native > react-native-codegen > jscodeshift@0.11.0" has unmet peer dependency "@babel/preset-env@^7.1.6".
warning " > react-native-appstate-hook@1.0.5" has incorrect peer dependency "react@^16.8.0".
warning " > react-native-appstate-hook@1.0.5" has incorrect peer dependency "react-native@^0.59.0".
warning " > react-native-config@1.4.2" has unmet peer dependency "react-native-windows@>=0.61".
warning " > react-native-currency-format@1.0.19" has incorrect peer dependency "react@^16.8.1".
warning " > react-native-flash-message@0.1.23" has unmet peer dependency "prop-types@^15.0 || ^16.0".
warning " > react-native-skeleton-placeholder@3.0.4" has unmet peer dependency "@react-native-community/masked-view@^0.1.10".
warning " > redux-persist@6.0.0" has unmet peer dependency "redux@>4.0.0".
warning " > rn-swipe-button@1.3.6" has incorrect peer dependency "react@16.8.6".
warning " > rn-swipe-button@1.3.6" has incorrect peer dependency "react-native@0.60.5".
warning " > use-state-with-callback@2.0.3" has incorrect peer dependency "react@^16.8.6".
warning " > use-state-with-callback@2.0.3" has unmet peer dependency "react-dom@^16.8.6".
warning " > eslint-config-react-app@5.2.1" has incorrect peer dependency "@typescript-eslint/eslint-plugin@2.x".
warning " > eslint-config-react-app@5.2.1" has incorrect peer dependency "@typescript-eslint/parser@2.x".
warning " > eslint-config-react-app@5.2.1" has unmet peer dependency "babel-eslint@10.x".
warning " > eslint-config-react-app@5.2.1" has incorrect peer dependency "eslint@6.x".
warning " > eslint-config-react-app@5.2.1" has unmet peer dependency "eslint-plugin-flowtype@3.x || 4.x".
warning " > eslint-config-react-app@5.2.1" has incorrect peer dependency "eslint-plugin-react-hooks@1.x || 2.x".
warning "jest-expo > react-test-renderer@16.11.0" has incorrect peer dependency "react@^16.0.0".
warning " > reactotron-react-native@5.0.0" has incorrect peer dependency "react@^15.2.1 || 16.0.0-alpha.6 || 16.0.0-alpha.12 || 16.0.0-beta.5 || ^1
6.0.0".
warning "reactotron-react-native > react-native-flipper@0.34.0" has incorrect peer dependency "react@^16.8.1".
warning "reactotron-react-native > react-native-flipper@0.34.0" has incorrect peer dependency "react-native@^0.62.0".
warning " > reactotron-redux@3.1.3" has unmet peer dependency "reactotron-core-client@^2.5.0".
warning " > reactotron-redux@3.1.3" has unmet peer dependency "redux@^4.0.1".
[4/4] Building fresh packages...
[1/8] ⠂ react-native-sodium
[-/8] ⠂ waiting...
[-/8] ⠂ waiting...
[4/8] ⠂ postinstall-postinstall
error F:\webstormProjects\hotspot-app\node_modules\postinstall-postinstall: Command failed.
Exit code: 1
Command: node ./run.js
Arguments:
Directory: F:\webstormProjects\hotspot-app\node_modules\postinstall-postinstall
Output:
ERROR Failed to apply patch for package @react-native-community/blur

This happened because the patch file patches@react-native-community+blur+3.6.0.patch could not be parsed.

If you just upgraded patch-package, you can try running:

cd patches\@react-native-community+blur+3.6.0.patc
patch -p1 -i h
npx patch-package @react-native-community/blur
cd ../..

Otherwise, try manually creating the patch file again.

If the problem persists, please submit a bug report:

https://github.com/ds300/patch-package/issues/new?title=Patch+file+parse+error&body=%3CPlease+attach+the+patch+file+in+question%3E

error Command failed with exit code 1.
child_process.js:679
throw err;
^

Error: Command failed: yarn run postinstall

ERROR Failed to apply patch for package @react-native-community/blur

This happened because the patch file patches@react-native-community+blur+3.6.0.patch could not be parsed.

If you just upgraded patch-package, you can try running:

cd patches\@react-native-community+blur+3.6.0.patc
patch -p1 -i h
npx patch-package @react-native-community/blur
cd ../..

Otherwise, try manually creating the patch file again.

If the problem persists, please submit a bug report:

https://github.com/ds300/patch-package/issues/new?title=Patch+file+parse+error&body=%3CPlease+attach+the+patch+file+in+question%3E

error Command failed with exit code 1.

at checkExecSyncError (child_process.js:640:11)
at execSync (child_process.js:676:15)
at Object.<anonymous> (F:\webstormProjects\hotspot-app\node_modules\postinstall-postinstall\run.js:15:5)
at Module._compile (internal/modules/cjs/loader.js:1068:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1097:10)
at Module.load (internal/modules/cjs/loader.js:933:32)
at Function.Module._load (internal/modules/cjs/loader.js:774:14)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:72:12)
at internal/main/run_main_module.js:17:47 {

status: 1,
signal: null,
output: [
null,
Buffer(159) [Uint8Array] [
121, 97, 114, 110, 32, 114, 117, 110, 32, 118, 49, 46,
50, 50, 46, 49, 55, 10, 36, 32, 112, 97, 116, 99,
104, 45, 112, 97, 99, 107, 97, 103, 101, 10, 112, 97,
116, 99, 104, 45, 112, 97, 99, 107, 97, 103, 101, 32,
54, 46, 52, 46, 55, 10, 65, 112, 112, 108, 121, 105,
110, 103, 32, 112, 97, 116, 99, 104, 101, 115, 46, 46,
46, 10, 105, 110, 102, 111, 32, 86, 105, 115, 105, 116,
32, 104, 116, 116, 112, 115, 58, 47, 47, 121, 97, 114,
110, 112, 107, 103,
... 59 more items
],
Buffer(691) [Uint8Array] [
10, 42, 42, 69, 82, 82, 79, 82, 42, 42, 32, 70,
97, 105, 108, 101, 100, 32, 116, 111, 32, 97, 112, 112,
108, 121, 32, 112, 97, 116, 99, 104, 32, 102, 111, 114,
32, 112, 97, 99, 107, 97, 103, 101, 32, 64, 114, 101,
97, 99, 116, 45, 110, 97, 116, 105, 118, 101, 45, 99,
111, 109, 109, 117, 110, 105, 116, 121, 47, 98, 108, 117,
114, 10, 32, 32, 32, 32, 10, 32, 32, 84, 104, 105,
115, 32, 104, 97, 112, 112, 101, 110, 101, 100, 32, 98,
101, 99, 97, 117,
... 591 more items
]
],
pid: 49044,
stdout: Buffer(159) [Uint8Array] [
121, 97, 114, 110, 32, 114, 117, 110, 32, 118, 49, 46,
50, 50, 46, 49, 55, 10, 36, 32, 112, 97, 116, 99,
104, 45, 112, 97, 99, 107, 97, 103, 101, 10, 112, 97,
116, 99, 104, 45, 112, 97, 99, 107, 97, 103, 101, 32,
54, 46, 52, 46, 55, 10, 65, 112, 112, 108, 121, 105,
110, 103, 32, 112, 97, 116, 99, 104, 101, 115, 46, 46,
46, 10, 105, 110, 102, 111, 32, 86, 105, 115, 105, 116,
32, 104, 116, 116, 112, 115, 58, 47, 47, 121, 97, 114,
110, 112, 107, 103,
... 59 more items
],
stderr: Buffer(691) [Uint8Array] [
10, 42, 42, 69, 82, 82, 79, 82, 42, 42, 32, 70,
97, 105, 108, 101, 100, 32, 116, 111, 32, 97, 112, 112,
108, 121, 32, 112, 97, 116, 99, 104, 32, 102, 111, 114,
32, 112, 97, 99, 107, 97, 103, 101, 32, 64, 114, 101,
97, 99, 116, 45, 110, 97, 116, 105, 118, 101, 45, 99,
111, 109, 109, 117, 110, 105, 116, 121, 47, 98, 108, 117,
114, 10, 32, 32, 32, 32, 10, 32, 32, 84, 104, 105,
115, 32, 104, 97, 112, 112, 101, 110, 101, 100, 32, 98,
101, 99, 97, 117,

To Reproduce
Steps to reproduce the behavior:

  1. git clone https://github.com/helium/hotspot-app.git
  2. cd hotspot-app
  3. yarn install

Expected behavior
yarn install without errors

Software Environment
windows10 10.0.19042
yarn version 1.22.17
webstorm version 2021.2.1

@lingtaoluo lingtaoluo added the bug Something isn't working label Jan 12, 2022
@lingtaoluo
Copy link
Contributor Author

This happened because the patch file patches@react-native-community+blur+3.6.0.patch could not be parsed.

@tyler-whitman
Copy link
Contributor

tyler-whitman commented Jan 19, 2022

I think this is related to ds300/patch-package#301 which is a fix for windows newlines and patch-package. This fix has not been merged yet, so in the meantime I found a solution in one of the comments.

Could you give this a try jitsi/jitsi-meet#9498 (comment)

"You can go to {Project Root}\node_modules\patch-package\dist\patch\parse.js and modify it according to the method on this page(The line may be different)."

@lingtaoluo
Copy link
Contributor Author

@tyler-whitman Thanks, I'll try it.

@lingtaoluo
Copy link
Contributor Author

@tyler-whitman After I modified the parse.js file and re-executed yarn install. It install all needed modules automatically, causing the contents of the parse.js to revert back to the previous.

@tyler-whitman
Copy link
Contributor

tyler-whitman commented Jan 25, 2022

@tyler-whitman After I modified the parse.js file and re-executed yarn install. It install all needed modules automatically, causing the contents of the parse.js to revert back to the previous.

Ok, this is a bug with one the libraries we use and we will need to wait for them to merge ds300/patch-package#301. For now you should be fine to remove patch-package as a dependency and run the app without the patches (there may be some bugs, but nothing major). To try this remove https://github.com/helium/hotspot-app/blob/main/package.json#L21 and https://github.com/helium/hotspot-app/blob/main/package.json#L93 and then try a yarn install again.

@lingtaoluo
Copy link
Contributor Author

@tyler-whitman Hi Tyler, I've resolve this problem in windows10. We can't remove patch-package and we need the patches. If we ignore them, we will meet other problems. Now I'll describe my solution:
cd patches
sed -i 's/\r$//' *.patch
This seed command will change the newline format of the patch file to fix the newline problem in windows.
Then follow the steps in the Readme and it will compile and run properly.
Finally, thank you again for your help!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants