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 the warnings that occur when importing Request Network SDK in a project #1153

Open
MantisClone opened this issue Sep 14, 2023 · 1 comment

Comments

@MantisClone
Copy link
Member

MantisClone commented Sep 14, 2023

Problem

Warnings occur when importing and compiling Request Network SDK

- wait compiling /page (client and server)...
- warn ./node_modules/keyv/src/index.js
Critical dependency: the request of a dependency is an expression

Import trace for requested module:
./node_modules/keyv/src/index.js
./node_modules/@requestnetwork/data-access/dist/ignored-location.js
./node_modules/@requestnetwork/data-access/dist/data-access.js
./node_modules/@requestnetwork/data-access/dist/index.js
./node_modules/@requestnetwork/request-client.js/dist/http-metamask-data-access.js
./node_modules/@requestnetwork/request-client.js/dist/index.js
./app/page.tsx

./node_modules/eccrypto/index.js
Module not found: Can't resolve './build/Release/ecdh' in '/workspace/node_modules/eccrypto'

Import trace for requested module:
./node_modules/eccrypto/index.js
./node_modules/@requestnetwork/utils/dist/crypto/ec-utils.js
./node_modules/@requestnetwork/utils/dist/crypto.js
./node_modules/@requestnetwork/utils/dist/index.js
./node_modules/@requestnetwork/payment-detection/dist/index.js
./app/page.tsx

./node_modules/keyv/src/index.js
Critical dependency: the request of a dependency is an expression

Import trace for requested module:
./node_modules/keyv/src/index.js
./node_modules/@requestnetwork/data-access/dist/ignored-location.js
./node_modules/@requestnetwork/data-access/dist/data-access.js
./node_modules/@requestnetwork/data-access/dist/index.js
./node_modules/@requestnetwork/request-client.js/dist/http-metamask-data-access.js
./node_modules/@requestnetwork/request-client.js/dist/index.js
./app/page.tsx

./node_modules/node-fetch/lib/index.js
Module not found: Can't resolve 'encoding' in '/workspace/node_modules/node-fetch/lib'

Import trace for requested module:
./node_modules/node-fetch/lib/index.js
./node_modules/near-api-js/lib/utils/setup-node-fetch.js
./node_modules/near-api-js/lib/connect.js
./node_modules/near-api-js/lib/index.js
./node_modules/@requestnetwork/payment-processor/dist/payment/utils-near.js
./node_modules/@requestnetwork/payment-processor/dist/payment/index.js
./node_modules/@requestnetwork/payment-processor/dist/index.js
./app/page.tsx
- error SyntaxError: Illegal return statement
    at __webpack_require__ (/workspace/.next/server/webpack-runtime.js:33:43)
    at __webpack_require__ (/workspace/.next/server/webpack-runtime.js:33:43)
    at __webpack_require__ (/workspace/.next/server/webpack-runtime.js:33:43)
    at __webpack_require__ (/workspace/.next/server/webpack-runtime.js:33:43)
    at __webpack_require__ (/workspace/.next/server/webpack-runtime.js:33:43)
    at __webpack_require__ (/workspace/.next/server/webpack-runtime.js:33:43)
    at __webpack_require__ (/workspace/.next/server/webpack-runtime.js:33:43)
    at __webpack_require__ (/workspace/.next/server/webpack-runtime.js:33:43)
    at eval (./config/currency.ts:5:91)
    at (sc_client)/./config/currency.ts (/workspace/.next/server/app/page.js:19112:1)
    at __webpack_require__ (/workspace/.next/server/webpack-runtime.js:33:43)
    at eval (./app/page.tsx:17:74)
    at (sc_client)/./app/page.tsx (/workspace/.next/server/app/page.js:19090:1)
    at __webpack_require__ (/workspace/.next/server/webpack-runtime.js:33:43)
- error SyntaxError: Illegal return statement
    at __webpack_require__ (/workspace/.next/server/webpack-runtime.js:33:43)
    at __webpack_require__ (/workspace/.next/server/webpack-runtime.js:33:43)
    at __webpack_require__ (/workspace/.next/server/webpack-runtime.js:33:43)
    at __webpack_require__ (/workspace/.next/server/webpack-runtime.js:33:43)
    at __webpack_require__ (/workspace/.next/server/webpack-runtime.js:33:43)
    at __webpack_require__ (/workspace/.next/server/webpack-runtime.js:33:43)
    at __webpack_require__ (/workspace/.next/server/webpack-runtime.js:33:43)
    at __webpack_require__ (/workspace/.next/server/webpack-runtime.js:33:43)
    at eval (./config/currency.ts:5:91)
    at (sc_client)/./config/currency.ts (/workspace/.next/server/app/page.js:19112:1)
    at __webpack_require__ (/workspace/.next/server/webpack-runtime.js:33:43)
    at eval (./app/page.tsx:17:74)
    at (sc_client)/./app/page.tsx (/workspace/.next/server/app/page.js:19090:1)
    at __webpack_require__ (/workspace/.next/server/webpack-runtime.js:33:43)
- error SyntaxError: Illegal return statement
    at __webpack_require__ (/workspace/.next/server/webpack-runtime.js:33:43)
    at __webpack_require__ (/workspace/.next/server/webpack-runtime.js:33:43)
    at __webpack_require__ (/workspace/.next/server/webpack-runtime.js:33:43)
    at __webpack_require__ (/workspace/.next/server/webpack-runtime.js:33:43)
    at __webpack_require__ (/workspace/.next/server/webpack-runtime.js:33:43)
    at __webpack_require__ (/workspace/.next/server/webpack-runtime.js:33:43)
    at __webpack_require__ (/workspace/.next/server/webpack-runtime.js:33:43)
    at __webpack_require__ (/workspace/.next/server/webpack-runtime.js:33:43)
    at eval (./config/currency.ts:5:91)
    at (sc_client)/./config/currency.ts (/workspace/.next/server/app/page.js:19112:1)
    at __webpack_require__ (/workspace/.next/server/webpack-runtime.js:33:43)
    at eval (./app/page.tsx:17:74)
    at (sc_client)/./app/page.tsx (/workspace/.next/server/app/page.js:19090:1)
    at __webpack_require__ (/workspace/.next/server/webpack-runtime.js:33:43)
- error SyntaxError: Illegal return statement
    at __webpack_require__ (/workspace/.next/server/webpack-runtime.js:33:43)
    at __webpack_require__ (/workspace/.next/server/webpack-runtime.js:33:43)
    at __webpack_require__ (/workspace/.next/server/webpack-runtime.js:33:43)
    at __webpack_require__ (/workspace/.next/server/webpack-runtime.js:33:43)
    at __webpack_require__ (/workspace/.next/server/webpack-runtime.js:33:43)
    at __webpack_require__ (/workspace/.next/server/webpack-runtime.js:33:43)
    at __webpack_require__ (/workspace/.next/server/webpack-runtime.js:33:43)
    at __webpack_require__ (/workspace/.next/server/webpack-runtime.js:33:43)
    at eval (./config/currency.ts:5:91)
    at (sc_client)/./config/currency.ts (/workspace/.next/server/app/page.js:19112:1)
    at __webpack_require__ (/workspace/.next/server/webpack-runtime.js:33:43)
    at eval (./app/page.tsx:17:74)
    at (sc_client)/./app/page.tsx (/workspace/.next/server/app/page.js:19090:1)
    at __webpack_require__ (/workspace/.next/server/webpack-runtime.js:33:43)

Solution


Migrated from Asana: https://app.asana.com/0/1203912381456855/1205450558525711/f

@MantisClone
Copy link
Member Author

MantisClone commented Oct 26, 2023

@MantisClone MantisClone linked a pull request Nov 7, 2023 that will close this issue
@MantisClone MantisClone removed a link to a pull request Nov 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: 🎫 Backlog
Development

No branches or pull requests

1 participant