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

[Windows] Fails to bootstrap #1655

Open
Marius456 opened this issue Aug 20, 2024 · 6 comments
Open

[Windows] Fails to bootstrap #1655

Marius456 opened this issue Aug 20, 2024 · 6 comments
Assignees
Labels
bug Something isn't working

Comments

@Marius456
Copy link
Contributor

Marius456 commented Aug 20, 2024

Describe the bug
When you try to yarn bootstrap

To Reproduce
Steps to reproduce the behavior:

  1. Run command 'yarn bootstrap'
  2. 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
@Marius456 Marius456 added the bug Something isn't working label Aug 20, 2024
@Marius456
Copy link
Contributor Author

Marius456 commented Aug 20, 2024

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> 

@pauliusguzas pauliusguzas added this to the 1.2 milestone Sep 9, 2024
@Marius456 Marius456 modified the milestones: 1.2, 1.3 Sep 9, 2024
@Marius456 Marius456 self-assigned this Sep 16, 2024
@Marius456 Marius456 modified the milestones: 1.3, 1.4 Sep 20, 2024
@Marius456
Copy link
Contributor Author

After separately running those two commands: rimraf -I ./lib and rimraf -I tsconfig.tsbuildinfo , command yarn bootstrap worked as intended

@Marius456
Copy link
Contributor Author

Marius456 commented Sep 26, 2024

Got error when I pulled updates with git pull (there was also update for renative version)
Tried this commands:

  1. rimraf -I ./lib
  2. rimraf -I tsconfig.tsbuildinfo
  3. yarn compile
  4. 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.

@Marius456
Copy link
Contributor Author

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.

@Marius456 Marius456 modified the milestones: 1.4, 1.5 Oct 7, 2024
@Marius456 Marius456 modified the milestones: 1.5, 1.6 Oct 21, 2024
@Marius456 Marius456 modified the milestones: 1.6, 1.7 Nov 4, 2024
@Marius456
Copy link
Contributor Author

Found process that locks files:
Screenshot 2024-11-05 114109
This process is from VS Code.

@Marius456
Copy link
Contributor Author

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.

@Marius456 Marius456 removed this from the 1.7 milestone Nov 6, 2024
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