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

Test failure: missing baselines/local directory (ENOENT: no such file or directory) #7

Closed
morzel85 opened this issue Jun 13, 2021 · 1 comment

Comments

@morzel85
Copy link
Contributor

If there is a test failure on newly cloned repo, then an error happens due to missing baselines/local directory.

If empty baselines/local is added before npm test is run, then tests are handled properly (local files are created)...

Example (run on Ubuntu WSL):

xxx@yyy:~/projects/gh/sandersn/mini-typescript$ npm test

> mini-typescript@1.0.0 test
> rm baselines/local/*; tsc && node test.js

rm: cannot remove 'baselines/local/*': No such file or directory
node:internal/fs/utils:343
    throw err;
    ^

Error: ENOENT: no such file or directory, open 'baselines/local/basicLex.lex.baseline'
    at Object.openSync (node:fs:582:3)
    at Object.writeFileSync (node:fs:2143:35)
    at test (/home/xxx/projects/gh/sandersn/mini-typescript/test.js:13:12)
    at /home/xxx/projects/gh/sandersn/mini-typescript/test.js:78:68
    at Array.map (<anonymous>)
    at Object.<anonymous> (/home/xxx/projects/gh/sandersn/mini-typescript/test.js:78:46)
    at Module._compile (node:internal/modules/cjs/loader:1109:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1138:10)
    at Module.load (node:internal/modules/cjs/loader:989:32)
    at Function.Module._load (node:internal/modules/cjs/loader:829:14) {
  errno: -2,
  syscall: 'open',
  code: 'ENOENT',
  path: 'baselines/local/basicLex.lex.baseline'
}

Maybe the dir could be added as a postinstall step with mkdir -p baselines/local ?

@sandersn
Copy link
Owner

Fixed by #1

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