-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Incorrect path resolution causes not work with yarn workspace #5097
Labels
Comments
Akimotorakiyu
changed the title
not work with yarn workspace
incorrect electron path resolved cause not work with yarn workspace
Jun 25, 2020
Akimotorakiyu
changed the title
incorrect electron path resolved cause not work with yarn workspace
Incorrect path resolution causes not work with yarn workspace
Jun 25, 2020
temp solution, work with // ...
import { getElectronVersion } from "./electronVersion";
async function build(){
// ...
const electronVersion = await getElectronVersion();
builder.build({
// ...
config: {
// ...
electronVersion: electronVersion,
// ...
}
})
}
build()
const path = require.resolve("electron");
import { join } from "path";
import { readFile } from "fs-extra";
export async function getElectronVersion(): Promise<string> {
const data = await readFile(join(path, "..", "package.json"));
const version = JSON.parse(data.toString())?.version;
console.log(version);
return version;
} |
Is this still relevant? If so, what is blocking it? Is there anything you can do to help move it forward? This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. |
me to |
me too |
This is still relevant as of 22.11.5 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
what happened
when use
yarn workspaces
, it causeInvalidConfigurationError: Cannot compute electron version from installed node modules - none of the possible electron modules are installed and version ("^9.0.5") is not fixed in project.
why
electron-builder/packages/app-builder-lib/src/electron/electronVersion.ts
Lines 16 to 52 in 7b335db
somet info
according to https://nodejs.org/dist/latest-v12.x/docs/api/modules.html#modules_require_resolve_request_options
it should be something like
but can't use
require.resolve
because ofelectron-builder/tsconfig-base.json
Line 4 in 7b335db
The text was updated successfully, but these errors were encountered: