elm-test icon indicating copy to clipboard operation
elm-test copied to clipboard

Weird error in synced environment

Open simonh1000 opened this issue 6 years ago • 7 comments

I use a sync program to keep my to dev computers in sync. It works in general, but I experience issues with elm-test, as when I switch from one computer to another, elm-test fails until I delete the elm-package directories (seemingly in both the root and tests directories). What I see is

Unhandled exception while running the tests: { Error: EEXIST: file already exists, symlink '/Users/.../tests/elm-stuff' -> '/Users/.../elm-stuff/generated-code/elm-community/elm-test/elm-stuff'
    at Object.fs.symlinkSync (fs.js:1014:18)
    at runElmTest (/usr/local/lib/node_modules/elm-test/lib/elm-test.js:358:8)
    at Object.<anonymous> (/usr/local/lib/node_modules/elm-test/lib/elm-test.js:720:1)
    at Module._compile (module.js:635:30)
    at Object.Module._extensions..js (module.js:646:10)
    at Module.load (module.js:554:32)
    at tryModuleLoad (module.js:497:12)
    at Function.Module._load (module.js:489:3)
    at Module.require (module.js:579:17)
    at require (internal/module.js:11:18)
  errno: -17,
  code: 'EEXIST',
  syscall: 'symlink',
  path: '/Users/.../tests/elm-stuff',
  dest: '/Users/.../elm-stuff/generated-code/elm-community/elm-test/elm-stuff' }

simonh1000 avatar Dec 16 '17 07:12 simonh1000

I'm 99% sure this is not an issue with elm-test. We're not touching the elm-stuff directory ourselves. Is it possible for you to exclude elm-stuff from synchronizing? It's very likely to contain per-computer data, so it should be generated locally on each device.

drathier avatar Dec 16 '17 08:12 drathier

yes I do. I have changed the setting to avoid that and will report back when I have more data

simonh1000 avatar Dec 16 '17 14:12 simonh1000

I'm not using any kind of synced environment; just using NPM and having the same problem.

jnmandal avatar Mar 26 '18 19:03 jnmandal

all I can add is that the frequency does seem to have gone down significantly, but I did still get the error again recently while using my other device. Had to delete all elm-stuff directories

simonh1000 avatar Mar 27 '18 05:03 simonh1000

Correction: the node test runner does modify elm-stuff, to add some generated elm files.

drathier avatar Mar 27 '18 13:03 drathier

We are also experiencing this issue, though we are using Docker which might result in a similar situation as syncing multiple computers. Removing /project_root/elm-stuff and /project_root/tests/elm-stuff did help.

tillydray avatar Jun 13 '18 18:06 tillydray

I'm in the same boat, running [email protected]. I have no sync running but my path setup is atypical (because of Webpacker) but I have some private packages installed using elm-install. Not sure if it's related, I suspect the unusual path setup because before migrating to Webpacker, with normal setup (src/ and tests/ side by side) it worked.

mingan avatar Jul 04 '18 09:07 mingan