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

uncaught Error: Could not find module root given file: "app://./js/chunk-vendors.a960702b.js". Do you have a package.json file? #62

Open
bruceauyeung opened this issue Nov 15, 2019 · 1 comment

Comments

@bruceauyeung
Copy link

bruceauyeung commented Nov 15, 2019

stacktrace:

Uncaught Error: Could not find module root given file: "app://./js/chunk-vendors.a960702b.js". Do you have a package.json file?
at Function.getRoot (bindings.js:211)
at bindings (bindings.js:82)
at Object.0e66 (ref.js:5)
at webpack_require (bootstrap:84)
at Module.cd49 (app.f8c3ff0a.js:1)
at webpack_require (bootstrap:84)
at Object.0 (app.f8c3ff0a.js:1)
at webpack_require (bootstrap:84)
at checkDeferredModules (bootstrap:45)
at bootstrap:221

i am using https://github.com/nklayman/vue-cli-plugin-electron-builder to pack my electron app.
all my bussiness-related codes are packed together and can be accessed with customed app protocol.
file system structure:

|-- omitted...
|-- js
|   |-- omitted...
|   |-- chunk-vendors.a960702b.js
|   `-- chunk-vendors.a960702b.js.map
|-- node_modules
|   |-- bindings
|   |-- omitted...
`-- package.json

i dived inside bindings code, and it seems lack of supporting this kind of customized protocol such as app.
do i have to bring in a app-uri-to-path module and use customized version of node-bindings?
any suggestion?

@bruceauyeung bruceauyeung changed the title ncaught Error: Could not find module root given file: "app://./js/chunk-vendors.a960702b.js". Do you have a package.json file? uncaught Error: Could not find module root given file: "app://./js/chunk-vendors.a960702b.js". Do you have a package.json file? Nov 15, 2019
@Cuimc
Copy link

Cuimc commented Jul 18, 2022

@bruceauyeung
I have encountered this problem with you. What is your solution?

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