Skip to content

Same cache dir between multiple projects errors with parallel usage #15

@bluetech

Description

@bluetech

My build system creates 3 bundles with rollup. If I build each bundle serially, it succeeds. However, if I build them concurrently (e.g. with make -j4, gulp, ...), it fails like this:

[19:54:40] Using gulpfile client/gulpfile.js
[19:54:40] Starting 'scripts.foo'...
[19:54:42] Starting 'scripts.bar'...
[19:54:44] Starting 'scripts.baz'...
Error: ENOENT: no such file or directory, open 'client/.rpt2_cache/c96394021b516827cdd67f325bc8e31a9c85a68e/code/cache_/c25c849c2122f988238ef5fb3159bccdcf3167ca'
    at error (client/node_modules/rollup/dist/rollup.js:170:12)
    at client/node_modules/rollup/dist/rollup.js:8926:6
    at process._tickCallback (internal/process/next_tick.js:109:7)
    at Module.runMain (module.js:607:11)
    at run (bootstrap_node.js:423:7)
    at startup (bootstrap_node.js:147:9)
    at bootstrap_node.js:538:3
Error: ENOENT: no such file or directory, open 'client/.rpt2_cache/c96394021b516827cdd67f325bc8e31a9c85a68e/code/cache_/fe9b01c7ea2aa0c98e1433b824f39491fdead469'
    at error (client/node_modules/rollup/dist/rollup.js:170:12)
    at client/node_modules/rollup/dist/rollup.js:8926:6
    at process._tickCallback (internal/process/next_tick.js:109:7)
    at Module.runMain (module.js:607:11)
    at run (bootstrap_node.js:423:7)
    at startup (bootstrap_node.js:147:9)
    at bootstrap_node.js:538:3
[19:54:49] Finished 'scripts.bar' after 6.27 s
[19:54:49] Finished 'scripts.foo' after 8.97 s
[19:54:49] Finished 'scripts.baz' after 5.65 s
[19:54:49] Starting 'scripts'...
[19:54:49] Finished 'scripts' after 67 μs

I can try to provide a reproducer, if needed.

These are the relevant package versions:

$ npm ls --depth=0
├── resolve@1.3.2
├── rollup@0.41.6
├── rollup-plugin-typescript2@0.4.0
├── tslib@1.6.0
└── typescript@2.2.2

Thanks.

Metadata

Metadata

Assignees

Labels

kind: bugSomething isn't working properlykind: optimizationPerformance, space, size, etc improvementsolution: workaround availableThere is a workaround available for this issue

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions