You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ERROR in ./node_modules/@datadog/native-appsec/vendor/linux-x64-musl/appsec.node 1:0
Module parse failed: Unexpected character '�' (1:0)
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders
(Source code omitted for this binary file)
**Steps to reproduce**
// server.ts
import './tracer';
// tracer.ts
import tracer from 'dd-trace';
tracer.init(); // initialized in a different file to avoid hoisting.
export default tracer;
webpack.config.js
const path = require('path');
const { CleanWebpackPlugin } = require('clean-webpack-plugin');
const { ProgressPlugin } = require('webpack');
const { name } = require('./package.json');
module.exports = {
target: 'node',
devtool: "inline-source-map",
entry: './src/index.js',
plugins: [new ProgressPlugin(), new CleanWebpackPlugin(),
module: {
rules: [
{
test: /\.m?js$/,
exclude: /(node_modules|bower_components)/,
use: {
loader: 'babel-loader',
options: {
presets: ['@babel/preset-env']
},
},
},
],
},
output: {
filename: `${name}.js`,
path: path.resolve(__dirname, 'dist'),
},
externals: [
'graphql',
'graphql/language/visitor',
'graphql/language/printer',
'graphql/utilities',
],
};
**Environment**
* **Operation system:**
* **Node.js version: 16**
* **Tracer version: 3.5.0**
* **Agent version:**
* **Relevant library versions:**
<!-- If possible, please also provide the parts of your package.json that you're
able to share. -->
The text was updated successfully, but these errors were encountered:
Hello, I am trying to add ddtrace to a node service thats using webpack + babel. But I get the following error below. I have also followed the set up instruction in https://docs.datadoghq.com/tracing/trace_collection/dd_libraries/nodejs/?tab=containers#typescript-and-bundlers but no luck. Any advice?
Error message
webpack.config.js
The text was updated successfully, but these errors were encountered: