Skip to content

Error: Can't resolve 'node:buffer' #744

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

Open
Genero-Jay opened this issue Oct 19, 2021 · 6 comments
Open

Error: Can't resolve 'node:buffer' #744

Genero-Jay opened this issue Oct 19, 2021 · 6 comments

Comments

@Genero-Jay
Copy link

I am trying to follow the examples, but I get an error right away:

Error: Webpack Compilation Error
./node_modules/neat-csv/index.js
Module not found: Error: Can't resolve 'node:buffer' 

Any suggestions? Am I missing a requirement?

@samstefan
Copy link

@Genero-Jay I'm also getting this issue, did you find a way to resolve it?

@thomaswong66
Copy link

@Genero-Jay Same issue here

@stychu
Copy link

stychu commented Mar 1, 2022

Make sure u use same version of neat-csv as in the example. Seems like the newest version of neat-csv is breaking things and not working anymore in cypress.

"neat-csv": "5.1.0",

@minesh-patel-cko
Copy link

i am having same issue.
ReferenceError
The following error originated from your test code, not from Cypress.

Buffer is not defined

When Cypress detects uncaught errors originating from your test code it will automatically fail the current test.

Cypress could not associate this error to any specific test.

We dynamically generated a new test to display this failure.

@vonkanehoffen
Copy link

Had this issue and it's fine with neat-csv pinned to 5.1.0 like @stychu suggested. Guess it's some node version thing.

@sbrunner
Copy link

sbrunner commented Apr 1, 2025

I get this error with neat-csv 7.0.0


Oops...we found an error preparing this test file:

  > src/e2e/desktop.spec.ts

The error was:

Error: Webpack Compilation Error
Module build failed: UnhandledSchemeError: Reading from "node:buffer" is not handled by plugins (Unhandled scheme).
Webpack supports "data:" and "file:" URIs by default.
You may need an additional plugin to handle "node:" URIs.

Module build failed: UnhandledSchemeError: Reading from "node:process" is not handled by plugins (Unhandled scheme).
Webpack supports "data:" and "file:" URIs by default.
You may need an additional plugin to handle "node:" URIs.

Module build failed: UnhandledSchemeError: Reading from "node:stream" is not handled by plugins (Unhandled scheme).
Webpack supports "data:" and "file:" URIs by default.
You may need an additional plugin to handle "node:" URIs.

Module build failed: UnhandledSchemeError: Reading from "node:util" is not handled by plugins (Unhandled scheme).
Webpack supports "data:" and "file:" URIs by default.
You may need an additional plugin to handle "node:" URIs.
    at handle (/home/runner/.cache/Cypress/14.2.1/Cypress/resources/app/node_modules/@packages/server/node_modules/@cypress/webpack-preprocessor/dist/index.js:296:23)
    at finalCallback (/home/runner/.cache/Cypress/14.2.1/Cypress/resources/app/node_modules/webpack/lib/Compiler.js:500:32)
    at /home/runner/.cache/Cypress/14.2.1/Cypress/resources/app/node_modules/webpack/lib/Compiler.js:578:17
    at /home/runner/.cache/Cypress/14.2.1/Cypress/resources/app/node_modules/webpack/lib/HookWebpackError.js:67:2
    at Hook.eval [as callAsync] (eval at create (/home/runner/.cache/Cypress/14.2.1/Cypress/resources/app/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:6:1)
    at Hook.CALL_ASYNC_DELEGATE [as _callAsync] (/home/runner/.cache/Cypress/14.2.1/Cypress/resources/app/node_modules/tapable/lib/Hook.js:18:14)
    at Cache.storeBuildDependencies (/home/runner/.cache/Cypress/14.2.1/Cypress/resources/app/node_modules/webpack/lib/Cache.js:126:37)
    at /home/runner/.cache/Cypress/14.2.1/Cypress/resources/app/node_modules/webpack/lib/Compiler.js:574:19
    at Hook.eval [as callAsync] (eval at create (/home/runner/.cache/Cypress/14.2.1/Cypress/resources/app/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:6:1)
    at Hook.CALL_ASYNC_DELEGATE [as _callAsync] (/home/runner/.cache/Cypress/14.2.1/Cypress/resources/app/node_modules/tapable/lib/Hook.js:18:14)
    at /home/runner/.cache/Cypress/14.2.1/Cypress/resources/app/node_modules/webpack/lib/Compiler.js:570:23
    at Compiler.emitRecords (/home/runner/.cache/Cypress/14.2.1/Cypress/resources/app/node_modules/webpack/lib/Compiler.js:1046:4)
    at /home/runner/.cache/Cypress/14.2.1/Cypress/resources/app/node_modules/webpack/lib/Compiler.js:560:11
    at /home/runner/.cache/Cypress/14.2.1/Cypress/resources/app/node_modules/webpack/lib/Compiler.js:1009:14
    at Hook.eval [as callAsync] (eval at create (/home/runner/.cache/Cypress/14.2.1/Cypress/resources/app/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:6:1)
    at Hook.CALL_ASYNC_DELEGATE [as _callAsync] (/home/runner/.cache/Cypress/14.2.1/Cypress/resources/app/node_modules/tapable/lib/Hook.js:18:14)
    at /home/runner/.cache/Cypress/14.2.1/Cypress/resources/app/node_modules/webpack/lib/Compiler.js:1006:27
    at /home/runner/.cache/Cypress/14.2.1/Cypress/resources/app/node_modules/neo-async/async.js:2818:7
    at done (/home/runner/.cache/Cypress/14.2.1/Cypress/resources/app/node_modules/neo-async/async.js:3522:9)
    at Hook.eval [as callAsync] (eval at create (/home/runner/.cache/Cypress/14.2.1/Cypress/resources/app/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:6:1)
    at Hook.CALL_ASYNC_DELEGATE [as _callAsync] (/home/runner/.cache/Cypress/14.2.1/Cypress/resources/app/node_modules/tapable/lib/Hook.js:18:14)
    at /home/runner/.cache/Cypress/14.2.1/Cypress/resources/app/node_modules/webpack/lib/Compiler.js:835:33

This occurred while Cypress was compiling and bundling your test code. This is usually caused by:

- A missing file or dependency
- A syntax error in the file or one of its dependencies

Fix the error in your code and re-run your tests.

  (Results)

  ┌────────────────────────────────────────────────────────────────────────────────────────────────┐
  │ Tests:        0                                                                                │
  │ Passing:      0                                                                                │
  │ Failing:      1                                                                                │
  │ Pending:      0                                                                                │
  │ Skipped:      0                                                                                │
  │ Screenshots:  0                                                                                │
  │ Video:        false                                                                            │
  │ Duration:     0 seconds                                                                        │
  │ Spec Ran:     src/e2e/desktop.spec.ts                                                          │
  └────────────────────────────────────────────────────────────────────────────────────────────────┘

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

7 participants