Error when running `TypeError: Cannot read properties of undefined (reading 'map')`
Hi, I am trying to use elm-verify-examples with a package.
I get an error when I run, I've tried node 20 and node 22, both with yarn and npm, local and globa.
I have an M1 macbook and I use nix to manage my dependencies.
/Users/maca/.config/yarn/global/node_modules/elm-verify-examples/bin/cli-helpers.js:44
.map((d) =>
^
TypeError: Cannot read properties of undefined (reading 'map')
at resolveTests (/Users/maca/.config/yarn/global/node_modules/elm-verify-examples/bin/cli-helpers.js:44:8)
at Object.loadVerifyExamplesConfig (/Users/maca/.config/yarn/global/node_modules/elm-verify-examples/bin/cli-helpers.js:28:10)
at Object.init (/Users/maca/.config/yarn/global/node_modules/elm-verify-examples/bin/runner.js:15:38)
at Object.<anonymous> (/Users/maca/.config/yarn/global/node_modules/elm-verify-examples/bin/cli.js:34:20)
at Module._compile (node:internal/modules/cjs/loader:1546:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1691:10)
at Module.load (node:internal/modules/cjs/loader:1317:32)
at Module._load (node:internal/modules/cjs/loader:1127:12)
at TracingChannel.traceSync (node:diagnostics_channel:315:14)
at wrapModuleLoad (node:internal/modules/cjs/loader:217:24)
Hi @maca! Can you share a bit more about the package, your configuration, etc.?
Hey @gampleman !
Sure, the package is this one: https://github.com/maca/elm-form-toolkit About the configuration, yarn and node 22 are installed using nix darwin, elm-verify-example is installed globally via yarn, but I've tried with local npm installation too. not sure what else might be relevant.
I wanted to note this before, are the latest commits which seem to fix this released? (I don't think so)
EDIT: https://github.com/stoeffel/elm-verify-examples/commit/7f3cc9cdbe2016345d69cbd17cc5402b8feae104 fixes this for me.
Hey I just wanted to ping that I'm experiencing this issue as well. Node 20.14.0, and NPM 10.7.0.
I also use Nix to manage my dependencies so maybe this is somehow a problem with Nix?
flake.nix:
{
description = "";
inputs.flake-utils.url = "github:numtide/flake-utils";
outputs = { self, nixpkgs, flake-utils }:
flake-utils.lib.eachDefaultSystem
(system:
let pkgs = nixpkgs.legacyPackages.${system}; in
{
devShells.default = pkgs.mkShell {
packages = with pkgs; [
nodejs
];
};
}
);
}