eslint-module-utils from npm is to new #8010

Closed
opened 2025-11-02 07:49:00 -06:00 by GiteaMirror · 7 comments
Owner

Originally created by @ecsgh on GitHub (Oct 22, 2021).

Gitea Version

1.15.5 (also 1.15.4 ...)

Git Version

No response

Operating System

linux

How are you running Gitea?

not relevant for this bug.

Database

No response

Can you reproduce the bug on the Gitea demo site?

No

Log Gist

No response

Description

No build with current nodejs packages.

Since about 1 week version 2.7.x of eslint-module-utils is available.
If you install the nodejs packages with npm install you can't build gitea afterwards.

It comes the error message:
error exported declaration 'default' not used within other modules import/no-unused-modules

With the last version 2.6.2 of eslint-module-utils this error does not occur.

Screenshots

No response

Originally created by @ecsgh on GitHub (Oct 22, 2021). ### Gitea Version 1.15.5 (also 1.15.4 ...) ### Git Version _No response_ ### Operating System linux ### How are you running Gitea? not relevant for this bug. ### Database _No response_ ### Can you reproduce the bug on the Gitea demo site? No ### Log Gist _No response_ ### Description No build with current nodejs packages. Since about 1 week version 2.7.x of eslint-module-utils is available. If you install the nodejs packages with npm install you can't build gitea afterwards. It comes the error message: error exported declaration 'default' not used within other modules import/no-unused-modules With the last version 2.6.2 of eslint-module-utils this error does not occur. ### Screenshots _No response_
Author
Owner

@silverwind commented on GitHub (Oct 22, 2021):

Eslint is not being ran as part of the make build step, what exactly are you doing to trigger the error?

Regarding the error, I suspect it may be related to untracked files in the checkout maybe. On what file is it triggering on?

@silverwind commented on GitHub (Oct 22, 2021): Eslint is not being ran as part of the `make build` step, what exactly are you doing to trigger the error? Regarding the error, I suspect it may be related to untracked files in the checkout maybe. On what file is it triggering on?
Author
Owner

@ecsgh commented on GitHub (Oct 22, 2021):

First i download the source.
Extract it.
Change to source-dir.
Then i run "npm install" to download nodejs packages.

@ecsgh commented on GitHub (Oct 22, 2021): First i download the source. Extract it. Change to source-dir. Then i run "npm install" to download nodejs packages.
Author
Owner

@silverwind commented on GitHub (Oct 22, 2021):

npm install should not run eslint at all, please show exactly how you are getting that error.

@silverwind commented on GitHub (Oct 22, 2021): `npm install` should not run eslint at all, please show exactly how you are getting that error.
Author
Owner

@ecsgh commented on GitHub (Oct 22, 2021):

The same thing over and over again.
I am building a distribution package within a build system.
This has no access to "external". I had already mentioned the problem here several times. Nobody seems to understand it.
So I have to download all relevant things before. So also the missing node packages.
Therefore a npm install is necessary before.
After that a vendor tar is built to include it in the actual source.
Finally a go build -mod=vendor is done.

If you want to display it yourself, download the current sources from github.
Perform an npm install.
Then look in the directory of downloaded node_modules/eslint-module-utils and you will see that it is version 2.7.x.
Then do an "npx eslint web_src/js webpack.config.js".
This will also show up in the Makefile.
After that the error disappears.

@ecsgh commented on GitHub (Oct 22, 2021): The same thing over and over again. I am building a distribution package within a build system. This has no access to "external". I had already mentioned the problem here several times. Nobody seems to understand it. So I have to download all relevant things before. So also the missing node packages. Therefore a npm install is necessary before. After that a vendor tar is built to include it in the actual source. Finally a go build -mod=vendor is done. If you want to display it yourself, download the current sources from github. Perform an npm install. Then look in the directory of downloaded node_modules/eslint-module-utils and you will see that it is version 2.7.x. Then do an "npx eslint web_src/js webpack.config.js". This will also show up in the Makefile. After that the error disappears.
Author
Owner

@silverwind commented on GitHub (Oct 22, 2021):

Hmm I still can not reproduce with a fresh git checkout and npx eslint web_src/js webpack.config.js. There is a specific override for this file that actually disables the rule:

406bd3780e/.eslintrc (L56-L58)

@silverwind commented on GitHub (Oct 22, 2021): Hmm I still can not reproduce with a fresh git checkout and `npx eslint web_src/js webpack.config.js`. There is a specific override for this file that actually disables the rule: https://github.com/go-gitea/gitea/blob/406bd3780e4dedf3efd8f56f6787d350f5aa3524/.eslintrc#L56-L58
Author
Owner

@ecsgh commented on GitHub (Oct 22, 2021):

Is this in the assets file https://github.com/go-gitea/gitea/archive/refs/tags/v1.15.5.tar.gz also?
And can you test it with above assets file?
And one more question.
Which version should go, nodejs and npx have?

@ecsgh commented on GitHub (Oct 22, 2021): Is this in the assets file https://github.com/go-gitea/gitea/archive/refs/tags/v1.15.5.tar.gz also? And can you test it with above assets file? And one more question. Which version should go, nodejs and npx have?
Author
Owner

@wxiaoguang commented on GitHub (Apr 16, 2022):

Oudated

@wxiaoguang commented on GitHub (Apr 16, 2022): Oudated
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#8010