Skip to content
This repository has been archived by the owner on Jan 16, 2023. It is now read-only.

[Bug] ModuleNotFoundError when running deploy in CI using pnpm #129

Open
IPWright83 opened this issue Oct 12, 2022 · 0 comments
Open

[Bug] ModuleNotFoundError when running deploy in CI using pnpm #129

IPWright83 opened this issue Oct 12, 2022 · 0 comments
Labels

Comments

@IPWright83
Copy link

Describe the bug

When running the storybook-to-ghpage step in GitHub Actions the job fails with the following error, however the same script runs fine on a local machine:

packages/react deploy-storybook: <s> [webpack.Progress] 60% building 12/13 entries 6395/6474 dependencies 1741/1862 modules
packages/react deploy-storybook: <s> [webpack.Progress] 64% building 13/13 entries 6395/6474 dependencies 1742/1862 modules
packages/react deploy-storybook: info => Manager built (41 s)
packages/react deploy-storybook: ERR! ModuleNotFoundError: Module not found: Error: Can't resolve '@chart-it/detection' in '/home/runner/work/chart-it/chart-it/packages/react/src/components/Scale'
packages/react deploy-storybook: ERR!     at /home/runner/work/chart-it/chart-it/node_modules/.pnpm/[email protected]/node_modules/webpack/lib/Compilation.js:2016:28
packages/react deploy-storybook: ERR!     at /home/runner/work/chart-it/chart-it/node_modules/.pnpm/[email protected]/node_modules/webpack/lib/NormalModuleFactory.js:798:13
packages/react deploy-storybook: ERR!     at eval (eval at create (/home/runner/work/chart-it/chart-it/node_modules/.pnpm/[email protected]/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:10:1)
packages/react deploy-storybook: ERR!     at /home/runner/work/chart-it/chart-it/node_modules/.pnpm/[email protected]/node_modules/webpack/lib/NormalModuleFactory.js:270:22
packages/react deploy-storybook: ERR!     at eval (eval at create (/home/runner/work/chart-it/chart-it/node_modules/.pnpm/[email protected]/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:9:1)
packages/react deploy-storybook: ERR!     at /home/runner/work/chart-it/chart-it/node_modules/.pnpm/[email protected]/node_modules/webpack/lib/NormalModuleFactory.js:434:22
packages/react deploy-storybook: ERR!     at /home/runner/work/chart-it/chart-it/node_modules/.pnpm/[email protected]/node_modules/webpack/lib/NormalModuleFactory.js:116:11
packages/react deploy-storybook: ERR!     at /home/runner/work/chart-it/chart-it/node_modules/.pnpm/[email protected]/node_modules/webpack/lib/NormalModuleFactory.js:670:25
packages/react deploy-storybook: ERR!     at /home/runner/work/chart-it/chart-it/node_modules/.pnpm/[email protected]/node_modules/webpack/lib/NormalModuleFactory.js:855:8
packages/react deploy-storybook: ERR!     at /home/runner/work/chart-it/chart-it/node_modules/.pnpm/[email protected]/node_modules/webpack/lib/NormalModuleFactory.js:975:5
packages/react deploy-storybook: ERR!  ModuleNotFoundError: Module not found: Error: Can't resolve '@chart-it/detection' in '/home/runner/work/chart-it/chart-it/packages/react/src/components/Scale'
packages/react deploy-storybook: ERR!     at /home/runner/work/chart-it/chart-it/node_modules/.pnpm/[email protected]/node_modules/webpack/lib/Compilation.js:2016:28
packages/react deploy-storybook: ERR!     at /home/runner/work/chart-it/chart-it/node_modules/.pnpm/[email protected]/node_modules/webpack/lib/NormalModuleFactory.js:798:13
packages/react deploy-storybook: ERR!     at eval (eval at create (/home/runner/work/chart-it/chart-it/node_modules/.pnpm/[email protected]/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:10:1)
packages/react deploy-storybook: ERR!     at /home/runner/work/chart-it/chart-it/node_modules/.pnpm/[email protected]/node_modules/webpack/lib/NormalModuleFactory.js:270:22
packages/react deploy-storybook: ERR!     at eval (eval at create (/home/runner/work/chart-it/chart-it/node_modules/.pnpm/[email protected]/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:9:1)
packages/react deploy-storybook: ERR!     at /home/runner/work/chart-it/chart-it/node_modules/.pnpm/[email protected]/node_modules/webpack/lib/NormalModuleFactory.js:434:22
packages/react deploy-storybook: ERR!     at /home/runner/work/chart-it/chart-it/node_modules/.pnpm/[email protected]/node_modules/webpack/lib/NormalModuleFactory.js:116:11
packages/react deploy-storybook: ERR!     at /home/runner/work/chart-it/chart-it/node_modules/.pnpm/[email protected]/node_modules/webpack/lib/NormalModuleFactory.js:670:25
packages/react deploy-storybook: ERR!     at /home/runner/work/chart-it/chart-it/node_modules/.pnpm/[email protected]/node_modules/webpack/lib/NormalModuleFactory.js:855:8
packages/react deploy-storybook: ERR!     at /home/runner/work/chart-it/chart-it/node_modules/.pnpm/[email protected]/node_modules/webpack/lib/NormalModuleFactory.js:975:5
packages/react deploy-storybook: ERR! resolve '@chart-it/detection' in '/home/runner/work/chart-it/chart-it/packages/react/src/components/Scale'

Steps to reproduce the behavior

  1. Setup a repository that has a pnpm workspace and related packages
  2. Try and run the deploy action

Here is an example fail See https://github.com/IPWright83/chart-it/actions/runs/3232934306/jobs/5294141324 using this action https://github.com/IPWright83/chart-it/blob/34a720bdc298cc77bab1fcb64f65c0540c52c790/.github/workflows/push-to-master.yml

Expected behavior

The deploy work succesfully - note that it does running locally

Screenshots and/or logs

If applicable, add screenshots and/or logs to help explain your problem.

Environment

  • OS: Ubuntu
  • Node.js version: v16.?
  • PNPM version: 7.12.1

Additional context

Add any other context about the problem here.

@IPWright83 IPWright83 added the bug label Oct 12, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Development

No branches or pull requests

1 participant