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

Error on Windows #30

Closed
psychobolt opened this issue Jun 21, 2024 · 1 comment
Closed

Error on Windows #30

psychobolt opened this issue Jun 21, 2024 · 1 comment

Comments

@psychobolt
Copy link

psychobolt commented Jun 21, 2024

For Windows, the log file is not created.

Error: ENOENT: no such file or directory, open 'D:\tmp\turbogha.log'
    at openSync (node:fs:573:18)
    at launchServer (D:\a\_actions\rharkor\caching-for-turbo\d030e8813d3de6746943c17def1f5643b1dd1e94\src\lib\server\utils.ts:28:1)
    at run (D:\a\_actions\rharkor\caching-for-turbo\d030e8813d3de6746943c17def1f5643b1dd1e94\src\main.ts:16:1)
    at D:\a\_actions\rharkor\caching-for-turbo\d030e8813d3de6746943c17def1f5643b1dd1e94\src\index.ts:7:1
    at D:\a\_actions\rharkor\caching-for-turbo\d030e8813d3de6746943c17def1f5643b1dd1e94\dist\index.js:1585[12](https://github.com/psychobolt/vite-storybook-boilerplate/actions/runs/9617119273/job/26528200184?pr=920#step:5:13):3
    at Object.<anonymous> (D:\a\_actions\rharkor\caching-for-turbo\d030e88[13](https://github.com/psychobolt/vite-storybook-boilerplate/actions/runs/9617119273/job/26528200184?pr=920#step:5:14)d3de6746943c17def1f5643b1dd1e94\dist\index.js:158515:12)
    at Module._compile (node:internal/modules/cjs/loader:1358:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:[14](https://github.com/psychobolt/vite-storybook-boilerplate/actions/runs/9617119273/job/26528200184?pr=920#step:5:15)16:10)
    at Module.load (node:internal/modules/cjs/loader:1208:32)
    at Function.Module._load (node:internal/modules/cjs/loader:1024:12)

Which I also found another bug,

Post job cleanup.
D:\a\_actions\rharkor\caching-for-turbo\d030e8813d3de6746943c17def1f5643b1dd1e94\post.js:[2](https://github.com/psychobolt/vite-storybook-boilerplate/actions/runs/9617119273/job/26528200184?pr=920#step:10:2)2
    if (error instanceof Error) core.setFailed(error.message)
                                ^

ReferenceError: core is not defined
    at run (D:\a\_actions\rharkor\caching-for-turbo\d0[3](https://github.com/psychobolt/vite-storybook-boilerplate/actions/runs/9617119273/job/26528200184?pr=920#step:10:3)0e8813d3de6746943c17def1f5643b1dd1e94\post.js:22:33)
    at process.processTicksAndRejections (node:internal/process/task_queues:9[5](https://github.com/psychobolt/vite-storybook-boilerplate/actions/runs/9617119273/job/26528200184?pr=920#step:10:5):5)

Node.js v20.13.1

Seeing here import * as core from '@actions/core'; is not declared.

Also would it be ideal for log folder be same as runner.temp? Reference

As a workaround for anyone running into the same issue for Windows, you may add this step:

- name: Create Turbo Cache Server Log
  if: matrix.os == 'windows-latest'
  run: mkdir D:/tmp && touch D:/tmp/turbogha.log || exit 0
  shell: bash
@rharkor rharkor mentioned this issue Jun 22, 2024
Merged
@rharkor
Copy link
Owner

rharkor commented Jun 22, 2024

Hy @psychobolt , first of all thank you so much for your feedback your issue was really well written !

I fixed my code to use the runner.temp folder as you suggested 😉

You can take a look at the latest version (v1.2)

Have a good day

@rharkor rharkor closed this as completed Jun 22, 2024
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

2 participants