Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Files missing in dist package #92

Open
SntsDev opened this issue Aug 28, 2024 · 3 comments
Open

Files missing in dist package #92

SntsDev opened this issue Aug 28, 2024 · 3 comments

Comments

@SntsDev
Copy link

SntsDev commented Aug 28, 2024

When compiling TSC writes the following errors:

WARNING in ../../node_modules/@logdna/logger/node_modules/agent-base/dist/helpers.js
Module Warning (from ../../node_modules/source-map-loader/dist/cjs.js):
Failed to parse source map from '/zzz/node_modules/@logdna/logger/node_modules/agent-base/src/helpers.ts' file: Error: ENOENT: no such file or directory, open '/zzz/node_modules/@logdna/logger/node_modules/agent-base/src/helpers.ts'

WARNING in ../../node_modules/@logdna/logger/node_modules/agent-base/dist/index.js
Module Warning (from ../../node_modules/source-map-loader/dist/cjs.js):
Failed to parse source map from '/zzz/node_modules/@logdna/logger/node_modules/agent-base/src/index.ts' file: Error: ENOENT: no such file or directory, open '/zzz/node_modules/@logdna/logger/node_modules/agent-base/src/index.ts'

WARNING in ../../node_modules/@logdna/logger/node_modules/https-proxy-agent/dist/index.js
Module Warning (from ../../node_modules/source-map-loader/dist/cjs.js):
Failed to parse source map from '/zzz/node_modules/@logdna/logger/node_modules/https-proxy-agent/src/index.ts' file: Error: ENOENT: no such file or directory, open '/zzz/node_modules/@logdna/logger/node_modules/https-proxy-agent/src/index.ts'

WARNING in ../../node_modules/@logdna/logger/node_modules/https-proxy-agent/dist/parse-proxy-response.js
Module Warning (from ../../node_modules/source-map-loader/dist/cjs.js):
Failed to parse source map from '/zzz/node_modules/@logdna/logger/node_modules/https-proxy-agent/src/parse-proxy-response.ts' file: Error: ENOENT: no such file or directory, open '/zzz/node_modules/@logdna/logger/node_modules/https-proxy-agent/src/parse-proxy-response.ts'

@darinspivey
Copy link
Collaborator

darinspivey commented Aug 28, 2024

Thank you for opening this. Can you provide a code snippet that triggers these warnings? This is ultimately a CommonJS project and a typescript definition was provided as best we could. The dependencies of logger-node might not support the code you're writing, as it appears it's trying to pull type defs from those packages as well.

@SntsDev
Copy link
Author

SntsDev commented Aug 29, 2024

It's a Nx project. We use a custom Webpack config file:

...
    output: {
      filename: `[name].js`,
      path: path.resolve(config.output.path),
      library: {
        name: "handler",
        type: "commonjs",
        export: "default",
      },
      environment: {
        globalThis: false,
        module: true,
      },
    },
    target: "node",
    optimization: {
      usedExports: true,
      sideEffects: true,
      innerGraph: true,
      minimize: modeConfiguration === "production",
    },
...

@darinspivey
Copy link
Collaborator

Thanks, but that's not much help as it relates to this project. This appears to be an Nx configuration issue with it treating logging-node's dependencies as modules, and those deps are out of our control.

Also, the logs show that these are WARNING not errors, so I'm curious if they're hard failures? At this point, I'm not sure our team will be much help in solving this one. If you can prove this is the fault of logger-node, then we'd be happy to help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants