-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
expo yarn workspace not working on windows #6983
Comments
As another Windows 10 user, I can confirm I'm also seeing this exact same problem. |
this happens with me too |
Not sure what the cause is but added a note to the README saying it works only on Mac and Linux: https://github.com/expo/expo/blob/master/packages/expo-yarn-workspaces/README.md |
I'm not sure but I think that is a windows path problem when generating the binaries |
I've noticed the package works on windows but you have to remove the script from the app's package.json and add it to the main package.json in such a way: |
This comment has been minimized.
This comment has been minimized.
@kingdaro didn't work for me :( |
Would it help if we added a vscode container so windows users can use a Linux terminal while running it? https://code.visualstudio.com/docs/remote/containers |
I can create/test one so people could get up and running in windows at least |
@NiallJoeMaher did you get a chance to create a remote container for windows development? |
I'll push up one later today or early tomorrow. 馃挏 |
Sadly, it doesn't work at my side with the following error: internal/fs/utils.js:220
throw err;
^
Error: EPERM: operation not permitted, symlink '..\..\..\node_modules\expo' -> 'C:\Users\xxx\Workplace\monorepo\packages\native\node_modules\expo'
at Object.symlinkSync (fs.js:994:3)
at symlinkNecessaryPackage (C:\Users\xxx\Workplace\monorepo\node_modules\expo-yarn-workspaces\bin\symlink-necessary-packages.js:65:8)
at symlinkNecessaryPackages (C:\Users\xxx\Workplace\monorepo\node_modules\expo-yarn-workspaces\bin\symlink-necessary-packages.js:17:3)
at Object.<anonymous> (C:\Users\xxx\Workplace\monorepo\node_modules\expo-yarn-workspaces\bin\symlink-necessary-packages.js:81:3)
at Module._compile (internal/modules/cjs/loader.js:955:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:991:10)
at Module.load (internal/modules/cjs/loader.js:811:32)
at Function.Module._load (internal/modules/cjs/loader.js:723:14)
at Function.Module.runMain (internal/modules/cjs/loader.js:1043:10)
at internal/main/run_main_module.js:17:11 {
errno: -4048,
syscall: 'symlink',
code: 'EPERM',
path: '..\\..\\..\\node_modules\\expo',
dest: 'C:\\Users\\xxx\\Workplace\\monorepo\\packages\\native\\node_modules\\expo'
} Main package.json {
"...": "...",
"workspaces": [
"packages/**/*"
],
"scripts": {
"postinstall":"cd ./packages/native && expo-yarn-workspaces postinstall"
},
"dependencies": {
"...": "..."
}
} Expo package.json {
"...": "...",
"main": "__generated__/AppEntry.js",
"scripts": {
"start": "expo start",
"android": "expo start --android",
"ios": "expo start --ios",
"web": "expo start --web",
"eject": "expo eject"
},
"dependencies": {
"@monorepo/components": "1.0.0",
"expo": "36.0.2",
"react": "16.13.1",
"...": "...",
},
"devDependencies": {
"...": "...",
"expo-yarn-workspaces": "1.2.1"
}
} |
It is giving operation not allowed. only use Windows PowerShell as an administrator. and it will already work. |
Any updates on this issue? |
Having issues with double registration of RNCSafeViewArea* and can't follow instructions provided in an issue related to that because expo install is mediately trying to remove itself. This is pretty annoying. And this is just because Google rejected previous build due to Facebook Ad SDK secretly included with those builds, now facing tons of new issues after trying to upgrade SDK ...
|
@soletan - it's not clear to me how this is related to expo. all expo is doing here is running
it's up to you to make yarn workspaces work for your project, we don't handle that |
@brentvatne I see, but I was using npm before and back then running expo install was stating something about having issues to do something right away since I don't use yarn but npm. So what is it? And since all I do is running yarn install and yarn add on a very simple package.json what is it I'm doing wrong here? AFAICT I don't have custom hooks and global scripts or stuff like that involved. yarn is working perfectly in many different projects I'm working on and this expo-based with its 40k of dependencies is not. But yarn is to blame? I don't see this causality. But I'm fine to keep working with npm here. UPDATE: At least this issue is gone when using npm. So, that's kind of proving your point. |
@soletan it sounds like you need to debug your yarn.lock and node_modules further. |
Well, as mentioned earlier, I have been switching to yarn before by simply removing node_modules and invoking yarn install. When I was running into that issue with double registration I was following suggestion to run these steps:
According to that I don't expect that there is much to debug. yarn might be the culprit here and causing some issues instantly. But since it's yarn's stable version 1.22.5 and since I do have tons of issues with expo since upgrading from 37 to 39 to fix deployment issues in Google Play Store for a customer who is unwilling to pay any of the tens to hundreds of hours I'm spending in addition for that for months now, there is little time and motivation left to investigate this issue on behalf of yarn (which is working well in up to 20 different projects I'm using it with) or expo. Right now I'd like to close this project, get rid of it and try a different framework next time which hopefully isn't e.g. having issues when I accidentally use 3.1.8 of a plugin instead of its 3.1.4 which is meant to be basically behaving the same way according to semver. UPDATE: Just to present the package.json used (with the one dependency to be removed inserted again):
There are no hooks or similar involved. |
Closing, the fix of #11739 (available in |
Hola resolv铆 este problema yendo a la pagina oficial de nodejs y descargando el instalador de node en su ultima versi贸n y ejecut谩ndolo. |
馃悰 Bug Report
Environment
Expo CLI 3.11.9 environment info:
System:
OS: Windows 10
Binaries:
Yarn: 1.21.1 - C:\Program Files (x86)\Yarn\bin\yarn.CMD
npm: 6.13.1 - C:\Program Files\nodejs\npm.CMD
Target: iOS / Android
Steps to Reproduce
Have a monorepo with lerna / yarn workspace.
Follow the expo-yarn-workspace installation steps.
Folder structure:
** mobile (name: @myapp/mobile)
*** package.json (expo-yarn-workspace installed as dev dependency and postinstall script).
When I run yarn add somePackage, it fails with this error:
Expected Behavior
Same config is working on mac without problem.
I expect it to work on windows as well.
Actual Behavior
I can execute the script with yarn postinstall without any problem. The problem is when it's auto executed with a new package install.
I hope I put enough informations.
Thanks for you help
The text was updated successfully, but these errors were encountered: