sdk-node
sdk-node copied to clipboard
Critical dependency: the request of a dependency is an expression
I'm using this library in a React project, and I'm receiving the following warning on compile:
./node_modules/authorizenet/node_modules/colors/lib/colors.js
Critical dependency: the request of a dependency is an expression
I've tracked the problem down to the use of winston "^2.2.0" in package.json. That version of winston is using an old version of colors.js which is where the problem exists.
It's been fixed in winston 3 (currently 3.3.3). Please could this library be updated to use winston 3 and avoid the rather distracting compile warning? Many thanks, in advance.
We experience the same issue on the project
- warn Compiled with warnings
./node_modules/colors/lib/colors.js
Critical dependency: the request of a dependency is an expression
Import trace for requested module:
./node_modules/colors/lib/colors.js
./node_modules/colors/safe.js
./node_modules/winston/lib/winston/config.js
./node_modules/winston/lib/winston.js
./node_modules/authorizenet/lib/logger.js
./node_modules/authorizenet/lib/apicontracts.js
./node_modules/authorizenet/lib/authorizenet.js
./backend/services/authorizenet/authorizenet.service.ts
./backend/services/authorizenet/index.ts
./app/api/v2/subscriptions/route.ts
This is our dependencies list
{
"dependencies": {
"next": "13.4.7", // Nextjs,
"authorizenet": "^1.0.8"
},
"resolutions": {
"webpack": "^5"
}
}
Winston has been updated to "^3.11.0"
.
Closing this issue.