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] yarn rw build web --perf option seems to be broken #5425

Closed
MichaelrMentele opened this issue May 3, 2022 · 2 comments · Fixed by #5527
Closed

[Bug] yarn rw build web --perf option seems to be broken #5425

MichaelrMentele opened this issue May 3, 2022 · 2 comments · Fixed by #5527
Assignees
Labels
bug/confirmed We have confirmed this is a bug topic/config Babel, Webpack, ESLint, Prettier, etc.

Comments

@MichaelrMentele
Copy link
Contributor

Get following error when running yarn rw build web --perf -- seems to be a CLI bug.

➜  leftlane_app git:(9/n-close-modal) ✗ yarn rw build web --perf
Measuring Web Build Performance...
[webpack-cli] Failed to load '/Users/michaelmentele/Dev/leftlane/leftlane_app/node_modules/@redwoodjs/core/config/webpack.perf.js' config
[webpack-cli] TypeError: Cannot read properties of undefined (reading 'use')
    at Object.<anonymous> (/Users/michaelmentele/Dev/leftlane/leftlane_app/node_modules/@redwoodjs/core/config/webpack.perf.js:26:39)
    at Module._compile (node:internal/modules/cjs/loader:1103:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1155: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)
    at require (node:internal/modules/cjs/helpers:102:18)
    at WebpackCLI.tryRequireThenImport (/Users/michaelmentele/Dev/leftlane/leftlane_app/node_modules/webpack-cli/lib/webpack-cli.js:244:16)
    at loadConfigByPath (/Users/michaelmentele/Dev/leftlane/leftlane_app/node_modules/webpack-cli/lib/webpack-cli.js:1712:30)
    at /Users/michaelmentele/Dev/leftlane/leftlane_app/node_modules/webpack-cli/lib/webpack-cli.js:1767:11
rw build [side..]

Build for production

Positionals:
  side  Which side(s) to build
                        [array] [choices: "api", "web"] [default: ["api","web"]]

Options:
      --help                 Show help                                 [boolean]
      --version              Show version number                       [boolean]
      --cwd                  Working directory to use (where `redwood.toml` is
                             located.)
      --stats                Use Webpack Bundle Analyzer
                                                      [boolean] [default: false]
  -v, --verbose              Print more               [boolean] [default: false]
      --prerender            Prerender after building web
                                                       [boolean] [default: true]
      --prisma, --db         Generate the Prisma client[boolean] [default: true]
      --performance, --perf  Measure build performance[boolean] [default: false]

Also see the Redwood CLI Reference

Error: Command failed with exit code 1: yarn cross-env NODE_ENV=production webpack --config /Users/michaelmentele/Dev/leftlane/leftlane_app/node_modules/@redwoodjs/core/config/webpack.perf.js
    at makeError (/Users/michaelmentele/Dev/leftlane/leftlane_app/node_modules/execa/lib/error.js:60:11)
    at Function.module.exports.sync (/Users/michaelmentele/Dev/leftlane/leftlane_app/node_modules/execa/index.js:194:17)
    at Object.handler (/Users/michaelmentele/Dev/leftlane/leftlane_app/node_modules/@redwoodjs/cli/dist/commands/build.js:119:20)
    at /Users/michaelmentele/Dev/leftlane/leftlane_app/node_modules/yargs/build/index.cjs:443:71
    at processTicksAndRejections (node:internal/process/task_queues:96:5) {
  shortMessage: 'Command failed with exit code 1: yarn cross-env NODE_ENV=production webpack --config /Users/michaelmentele/Dev/leftlane/leftlane_app/node_modules/@redwoodjs/core/config/webpack.perf.js',
  command: 'yarn cross-env NODE_ENV=production webpack --config /Users/michaelmentele/Dev/leftlane/leftlane_app/node_modules/@redwoodjs/core/config/webpack.perf.js',
  escapedCommand: '"yarn cross-env NODE_ENV=production webpack --config /Users/michaelmentele/Dev/leftlane/leftlane_app/node_modules/@redwoodjs/core/config/webpack.perf.js"',
  exitCode: 1,
  signal: undefined,
  signalDescription: undefined,
  stdout: undefined,
  stderr: undefined,
  failed: true,
  timedOut: false,
  isCanceled: false,
  killed: false
}
@jtoar jtoar added this to Triage May 3, 2022
@jtoar jtoar moved this to Needs triage in Triage May 3, 2022
@MichaelrMentele
Copy link
Contributor Author

@simoncrypta
Copy link
Collaborator

Hi @MichaelrMentele ! Thank you for helping us with this issue, I confirmed that is still there on the last version 1.3.0.

@simoncrypta simoncrypta added bug/confirmed We have confirmed this is a bug topic/config Babel, Webpack, ESLint, Prettier, etc. labels May 4, 2022
@simoncrypta simoncrypta moved this from Needs triage to Todo in Triage May 4, 2022
@jtoar jtoar added this to Main May 5, 2022
@jtoar jtoar moved this to Backlog in Main May 5, 2022
@jtoar jtoar removed this from Triage May 8, 2022
@simoncrypta simoncrypta moved this from Backlog to Todo in Main May 9, 2022
@simoncrypta simoncrypta moved this from Todo to Backlog in Main May 9, 2022
@simoncrypta simoncrypta moved this from Backlog to Todo in Main May 13, 2022
@simoncrypta simoncrypta moved this from Todo to In Progress in Main May 13, 2022
@jtoar jtoar removed this from Main May 13, 2022
@jtoar jtoar added this to Main May 14, 2022
@jtoar jtoar moved this to Triage in Main May 14, 2022
@jtoar jtoar removed this from Main May 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug/confirmed We have confirmed this is a bug topic/config Babel, Webpack, ESLint, Prettier, etc.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants