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

"Error: Cannot find module '../utils'" when using Paragon CLI on latest alpha versions #3022

Closed
adamstankiewicz opened this issue Mar 27, 2024 · 1 comment · Fixed by #3028
Labels
bug Report of or fix for something that isn't working as intended design tokens

Comments

@adamstankiewicz
Copy link
Member

Bugs

When trying to use latest version of @openedx/paragon@alpha, the Paragon CLI throws a JS error:

❯ npm run build

> @edx/[email protected] build
> make build

rm -rf dist && mkdir dist
npm run build-tokens

> @edx/[email protected] build-tokens
> paragon build-tokens --source ./tokens/src --build-dir ./paragon/css --source-tokens-only

node:internal/modules/cjs/loader:1137
  throw err;
  ^

Error: Cannot find module '../utils'
Require stack:
- /Users/astankiewicz/Desktop/edx/brand-edx.org/node_modules/@edx/paragon/bin/paragon-scripts.js
    at Module._resolveFilename (node:internal/modules/cjs/loader:1134:15)
    at Module._load (node:internal/modules/cjs/loader:975:27)
    at Module.require (node:internal/modules/cjs/loader:1225:19)
    at require (node:internal/modules/helpers:177:18)
    at Object.<anonymous> (/Users/astankiewicz/Desktop/edx/brand-edx.org/node_modules/@edx/paragon/bin/paragon-scripts.js:8:27)
    at Module._compile (node:internal/modules/cjs/loader:1356:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1414:10)
    at Module.load (node:internal/modules/cjs/loader:1197:32)
    at Module._load (node:internal/modules/cjs/loader:1013:12)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:128:12) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [
    '/Users/astankiewicz/Desktop/edx/brand-edx.org/node_modules/@edx/paragon/bin/paragon-scripts.js'
  ]
}

Node.js v18.19.0
make: *** [build] Error 1

The error starts occurring on @edx/[email protected]; the previous .13 version works as expected.

@adamstankiewicz adamstankiewicz added bug Report of or fix for something that isn't working as intended design tokens labels Mar 27, 2024
@adamstankiewicz adamstankiewicz linked a pull request Jul 23, 2024 that will close this issue
10 tasks
@adamstankiewicz
Copy link
Member Author

Resolved via #3028

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Report of or fix for something that isn't working as intended design tokens
Projects
None yet
1 participant