googleapis / nodejs-logging-winston

Node.js client integration between Stackdriver Logging and Winston.
https://cloud.google.com/logging/
Apache License 2.0
106 stars 50 forks source link

Using this library with Webpack and yarn PnP results in build warnings #762

Closed dzbarsky closed 1 year ago

dzbarsky commented 1 year ago

Thanks for stopping by to let us know something could be better!

PLEASE READ: If you have a support contract with Google, please create an issue in the support console instead of filing on GitHub. This will ensure a timely response.

Environment details

Steps to reproduce

  1. Use project in webpack or next build with yarn pnp
  2. Note warning:
    
    ../../../.yarn/__virtual__/@google-cloud-logging-winston-virtual-bfe17c7235/0/cache/@google-cloud-logging-winston-npm-5.1.5-9bf0067665-24b9d19918.zip/node_modules/@google-cloud/logging-winston/build/src/common.js
    Critical dependency: the request of a dependency is an expression

Import trace for requested module: ../../../.yarn/virtual/@google-cloud-logging-winston-virtual-bfe17c7235/0/cache/@google-cloud-logging-winston-npm-5.1.5-9bf0067665-24b9d19918.zip/node_modules/@google-cloud/logging-winston/build/src/common.js ../../../.yarn/virtual/@google-cloud-logging-winston-virtual-bfe17c7235/0/cache/@google-cloud-logging-winston-npm-5.1.5-9bf0067665-24b9d19918.zip/node_modules/@google-cloud/logging-winston/build/src/index.js



https://github.com/googleapis/nodejs-logging-winston/pull/761 has a potential fix
daniel-sanche commented 1 year ago

According to losalex's comment here, this should be fixed by https://github.com/googleapis/nodejs-logging-winston/pull/763 and https://github.com/googleapis/nodejs-logging-winston/pull/760, which have both been merged.

Feel free to re-open if you're still seeing this issue though