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

fix(cli): Add missing toml dependency #8196

Merged
merged 1 commit into from
May 2, 2023
Merged

Conversation

Josh-Walker-GM
Copy link
Collaborator

Problem

@chenkie reports the following failure:

May 2 10:39:35 AM  Error: Cannot find module '@iarna/toml'
May 2 10:39:35 AM  Require stack:
May 2 10:39:35 AM  - /opt/render/project/src/node_modules/@redwoodjs/cli/dist/commands/deploy/baremetal.js
May 2 10:39:35 AM  - /opt/render/project/src/node_modules/yargs/index.cjs
May 2 10:39:35 AM  - /opt/render/project/src/node_modules/@redwoodjs/cli/dist/index.js
May 2 10:39:35 AM  - /opt/render/project/src/node_modules/@redwoodjs/cli/package.json
May 2 10:39:35 AM      at Function.Module._resolveFilename (node:internal/modules/cjs/loader:1026:15)
May 2 10:39:35 AM      at Function.Module._load (node:internal/modules/cjs/loader:871:27)
May 2 10:39:35 AM      at Module.require (node:internal/modules/cjs/loader:1098:19)
May 2 10:39:35 AM      at require (node:internal/modules/cjs/helpers:108:18)
May 2 10:39:35 AM      at Object.<anonymous> (/opt/render/project/src/node_modules/@redwoodjs/cli/dist/commands/deploy/baremetal.js:29:36)
May 2 10:39:35 AM      at Module._compile (node:internal/modules/cjs/loader:1196:14)
May 2 10:39:35 AM      at Object.Module._extensions..js (node:internal/modules/cjs/loader:1250:10)
May 2 10:39:35 AM      at Module.load (node:internal/modules/cjs/loader:1074:32)
May 2 10:39:35 AM      at Function.Module._load (node:internal/modules/cjs/loader:909:12)
May 2 10:39:35 AM      at Module.require (node:internal/modules/cjs/loader:1098:19) {
May 2 10:39:35 AM    code: 'MODULE_NOT_FOUND',
May 2 10:39:35 AM    requireStack: [
May 2 10:39:35 AM      '/opt/render/project/src/node_modules/@redwoodjs/cli/dist/commands/deploy/baremetal.js',
May 2 10:39:35 AM      '/opt/render/project/src/node_modules/yargs/index.cjs',
May 2 10:39:35 AM      '/opt/render/project/src/node_modules/@redwoodjs/cli/dist/index.js',
May 2 10:39:35 AM      '/opt/render/project/src/node_modules/@redwoodjs/cli/package.json'
May 2 10:39:35 AM    ]
May 2 10:39:35 AM  }
May 2 10:39:35 AM  error Command failed with exit code 1.
May 2 10:39:35 AM  info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

We require @iarna/toml within the CLI but we do not explicitly depend on it

import toml from '@iarna/toml'
. It is a dependency of other redwood packages such as structure and project-config.

Changes

  1. Add it as an explicit dependency.

Note
Package size is 97.5kb (https://packagephobia.com/result?p=@iarna/toml@2.2.5)

Ping
@jtoar - Am I right to add this as a dependency or is there more to consider that I have not?

@Josh-Walker-GM Josh-Walker-GM added the release:fix This PR is a fix label May 2, 2023
@Josh-Walker-GM Josh-Walker-GM requested a review from jtoar May 2, 2023 15:08
@jtoar
Copy link
Contributor

jtoar commented May 2, 2023

@Josh-Walker-GM no this is perfect, thanks!

@jtoar jtoar merged commit 0cde2bf into main May 2, 2023
@jtoar jtoar deleted the jgmw-cli/add-missing-iarna-toml branch May 2, 2023 15:31
@redwoodjs-bot redwoodjs-bot bot added this to the next-release milestone May 2, 2023
@jtoar jtoar modified the milestones: next-release, next-release-patch May 2, 2023
jtoar pushed a commit that referenced this pull request May 2, 2023
@jtoar jtoar modified the milestones: next-release-patch, v5.0.4 May 4, 2023
jtoar pushed a commit that referenced this pull request May 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release:fix This PR is a fix
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants