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

Critical dependency: the request of a dependency is an expression #1344

Closed
1 task done
s-iliyas opened this issue Jul 20, 2023 · 2 comments
Closed
1 task done

Critical dependency: the request of a dependency is an expression #1344

s-iliyas opened this issue Jul 20, 2023 · 2 comments

Comments

@s-iliyas
Copy link

Verify canary release

  • I verified that the issue exists in the latest Next.js canary release

Provide environment information

Operating System:
      Platform: linux
      Arch: x64
      Version: #47~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Wed Jun 21 15:35:31 UTC 2
    Binaries:
      Node: 19.9.0
      npm: 9.6.0
      Yarn: N/A
      pnpm: N/A
    Relevant Packages:
      next: 13.4.10
      eslint-config-next: 13.4.10
      react: 18.2.0
      react-dom: 18.2.0
      typescript: 5.1.6
    Next.js Config:
      output: N/A


warn  - Latest canary version not detected, detected: "13.4.10", newest: "13.4.11-canary.0".
        Please try the latest canary version (`npm install next@canary`) to confirm the issue still exists before creating a new issue.
        Read more - https://nextjs.org/docs/messages/opening-an-issue

Which area(s) of Next.js are affected? (leave empty if unsure)

App Router

Link to the code that reproduces this issue or a replay of the bug

https://github.com/s-iliyas/portfolio

To Reproduce

Install dependencies

yarn

Run server

yarn dev

To see warnings

Click on logout button present in navbar and check server logs

Describe the Bug

I don't know why I'm getting this warnings, which are annoying.

Import trace for requested module:
./node_modules/@nlpjs/core-loader/src/container-bootstrap.js
./node_modules/@nlpjs/core-loader/src/index.js
./node_modules/node-nlp/src/nlp/nlp-util.js
./node_modules/node-nlp/src/nlp/index.js
./node_modules/node-nlp/src/index.js
./app/api/bot/route.js

./node_modules/@nlpjs/core-loader/src/container-bootstrap.js
Critical dependency: the request of a dependency is an expression

Expected Behavior

Maybe just compiling server logs should be present.

Which browser are you using? (if relevant)

Google Chrome

How are you deploying your application? (if relevant)

Only in local, yarn dev.

@jesus-seijas-sp
Copy link
Contributor

You are trying to load a backend only library (@nlpjs/core-loader) into the frontend.
Please read the docs about building for frontend: https://github.com/axa-group/nlp.js/blob/master/docs/v4/webandreact.md

@s-iliyas
Copy link
Author

vercel/next.js#52876 (comment)
Duplicate issue that I created and solved.

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