Skip to content
This repository has been archived by the owner on Jun 15, 2022. It is now read-only.

cachedir argument causes error when app run #31

Open
anhhuy1605 opened this issue May 6, 2017 · 0 comments
Open

cachedir argument causes error when app run #31

anhhuy1605 opened this issue May 6, 2017 · 0 comments

Comments

@anhhuy1605
Copy link

anhhuy1605 commented May 6, 2017

When I run electron app with cachedir argument electron . -c ./.cache/ to specify the cache directory of electron-compile, it runs correctly if ./.cache/ directory does not exist, but when I close and run the app again (./.cache/ is created and populated with cache data), it threw this error:

App threw an error during load
Error: Asked for /Users/huy/Workspace/js/electron/electron-compile-boilerplate/app/main.ts but it was not precompiled!
    at FileChangedCache.getHashForPathSync (/Users/huy/Workspace/js/electron/electron-compile-boilerplate/node_modules/electron-compile/lib/file-change-cache.js:313:15)
    at CompilerHost.compileReadOnlySync (/Users/huy/Workspace/js/electron/electron-compile-boilerplate/node_modules/electron-compile/lib/compiler-host.js:545:41)
    at CompilerHost.compileSync (/Users/huy/Workspace/js/electron/electron-compile-boilerplate/node_modules/electron-compile/lib/compiler-host.js:470:37)
    at Object.require.extensions.(anonymous function) [as .ts] (/Users/huy/Workspace/js/electron/electron-compile-boilerplate/node_modules/electron-compile/lib/require-hook.js:66:48)
    at Module.load (module.js:488:32)
    at tryModuleLoad (module.js:447:12)
    at Function.Module._load (module.js:439:3)
    at Module.require (module.js:498:17)
    at init (/Users/huy/Workspace/js/electron/electron-compile-boilerplate/node_modules/electron-compile/lib/config-parser.js:292:16)
    at main (/Users/huy/Workspace/js/electron/electron-compile-boilerplate/node_modules/electron-prebuilt-compile/lib/es6-init.js:40:29)

I don't get that error when I run without the cachedir argument (electron-compile will use the default temporary directory cache compileCache_)

@anhhuy1605 anhhuy1605 changed the title cachedir argument causes error when run app cachedir argument causes error when app run May 6, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant