Skip to content

'npm run test' broken? #165

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

Closed
wolfgang42 opened this issue Apr 21, 2025 · 1 comment
Closed

'npm run test' broken? #165

wolfgang42 opened this issue Apr 21, 2025 · 1 comment

Comments

@wolfgang42
Copy link

I cloned parquetjs intending to investigate adding a feature, and immediately ran into trouble before I had even started. npm install && npm run build && npm run test crashed; the TLDR is:

$ npm run test:only test/lib/bufferReader.test.js

> @dsnp/[email protected] test:only
> mocha test/lib/bufferReader.test.js

(node:108515) [MODULE_TYPELESS_PACKAGE_JSON] Warning: Module type of file:///home/wolf/src/vend/parquetjs/test/lib/bufferReader.test.js is not specified and it doesn't parse as CommonJS.
Reparsing as ES module because module syntax was detected. This incurs a performance overhead.
To eliminate this warning, add "type": "module" to /home/wolf/src/vend/parquetjs/package.json.
(Use `node --trace-warnings ...` to show where the warning was created)

 Exception during run: file:///home/wolf/src/vend/parquetjs/test/lib/bufferReader.test.js:6
import { ParquetEnvelopeReader } from '../../lib/reader';
         ^^^^^^^^^^^^^^^^^^^^^
SyntaxError: The requested module '../../lib/reader' does not provide an export named 'ParquetEnvelopeReader'
    at ModuleJob._instantiate (node:internal/modules/esm/module_job:180:21)
    at async ModuleJob.run (node:internal/modules/esm/module_job:263:5)
    at async onImport.tracePromise.__proto__ (node:internal/modules/esm/loader:578:26)
    at async formattedImport (/home/wolf/src/vend/parquetjs/node_modules/mocha/lib/nodejs/esm-utils.js:9:14)
    at async exports.requireOrImport (/home/wolf/src/vend/parquetjs/node_modules/mocha/lib/nodejs/esm-utils.js:42:28)
    at async exports.loadFilesAsync (/home/wolf/src/vend/parquetjs/node_modules/mocha/lib/nodejs/esm-utils.js:100:20)
    at async singleRun (/home/wolf/src/vend/parquetjs/node_modules/mocha/lib/cli/run-helpers.js:162:3)
    at async exports.handler (/home/wolf/src/vend/parquetjs/node_modules/mocha/lib/cli/run.js:375:5)

I’m on Node v22.14.0, if that makes a difference; I tried poking around a bit to work out what might be causing this (some missing tsx+mocha configuration?), but I figured before I went too far down that rabbit hole I'd check with you since this seems like the sort of thing that really ought to have worked right out of the box, so maybe I just missed a build step?

@shannonwells
Copy link
Collaborator

shannonwells commented May 14, 2025

Looking into this, sorry for the late reply. Edit: Yes it will make a difference. In .tool-versions we're only up to 18.18.2 of nodejs and there is an issue to upgrade to 20 (#102). Please try npm install using nodejs 18.18.2 and see if you still have a problem. I just did a clean checkout and install and was able to run tests (though I did have to manually run npm i mocha 👎 . We standardize on asdf for managing node versions.

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