Skip to content

build error:Error: Cannot find module '../lightningcss.freebsd-x64.node' #26439

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

Closed
lhmwzy opened this issue Aug 10, 2023 · 2 comments · Fixed by #26445
Closed

build error:Error: Cannot find module '../lightningcss.freebsd-x64.node' #26439

lhmwzy opened this issue Aug 10, 2023 · 2 comments · Fixed by #26445
Labels
type/bug type/upstream This is an issue in one of Gitea's dependencies and should be reported there

Comments

@lhmwzy
Copy link

lhmwzy commented Aug 10, 2023

Description

#TAGS="bindata" gmake build

up to date in 859ms
rm -rf public/assets/js public/assets/css public/assets/fonts public/assets/img/webpack
npx webpack
[webpack-cli] Failed to load '/data/giteagit/webpack.config.js' config
[webpack-cli] Error: Cannot find module '../lightningcss.freebsd-x64.node'
Require stack:

  • /data/giteagit/node_modules/lightningcss/node/index.js
  • /data/giteagit/node_modules/lightningcss-loader/dist/loader.js
  • /data/giteagit/node_modules/lightningcss-loader/dist/index.js
    at Function.Module._resolveFilename (node:internal/modules/cjs/loader:933:15)
    at Function.Module._load (node:internal/modules/cjs/loader:778:27)
    at Module.require (node:internal/modules/cjs/loader:1005:19)
    at require (node:internal/modules/cjs/helpers:102:18)
    at Object. (/data/giteagit/node_modules/lightningcss/node/index.js:21:22)
    at Module._compile (node:internal/modules/cjs/loader:1105:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1159:10)
    at Module.load (node:internal/modules/cjs/loader:981:32)
    at Function.Module._load (node:internal/modules/cjs/loader:822:12)
    at Module.require (node:internal/modules/cjs/loader:1005:19) {
    code: 'MODULE_NOT_FOUND',
    requireStack: [
    '/data/giteagit/node_modules/lightningcss/node/index.js',
    '/data/giteagit/node_modules/lightningcss-loader/dist/loader.js',
    '/data/giteagit/node_modules/lightningcss-loader/dist/index.js'
    ]
    }
    gmake: *** [Makefile:954: public/assets/js/index.js] Error 2

Gitea Version

commit: a370efc

Can you reproduce the bug on the Gitea demo site?

No

Log Gist

No response

Screenshots

No response

Git Version

git version 2.34.1

Operating System

FreeBSD 13.2-RELEASE FreeBSD 13.2-RELEASE releng/13.2-n254617-525ecfdad597 GENERIC amd64

How are you running Gitea?

#git clone https://github.com/go-gitea/gitea.git giteagit
#cd giteagit
#TAGS="bindata" gmake build

Database

None

@silverwind
Copy link
Member

silverwind commented Aug 10, 2023

Upstream issue: parcel-bundler/lightningcss#559

We could potentially try to fallback to esbuild minify if lightningcss fails to load.

Should still work on the 1.20 branch because we don't have lightningcss there.

@silverwind silverwind added the type/upstream This is an issue in one of Gitea's dependencies and should be reported there label Aug 10, 2023
silverwind added a commit that referenced this issue Aug 11, 2023
Fixes #26439.

The minification result is not ideal with esbuild, but it's better than
failing competely.

Co-authored-by: Giteabot <[email protected]>
@silverwind
Copy link
Member

Try again on latest main.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 26, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
type/bug type/upstream This is an issue in one of Gitea's dependencies and should be reported there
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants