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

2.4.1 fails on stack trace generation when source map is not found for file #8430

Closed
gramotei opened this issue Jan 4, 2024 · 1 comment
Closed

Comments

@gramotei
Copy link

gramotei commented Jan 4, 2024

Reproduction

BTW: It works with 2.3.1 if downgraded and related with change done in #8174

  • Install axios (1.6.4) latest

  • Add loader

export const loader = async ({ params }) => {
    const tenant = axios.post('http://localhost/wrongurl', {});
    return json(tenant);
}

System Info

System:
    OS: macOS 14.1.2
    CPU: (16) x64 Intel(R) Core(TM) i9-9980HK CPU @ 2.40GHz
    Memory: 6.67 GB / 32.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 18.12.1 - ~/.nvm/versions/node/v18.12.1/bin/node
    npm: 9.5.1 - ~/.nvm/versions/node/v18.12.1/bin/npm
  Browsers:
    Chrome: 120.0.6099.129
    Chrome Canary: 122.0.6225.0
    Safari: 17.1.2
    Safari Technology Preview: 17.4
  npmPackages:
    @remix-run/css-bundle: * => 2.4.1 
    @remix-run/dev: * => 2.4.1 
    @remix-run/eslint-config: * => 2.4.1 
    @remix-run/node: * => 2.4.1 
    @remix-run/react: * => 2.4.1 
    @remix-run/serve: * => 2.4.1

Used Package Manager

npm

Expected Behavior

Throws axios error:

Error: connect ECONNREFUSED ::1:80
    at Function.AxiosError.from (file:///projects/poc/node_modules/axios/lib/core/AxiosError.js:89:14)
    at RedirectableRequest.handleRequestError (file:///projects/poc/node_modules/axios/lib/adapters/http.js:606:25)
    at RedirectableRequest.emit (node:events:513:28)
    at ClientRequest.eventHandlers.<computed> (/projects/poc/node_modules/follow-redirects/index.js:37:24)
    at ClientRequest.emit (node:events:513:28)
    at Socket.socketErrorListener (node:_http_client:494:9)
    at Socket.emit (node:events:513:28)
    at emitErrorNT (node:internal/streams/destroy:151:8)
    at emitErrorCloseNT (node:internal/streams/destroy:116:3)
    at processTicksAndRejections (node:internal/process/task_queues:82:21)

Actual Behavior

Throws error that source map in axios not found:

Error: ENOENT: no such file or directory, open '/projects/poc/node_modules/axios/lib/adapters/http.js.map'
    at Object.openSync (node:fs:600:3)
    at Object.readFileSync (node:fs:468:35)
    at Array.retrieveSourceMap (/projects/poc/node_modules/@remix-run/serve/dist/cli.js:50:37)
    at /projects/poc/node_modules/source-map-support/source-map-support.js:85:24
    at mapSourcePosition (/projects/poc/node_modules/source-map-support/source-map-support.js:216:21)
    at wrapCallSite (/projects/poc/node_modules/source-map-support/source-map-support.js:397:20)
    at Function.prepareStackTrace (/projects/poc/node_modules/source-map-support/source-map-support.js:446:39)
    at maybeOverridePrepareStackTrace (node:internal/errors:141:29)
    at prepareStackTrace (node:internal/errors:115:5)
    at process.emit (/projects/poc/node_modules/source-map-support/source-map-support.js:508:52) {
  errno: -2,
  syscall: 'open',
  code: 'ENOENT',
  path: '/projects/poc/node_modules/axios/lib/adapters/http.js.map'
}
@brophdawg11
Copy link
Contributor

Closing as a duplicate of #8309

@brophdawg11 brophdawg11 closed this as not planned Won't fix, can't repro, duplicate, stale Jan 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants