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

error 500 when clicking npm package #20624

Closed
init-rz opened this issue Aug 2, 2022 · 5 comments
Closed

error 500 when clicking npm package #20624

init-rz opened this issue Aug 2, 2022 · 5 comments

Comments

@init-rz
Copy link

init-rz commented Aug 2, 2022

Description

publish an npm package
in the ui click on the package.
a 500 error is returned.
log output:
2022/08/02 12:02:12 ...s/context/context.go:219:HTML() [D] [62e8f624] Template: package/view
2022/08/02 12:02:12 ...s/context/context.go:232:HTML() [E] [62e8f624] Render failed: template: package/metadata/npm:5:27: executing "package/metadata/npm" at <.PackageDescriptor.Properties>: can't evaluate field Properties in type interface {}
2022/08/02 12:02:12 ...s/context/context.go:219:HTML() [D] [62e8f624] Template: status/500

Gitea Version

1.17.0

Can you reproduce the bug on the Gitea demo site?

No

Log Gist

No response

Screenshots

image

Git Version

No response

Operating System

2.37.0.windows.1

How are you running Gitea?

downloaded window exe from gitea.io

Database

PostgreSQL

@lunny
Copy link
Member

lunny commented Aug 2, 2022

.PackageDescriptor maybe nil

@lunny
Copy link
Member

lunny commented Aug 7, 2022

How did you upload npm package and which url you are viewing the package

@init-rz
Copy link
Author

init-rz commented Aug 8, 2022

npm package was uploaded as described in the gitea docs:

npm config set @initka.bogis1:registry http://server:3003/api/packages/ui_frameworks_js/npm/
npm config set -- '//server:3003/api/packages/ui_frameworks_js/npm/:_authToken' "xxx"

npm publish

URL we are viewing is:

http://server:3003/ui_frameworks_js/-/packages/npm/@initka.bogis1%2Fvue-init-jsuggest/1.1.2

here package.json:

{
"name": "@initka.bogis1/vue-init-jsuggest",
"version": "1.1.2",
"files": [
"dist"
],
"module": "./dist/vue-init-jsuggest.es.js",
"types": "./dist/index.d.ts",
"scripts": {
"build": "vue-tsc && vite build",
"watch": "vue-tsc && vite build --watch --mode development"
}
xxx
}

@Topograph
Copy link

I'm having the same error. Uploaded the package like @init-rz did and visiting the packages page shows error 500 with the same message.

Message: template: package/metadata/npm:5:27: executing "package/metadata/npm" at <.PackageDescriptor.Properties>: can't evaluate field Properties in type interface {}

Installation: Running gitea 1.17.0 via docker on a ubuntu server

@RoystonS
Copy link

I was having the same trouble; the revised npm template file in PR #20675 fixes this.

@lunny lunny closed this as completed Aug 14, 2022
@go-gitea go-gitea locked and limited conversation to collaborators May 3, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants