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

Watch mode fails with enoent #169

Closed
mattcosta7 opened this issue Jul 18, 2018 · 7 comments
Closed

Watch mode fails with enoent #169

mattcosta7 opened this issue Jul 18, 2018 · 7 comments
Labels

Comments

@mattcosta7
Copy link

While calling microbundle watch, i receive an error

Error: ENOENT: no such file or directory, rename ..../.rpt2_cache/[hash]/code/cache_ => ..../.rpt2_cache/[hash]/code/cache

build mode succeeds without issue

package.json

{
     "main": "dist/index.js",
     "umd:main": "dist/index.umd.js",
     "module": "dist/index.m.js",
     "source": "src/index.ts",
     "typings": "dist/index.d.ts",
     "files": [
       "dist"
     ],
     "scripts": {
          "start": "./node_modules/.bin/microbundle watch",
      },
}
 ....

@developit
Copy link
Owner

Hmm - looks like ezolenko/rollup-plugin-typescript2#34. Probably a permissions error or something.
Try running rm -rf .rpt2_cache.

Also you shouldn't need the ./node_modules/.bin/microbundle - npm takes care of that for you an can just do "microbundle watch".

@asmockler
Copy link
Contributor

I'm also getting this error–rm -rf .rpt2_cache didn't help. Works fine with build but not watch. Any other thoughts?

Running this script:

$ microbundle watch ./src/index.ts -o ./dist

And here is the error:

Error: ENOENT: no such file or directory, rename '/Users/andy/src/personal/deku/.rpt2_cache/882e09ab1bd282c901202b8e1a4105edd568729b/code/cache_' -> '/Users/andy/src/personal/deku/.rpt2_cache/882e09ab1bd282c901202b8e1a4105edd568729b/code/cache'

    at Object.fs.renameSync (fs.js:732:3)
    at RollingCache.roll (/Users/andy/src/personal/deku/node_modules/microbundle/node_modules/rollup-plugin-typescript2/dist/rollup-plugin-typescript2.cjs.js:18992:12)
    at TsCache.done (/Users/andy/src/personal/deku/node_modules/microbundle/node_modules/rollup-plugin-typescript2/dist/rollup-plugin-typescript2.cjs.js:19723:24)
    at Object.ongenerate (/Users/andy/src/personal/deku/node_modules/microbundle/node_modules/rollup-plugin-typescript2/dist/rollup-plugin-typescript2.cjs.js:20134:21)
    at /Users/andy/src/personal/deku/node_modules/rollup/dist/rollup.js:22261:58
    at Array.map (<anonymous>)
    at /Users/andy/src/personal/deku/node_modules/rollup/dist/rollup.js:22260:34
    at process._tickCallback (internal/process/next_tick.js:68:7)

@ForsakenHarmony
Copy link
Collaborator

Sadly have no idea what causes this

@texastoland
Copy link
Contributor

I saw the same stack trace debugging tonight. It means 2 instances of the TS plugin are trying to use its cache at the same time. I don't know whether that's multiple watch servers or a bug.

@developit
Copy link
Owner

This makes sense - we compile each format (cjs, mjs, etc) concurrently which means TS is running in parallel. We should probably have the TS version run serially then?

@developit
Copy link
Owner

This should be fixed by #204.

@ForsakenHarmony
Copy link
Collaborator

ForsakenHarmony commented Oct 26, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants