Closed akachi1409 closed 10 months ago
Please specify 'repository' in the package.json
Have you tried resolving this message first?
Looking at the codebase, it's unable to resolve your publish
config. Since it's github-dependent, I'd recommend fixing the warning first and report back
Please specify 'repository' in the package.json
Have you tried resolving this message first?
Looking at the codebase, it's unable to resolve your
publish
config. Since it's github-dependent, I'd recommend fixing the warning first and report back
Yes, I added publih
config like this.
"publish": null,
Now I succeed in publishing the app in Mac, but the problem is the app is not launching in the Mac. (While I not only not only succeed in publshing app in Linux and Win, but also in running in Lunux and Win.)
Can you just leave publish
empty instead of explicitly null? That seems like it'd be the same purpose, but null isn't working obv.
Can you just leave
publish
empty instead of explicitly null? That seems like it'd be the same purpose, but null isn't working obv.
Like this?
"publish": []
Can you just leave
publish
empty instead of explicitly null? That seems like it'd be the same purpose, but null isn't working obv.
I tried this.
"publish": []
But the app is still launching in the development, not in the production.
And to confirm, this only occurs on Mac?
Can you put together a minimum reproducible repo of this issue? Such as via an electron boilerplate project?
And to confirm, this only occurs on Mac?
Can you put together a minimum reproducible repro of this issue? Such as via an electron boilerplate project?
Oh, sorry, please check again. The app is working in the development but not in the production in the Mac.
And to confirm, this only occurs on Mac?
Can you put together a minimum reproducible repo of this issue? Such as via an electron boilerplate project?
https://github.com/akachi1409/dropbox-app Invited you.
Can you just leave
publish
empty instead of explicitly null? That seems like it'd be the same purpose, but null isn't working obv.
And yes, it is only occur in Mac. Linux and Window works well.
Tried to run the project locally with open ./dist/mac-arm64/dropbox.app --args --remote-debugging-port=8080 --inspect-brk
and I'm seeing this in the logs
(node:30356) UnhandledPromiseRejectionWarning: Error: ENOENT: no such file or directory, mkdir 'dropbox-storage'
(Use `dropbox --trace-warnings ...` to show where the warning was created)
I can't seem to access the remote debugging port, I have ⚠ Remote browser is newer than client browser.
in my Inspect and I'm not sure how to resolve that as I'm on latest Chrome AFAICT. About Chrome shows up-to-date 110.0.5481.177 (Official Build) (arm64)
Tried to run the project locally with
open ./dist/mac-arm64/dropbox.app --args --remote-debugging-port=8080 --inspect-brk
and I'm seeing this in the logs(node:30356) UnhandledPromiseRejectionWarning: Error: ENOENT: no such file or directory, mkdir 'dropbox-storage' (Use `dropbox --trace-warnings ...` to show where the warning was created)
I can't seem to access the remote debugging port, I have
⚠ Remote browser is newer than client browser.
in my Inspect and I'm not sure how to resolve that as I'm on latest Chrome AFAICT. About Chrome shows up-to-date110.0.5481.177 (Official Build) (arm64)
Can you give me the possible solution? I tried creating "dropbox-storage' folder, but it is not working yet. ( Still without creating that folder, it is working well in Window and Linux.) What is the solution method from this issue?
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.
This issue was closed because it has been stalled for 5 days with no activity.
"Issue closed because it has been stalled for 5 days with no activity"? Wow 😀
I'm also experimenting same issue consistently. By looking at the code is clear that something is calling computeChannelNames()
in app-builder-lib/src/publish/updateInfoBuilder.ts
by passing null
in publishConfig
function argument:
function computeChannelNames(packager: PlatformPackager<any>, publishConfig: PublishConfiguration): Array<string> {
const currentChannel: string = (publishConfig as GenericServerOptions).channel || "latest"
So that line throws because it's trying to read null.channel
. Interesting thing is that TypeScript doesn't complain in my app.
@ibc
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.
Can you please create a minimum repro repo of the issue?
Based on the computeChannelNames
you linked, I followed it to this code:
https://github.com/electron-userland/electron-builder/blob/99f49cf7a86afa33d35652ffc6329fefed2e5f75/packages/app-builder-lib/src/publish/PublishManager.ts#L274-L288
If repositoryInfo != null && repositoryInfo.type === "github"
isn't true, then publishConfig = null
is returned.
What is the output of DEBUG=electron-builder
for logged entry getPublishConfigsForUpdateInfo
. It should show what repositoryInfo
is returning as the next debugging step
Honestly I don't see neither getPublishConfigsForUpdateInfo
nor repositoryInfo
in debug logs. Note that I'm using electron-builder 23.6.0 and electron-publish 23.6.0. Unfortunately I cannot dig much more since it's not "my project" (I don't really know about building electron, I just saw the error and tried to investigate it a bit).
But I see this in the output:
• detect github as publish provider
• calling getInfo reason=owner or project is not specified explicitly provider=github owner=undefined project=undefined
• Cannot detect repository by .git/config. Please specify "repository" in the package.json (https://docs.npmjs.com/files/package.json#repository).
Please see https://electron.build/configuration/publish
• async task error error=Cannot read properties of null (reading 'channel')
So the problem happens in my end because I have a GITHUB_TOKEN
environment variable in my terminal, and somehow the electron-builder or electron-publisher package assumes that, if I have that, then I want to publish, but rest of publish params are not given so here the inconsistency, some bad check in the library internals and booom.
This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 30 days.
This issue was closed because it has been stalled for 30 days with no activity.
So the problem happens in my end because I have a
GITHUB_TOKEN
environment variable in my terminal, and somehow the electron-builder or electron-publisher package assumes that, if I have that, then I want to publish, but rest of publish params are not given so here the inconsistency, some bad check in the library internals and booom.
Thanks!
GITHUB_TOKEN="" electron-builder build --windows --mac --linux --config ./electron-builder.json --publish never
looks ridiculous just to build and prevent publishing, but it finally works :D
I am using Electron builder to build Electron app for Mac. I have built for Window and Linux successfully, but when I tried in building for Mac, I have the following error.
Can not Cleanup: TypeError: Cannot read property 'channel' of null
Electron version 23.1.1 Electron builder version 23.6.0
How to fix this error?
This is my builder config.