[Windows] Fails to bootstrap
Marius456 opened this issue · 6 comments
Describe the bug
When you try to yarn bootstrap
To Reproduce
Steps to reproduce the behavior:
- Run command 'yarn bootstrap'
- See error
Expected behavior
Screenshots or copy&paste
PS D:\Projects\renative> yarn bootstrap
yarn run v1.22.19
$ npx lerna@6 bootstrap && yarn build && yarn link:rnv && yarn generateSchema
lerna notice cli v6.6.2
lerna info versioning independent
lerna info bootstrap root only
[1/5] Validating package.json...
[2/5] Resolving packages...
success Already up-to-date.
$ npx lerna link --force-local && npx jetify
lerna notice cli v6.6.2
lerna info versioning independent
lerna info Symlinking packages and binaries
Jetifier is deprecated. Future versions of react-native CLI may not run it by default.
Jetifier found 2355 file(s) to forward-jetify. Using 12 workers...
$ lerna run build
lerna notice cli v6.6.2
lerna info versioning independent
√ @rnv/config-templates:build (1s)
√ @rnv/adapter:build (8s)
√ @rnv/renative:build (9s)
√ @rnv/core:build (14s)
× @rnv/sdk-utils:build
$ yarn clean && yarn compile
$ rimraf -I ./lib && rimraf -I tsconfig.tsbuildinfo
D:\Projects\renative\packages\core\node_modules\rimraf\bin.js:47
throw er
^
[Error: EPERM: operation not permitted, unlink 'D:\Projects\renative\packages\sdk-utils\lib\axiosUtils.d.ts'] {
errno: -4048,
code: 'EPERM',
syscall: 'unlink',
path: 'D:\\Projects\\renative\\packages\\sdk-utils\\lib\\axiosUtils.d.ts'
}
Node.js v18.18.1
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
× @rnv/engine-roku:build
$ yarn clean && yarn compile
$ rimraf -I ./lib && rimraf -I tsconfig.tsbuildinfo
D:\Projects\renative\packages\core\node_modules\rimraf\bin.js:47
throw er
^
[Error: EPERM: operation not permitted, unlink 'D:\Projects\renative\packages\engine-roku\lib\index.d.ts'] {
errno: -4048,
code: 'EPERM',
syscall: 'unlink',
path: 'D:\\Projects\\renative\\packages\\engine-roku\\lib\\index.d.ts'
}
Node.js v18.18.1
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
√ @rnv/integration-starter:build (13s)
√ @rnv/integration-docker:build (13s)
√ @rnv/build-hooks-git:build (13s)
√ @rnv/build-hooks-schema:build (14s)
————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————
> Lerna (powered by Nx) Ran target build for 29 projects (29s)
√ 8/10 succeeded [0 read from cache]
× 2/10 targets failed, including the following:
- @rnv/sdk-utils:build
- @rnv/engine-roku:build
Hint: Try "nx view-logs" to get structured, searchable errors logs in your browser.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
PS D:\Projects\renative>
Desktop (please complete the following information):
- OS: windows 11
- Node Version v18.18.1
- RNV Version 1.0.0
yarn bootstrap clean
also fails:
PS D:\Projects\renative> yarn bootstrap clean
yarn run v1.22.19
$ npx lerna@6 bootstrap && yarn build && yarn link:rnv && yarn generateSchema clean
lerna notice cli v6.6.2
lerna info versioning independent
lerna info bootstrap root only
[1/5] Validating package.json...
[2/5] Resolving packages...
success Already up-to-date.
$ npx lerna link --force-local && npx jetify
lerna notice cli v6.6.2
lerna info versioning independent
lerna info Symlinking packages and binaries
Jetifier is deprecated. Future versions of react-native CLI may not run it by default.
Jetifier found 2355 file(s) to forward-jetify. Using 12 workers...
$ lerna run build
lerna notice cli v6.6.2
lerna info versioning independent
√ @rnv/config-templates:build (1s)
√ @rnv/adapter:build (6s)
√ @rnv/renative:build (6s)
√ @rnv/core:build (12s)
√ @rnv/engine-roku:build (13s)
√ @rnv/build-hooks-git:build (14s)
√ @rnv/integration-starter:build (14s)
√ @rnv/build-hooks-schema:build (14s)
√ @rnv/integration-docker:build (14s)
√ @rnv/sdk-utils:build (14s)
× @rnv/sdk-telemetry:build
$ yarn clean && yarn compile
$ rimraf -I ./lib && rimraf -I tsconfig.tsbuildinfo
D:\Projects\renative\packages\core\node_modules\rimraf\bin.js:47
throw er
^
[Error: EPERM: operation not permitted, unlink 'D:\Projects\renative\packages\sdk-telemetry\lib\constants.d.ts'] {
errno: -4048,
code: 'EPERM',
syscall: 'unlink',
path: 'D:\\Projects\\renative\\packages\\sdk-telemetry\\lib\\constants.d.ts'
}
Node.js v18.18.1
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
× @rnv/sdk-react-native:build
$ yarn clean && yarn compile
$ rimraf -I ./lib && rimraf -I tsconfig.tsbuildinfo
D:\Projects\renative\packages\core\node_modules\rimraf\bin.js:47
throw er
^
[Error: EPERM: operation not permitted, unlink 'D:\Projects\renative\packages\sdk-react-native\lib\adapters.d.ts'] {
errno: -4048,
code: 'EPERM',
syscall: 'unlink',
path: 'D:\\Projects\\renative\\packages\\sdk-react-native\\lib\\adapters.d.ts'
}
Node.js v18.18.1
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
× @rnv/sdk-webpack:build
$ yarn clean && yarn compile
$ rimraf -I ./lib && rimraf -I tsconfig.tsbuildinfo
D:\Projects\renative\packages\core\node_modules\rimraf\bin.js:47
throw er
^
[Error: EPERM: operation not permitted, unlink 'D:\Projects\renative\packages\sdk-webpack\lib\adapter.d.ts'] {
errno: -4048,
code: 'EPERM',
syscall: 'unlink',
path: 'D:\\Projects\\renative\\packages\\sdk-webpack\\lib\\adapter.d.ts'
}
Node.js v18.18.1
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
× @rnv/engine-rn-next:build
$ yarn clean && yarn compile
$ rimraf -I ./lib && rimraf -I tsconfig.tsbuildinfo
D:\Projects\renative\packages\core\node_modules\rimraf\bin.js:47
throw er
^
[Error: EPERM: operation not permitted, unlink 'D:\Projects\renative\packages\engine-rn-next\lib\config.d.ts'] {
errno: -4048,
code: 'EPERM',
syscall: 'unlink',
path: 'D:\\Projects\\renative\\packages\\engine-rn-next\\lib\\config.d.ts'
}
Node.js v18.18.1
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
√ @rnv/engine-core:build (15s)
—————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————
> Lerna (powered by Nx) Ran target build for 29 projects (43s)
√ 11/15 succeeded [0 read from cache]
× 4/15 targets failed, including the following:
- @rnv/sdk-telemetry:build
- @rnv/sdk-react-native:build
- @rnv/sdk-webpack:build
- @rnv/engine-rn-next:build
Hint: Try "nx view-logs" to get structured, searchable errors logs in your browser.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
PS D:\Projects\renative>
After separately running those two commands: rimraf -I ./lib
and rimraf -I tsconfig.tsbuildinfo
, command yarn bootstrap
worked as intended
Got error when I pulled updates with git pull
(there was also update for renative version)
Tried this commands:
rimraf -I ./lib
rimraf -I tsconfig.tsbuildinfo
yarn compile
yarn bootstrap clean
Didn't work and still got the same error.
Next day I tried using yarn bootstrap clean
and this time worked. After that yarn bootstrap
works.
Got error after git pull
(small update-one line code)
Tried steps to fix it:
- restart computer
- update node 18.18.1 => 18.19.0 => 19.0.1 => 20.17.0
rimraf -I ./lib
rimraf -I tsconfig.tsbuildinfo
rimraf -I ./node_modules
rimraf -I ./packages/core/node_modules
Find out that commands works when I close VS Code. However, it worked before with VS Code open.
VS Code is blocking the file, causing yarn bootstrap
to fail.
One workaround is to close VS Code while running the Renative project.
However, I haven't found a permanent solution.