panva / openid-client

OAuth 2 / OpenID Connect Client API for JavaScript Runtimes
MIT License
1.83k stars 392 forks source link

Critical dependency: require function is used in a way in which dependencies cannot be statically extracted #251

Closed SaadbinWaheed closed 4 years ago

SaadbinWaheed commented 4 years ago

I have updated to the latest version and using:

node: 10.16.1 I am getting the following 2 warnings: Critical dependency: require function is used in a way in which dependencies cannot be statically extracted and (Emitted value instead of an instance of Error) Cannot find source file '../source/index.ts': Error: Can't resolve '../source/index.ts' in 'C:\Source_imodelSchemaManagementService\iModelSchemaManagementService\node_modules\@sindresorhus\is\dist'

Adding 'got' to webpack.config externals solves the issue but I want to avoid that trick.

panva commented 4 years ago

@DivisionSi why are you running webpack for a node runtime project?

Duplicate of #242, see https://github.com/panva/node-openid-client/issues/242#issuecomment-600545718

SaadbinWaheed commented 4 years ago

But why is adding it to externals bypassing the warning?