"Critical dependency: the request of a dependency is an expression" with webpack, Babel & TypeScript
See original GitHub issueDescribe the bug
I am using a TypeScript setup with webpack and babel and get the following warnings when including elastic-apm-node
.
WARNING in node_modules/elastic-apm-node/lib/agent.js 152:16-59
Critical dependency: the request of a dependency is an expression
@ node_modules/elastic-apm-node/index.js
WARNING in node_modules/elastic-apm-node/lib/config.js 25:19-36
Critical dependency: the request of a dependency is an expression
@ node_modules/elastic-apm-node/lib/agent.js
WARNING in node_modules/elastic-apm-node/lib/instrumentation/index.js 169:16-30
Critical dependency: the request of a dependency is an expression
@ node_modules/elastic-apm-node/lib/agent.js
To Reproduce Steps to reproduce the behavior:
- Clone https://github.com/arichter83/meteor-webpack/tree/with-elastic-apm-node
- Run
npm install
- Run
npm start
How are you starting the agent? (please tick one of the boxes)
- Requiring
elastic-apm-node/start
from within the source code
Issue Analytics
- State:
- Created 4 years ago
- Comments:12 (7 by maintainers)
Top Results From Across the Web
Bundling typescript using webpack: the request of a ... - GitHub
node_modules/typescript/lib/typescript.js Critical dependency: the request of a dependency is an expression .
Read more >Webpack - Critical dependency: the request of a dependency ...
Webpack tries to resolve require calls statically to make a minimal bundle. When a library uses variables or expressions in a require call...
Read more >the request of a dependency is an expression webpack - You ...
When a library uses variables or expressions in a require call (such as require ('' + 'nodent') in these lines of ajv ),...
Read more >TypeScript - webpack
In this guide we will learn how to integrate TypeScript with webpack. Basic Setup. First install the TypeScript compiler and loader by running:...
Read more >ts-loader - npm
This is the TypeScript loader for webpack. ... from static type checking between different dependencies in your application will be lost.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
By use
@angular-builders/custom-webpack
and add custom webpack configuration, second part problems with errors solved:Now
dev:ssr
andbuild:ssr
compile successfully.Big thanks to @havran your work around fixed the problem I was having!