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

SyntaxError: The requested module '@gitbeaker/requester-utils' does not provide an export named 'GitbeakerRequestError' #176

Open
kriakiku opened this issue Apr 9, 2024 · 2 comments

Comments

@kriakiku
Copy link

kriakiku commented Apr 9, 2024

Hi! When trying to migrate from "changesets-gitlab": "^0.10.3" to latest version, I get an error:

$ ./builds/node_modules/.bin/changesets-gitlab
file:///builds/node_modules/@gitbeaker/rest/dist/index.mjs:2
import { createRequesterFn, presetResourceArguments, getMatchingRateLimiter, GitbeakerTimeoutError, GitbeakerRetryError, GitbeakerRequestError } from '@gitbeaker/requester-utils';
                                                                                                                         ^^^^^^^^^^^^^^^^^^^^^
SyntaxError: The requested module '@gitbeaker/requester-utils' does not provide an export named 'GitbeakerRequestError'
    at ModuleJob._instantiate (node:internal/modules/esm/module_job:122:21)
    at async ModuleJob.run (node:internal/modules/esm/module_job:188:5)
    at async DefaultModuleLoader.import (node:internal/modules/esm/loader:228:24)
    at async loadESM (node:internal/process/esm_loader:[40](https://gitlab.com/noname/repo/frontend-libs/-/jobs/6580017729#L40):7)
    at async handleMainPromise (node:internal/modules/run_main:66:12)
Node.js v20.5.1
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
yarn run v1.22.19

Is there a problem with dependencies?

@JounQin
Copy link
Member

JounQin commented Apr 9, 2024

Can you run npm why @gitbeaker/requester-utils to check what versions are installed?

@kriakiku
Copy link
Author

kriakiku commented Apr 9, 2024

npm

✗ npm why @gitbeaker/requester-utils
@gitbeaker/requester-utils@39.34.3 dev
node_modules/@gitbeaker/requester-utils
  @gitbeaker/requester-utils@"^39.34.3" from @gitbeaker/core@39.34.3
  node_modules/@gitbeaker/core
    @gitbeaker/core@"^39.34.3" from @gitbeaker/rest@39.34.3
    node_modules/@gitbeaker/rest
      @gitbeaker/rest@"^39.23.0" from changesets-gitlab@0.11.5
      node_modules/changesets-gitlab
        dev changesets-gitlab@"^0.11.5" from the root project
  @gitbeaker/requester-utils@"^39.34.3" from @gitbeaker/rest@39.34.3
  node_modules/@gitbeaker/rest
    @gitbeaker/rest@"^39.23.0" from changesets-gitlab@0.11.5
    node_modules/changesets-gitlab
      dev changesets-gitlab@"^0.11.5" from the root project

Yarn (i'm using it.)

✗ yarn why @gitbeaker/requester-utils
yarn why v1.22.19
[1/4] 🤔  Why do we have the module "@gitbeaker/requester-utils"...?
[2/4] 🚚  Initialising dependency graph...
[3/4] 🔍  Finding dependency...
[4/4] 🚡  Calculating file sizes...
=> Found "@gitbeaker/requester-utils@39.34.3"
info Reasons this module exists
   - "_project_#changesets-gitlab#@gitbeaker#rest" depends on it
   - Hoisted from "_project_#changesets-gitlab#@gitbeaker#rest#@gitbeaker#requester-utils"
   - Hoisted from "_project_#changesets-gitlab#@gitbeaker#rest#@gitbeaker#core#@gitbeaker#requester-utils"
info Disk size without dependencies: "76KB"
info Disk size with unique dependencies: "808KB"
info Disk size with transitive dependencies: "1.59MB"
info Number of shared dependencies: 15

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