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

[Bug Report]: TypeError: alias.reduce is not a function #2124

Open
akku1139 opened this issue Mar 19, 2025 · 1 comment
Open

[Bug Report]: TypeError: alias.reduce is not a function #2124

akku1139 opened this issue Mar 19, 2025 · 1 comment

Comments

@akku1139
Copy link

Steps to reproduce

  1. Setup Farm with @farmfe/js-plugin-solid and @mdx-js/rollup
  2. Run build
file:///home/runner/work/syo/syo/node_modules/.pnpm/@farmfe+core@1.7.1/node_modules/@farmfe/core/dist/utils/plugin-utils.js:57
    return alias.reduce((acc, item) => {
                 ^

TypeError: alias.reduce is not a function
    at transformAliasWithVite (file:///home/runner/work/syo/syo/node_modules/.pnpm/@farmfe+core@1.7.1/node_modules/@farmfe/core/dist/utils/plugin-utils.js:57:18)
    at resolveConfig (file:///home/runner/work/syo/syo/node_modules/.pnpm/@farmfe+core@1.7.1/node_modules/@farmfe/core/dist/config/index.js:106:56)
    at async build (file:///home/runner/work/syo/syo/node_modules/.pnpm/@farmfe+core@1.7.1/node_modules/@farmfe/core/dist/index.js:45:32)
    at async build (file:///home/runner/work/syo/syo/dist/node/build.js:19:5)
    at async file:///home/runner/work/syo/syo/dist/node/cli.js:16:1

Reproduce link

https://github.com/akku1139/syo/actions/runs/13942418696/job/39021910082#step:7:21

What is actually happening?

#1141 seems to be the cause.
Try applying the following patche to work fine:
https://github.com/akku1139/syo/blob/main/patches/%40farmfe__core.patch
I don't know why such code was added, but it's clearly causing the bug.

System Info

GitHub Codespaces

  System:
    OS: Linux 6.8 Ubuntu 20.04.6 LTS (Focal Fossa)
    CPU: (2) x64 AMD EPYC 7763 64-Core Processor
    Memory: 5.98 GB / 7.75 GB
    Container: Yes
    Shell: 5.0.17 - /bin/bash
  Binaries:
    Node: 23.10.0 - ~/nvm/current/bin/node
    npm: 10.9.2 - ~/nvm/current/bin/npm
    pnpm: 10.6.4 - ~/nvm/current/bin/pnpm
  npmPackages:
    @farmfe/core: ^1.7.1 => 1.7.1
@wre232114
Copy link
Member

use vite plugin solid instead. farm solid plugin is deprecated

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants