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

Examples playground instructions won't work in Windows #48

Closed
UnknownH opened this issue Dec 18, 2021 · 5 comments
Closed

Examples playground instructions won't work in Windows #48

UnknownH opened this issue Dec 18, 2021 · 5 comments

Comments

@UnknownH
Copy link

UnknownH commented Dec 18, 2021

I'm trying to follow the steps for running the examples playground, but when running yarn on the "package" directory, it will fail when trying to create symlinks in Windows 10. The exact error is the following:


Updating symlinks for Android build...
Creating symlink to api E:\Development\Repositories\react-native-skia\package\scripts E:\Development\Repositories\react-native-skia\package
node:internal/fs/utils:344
    throw err;
    ^

Error: EEXIST: file already exists, symlink 'E:\Development\Repositories\react-native-skia\package\cpp\api' -> 'E:\Development\Repositories\react-native-skia\package\android\cpp\api'
    at Object.symlinkSync (node:fs:1651:3)
    at createSymlink (E:\Development\Repositories\react-native-skia\package\scripts\install-npm.js:8:6)
    at Object.<anonymous> (E:\Development\Repositories\react-native-skia\package\scripts\install-npm.js:16:1)
    at Module._compile (node:internal/modules/cjs/loader:1101:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1153:10)
    at Module.load (node:internal/modules/cjs/loader:981:32)
    at Function.Module._load (node:internal/modules/cjs/loader:822:12)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:79:12)
    at node:internal/main/run_main_module:17:47 {
  errno: -4075,
  syscall: 'symlink',
  code: 'EEXIST',
  path: 'E:\\Development\\Repositories\\react-native-skia\\package\\cpp\\api',
  dest: 'E:\\Development\\Repositories\\react-native-skia\\package\\android\\cpp\\api'

If I try to build the example regardless of this error, when running "npx react-native run-android" it will fail and complain about some source files missing, presumably because the symlink did not work. This was executed on a freshly cloned repository, so no previous build steps were run, but the destination link path mentioned in the error seems to be versioned in Github.

NOTE It seems like the library won't build on Windows either, even if I restrict it to build the android binaries only. I'm using the ninja binary that comes with the Android SDK cmake (v3.10). It seems like the build script is unable to create and enter the "out" folder in the cloned skia submodule.

@schiller-manuel
Copy link
Contributor

schiller-manuel commented Dec 18, 2021

I get the same error on macOS, running yarn in package directory on 65a3c66 leads to:

[4/4] 🔨  Building fresh packages...
$ yarn node scripts/install-npm.js
yarn node v1.22.17
Updating symlinks for Android build...
Creating symlink to api /Users/foo/source/react-native-skia/package/scripts /Users/foo/source/react-native-skia/package
internal/fs/utils.js:332
    throw err;
    ^

Error: EEXIST: file already exists, symlink '/Users/foo/source/react-native-skia/package/cpp/api' -> '/Users/foo/source/react-native-skia/package/android/cpp/api'
    at Object.symlinkSync (fs.js:1214:3)
    at createSymlink (/Users/foo/source/react-native-skia/package/scripts/install-npm.js:8:6)
    at Object.<anonymous> (/Users/foo/source/react-native-skia/package/scripts/install-npm.js:16:1)
    at Module._compile (internal/modules/cjs/loader.js:1085:14)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1114:10)
    at Module.load (internal/modules/cjs/loader.js:950:32)
    at Function.Module._load (internal/modules/cjs/loader.js:790:12)
    at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:76:12)
    at internal/main/run_main_module.js:17:47 {
  errno: -17,
  syscall: 'symlink',
  code: 'EEXIST',
  path: '/Users/foo/source/react-native-skia/package/cpp/api',
  dest: '/Users/foo/source/react-native-skia/package/android/cpp/api'
}
error Command failed.
Exit code: 1

The symlinks are already in the git repo: https://github.com/Shopify/react-native-skia/tree/main/package/android/cpp
So should package/scripts/install-npm.js not be invoked when running yarn?

@wcandillon
Copy link
Collaborator

These should be fixed now. Feel free to reopen if needed.

@Jaserto
Copy link

Jaserto commented Jul 30, 2022

I'm facing the same issue on Windows, any solution?

@rhalaly
Copy link

rhalaly commented Oct 7, 2022

Same issue here, on Windows. @wcandillon we can't reopen this ticket, can you please reopen it?

@wcandillon wcandillon reopened this Oct 28, 2022
@wcandillon
Copy link
Collaborator

fixed by #1527

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants