question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

CML 0.7.5: Cannot read property 'map' of undefined

See original GitHub issue

Starting today CI runs using gh actions iterative/setup-cml@v1 and cml-runner are failing with

  cml-runner \
  --cloud aws \
  --cloud-region eu-west-1 \
  --cloud-type g4dn.xlarge \
  --labels=$label \
  --cloud-hdd-size 100 \
  --single \
  --no-reuse \
  --cloud-aws-security-group cicd

{"level":"error","message":"Cannot read property 'map' of undefined","name":"YError","stack":"YError: Cannot read property 'map' of undefined\n at /usr/local/lib/node_modules/@dvcorg/cml/node_modules/yargs/build/index.cjs:1:29913\n at j (/usr/local/lib/node_modules/@dvcorg/cml/node_modules/yargs/build/index.cjs:1:4952)\n at /usr/local/lib/node_modules/@dvcorg/cml/node_modules/yargs/build/index.cjs:1:29809\n at /usr/local/lib/node_modules/@dvcorg/cml/node_modules/yargs/build/index.cjs:1:4753\n at Array.reduce (<anonymous>)\n at C (/usr/local/lib/node_modules/@dvcorg/cml/node_modules/yargs/build/index.cjs:1:4551)\n at M.applyMiddlewareAndGetResult (/usr/local/lib/node_modules/@dvcorg/cml/node_modules/yargs/build/index.cjs:1:8688)\n at M.runCommand (/usr/local/lib/node_modules/@dvcorg/cml/node_modules/yargs/build/index.cjs:1:7206)\n at Jt.[runYargsParserAndExecuteCommands] (/usr/local/lib/node_modules/@dvcorg/cml/node_modules/yargs/build/index.cjs:1:55967)\n at Jt.parse (/usr/local/...

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:1
  • Comments:9 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
oolesencommented, Oct 19, 2021

As I said, I have been using the very, very recently updated Docker Hub Image. I have tried it again, even removing the image locally and pulling it anew. I am (and was) using the latest version. Please compare the digest: 14bc2458143b0b for tag 0-dvc2-base1-gpu

Still get the same error.

I wanted to make sure, that “my” container is really using the bugfix. After all I am very aware the problem might be on my side. Gotta admit I got lost a bit. I saw that in the bugfix of issue #770 cml/package.json was updated from “0.7.5” to “0.7.6” - however the only cml/package.json I found in my container looked totally different and mentioned CML 0.7.5:

root@52ef753f26ef:/usr/lib/node_modules/@dvcorg/cml# cat package.json
{
  "_from": "@dvcorg/cml@0.7.6",
  "_id": "@dvcorg/cml@0.7.6",
  "_inBundle": false,
  "_integrity": "sha512-NOGjfDSDklwHOoW8WT48gWh1tSadtZqNjmLlmGwYjksQzya23vWMwJXBoJ0jNZldRDggn5lYfxRP7EsyZXnUyg==",
  "_location": "/@dvcorg/cml",
  "_phantomChildren": {},
  "_requested": {
    "type": "version",
    "registry": true,
    "raw": "@dvcorg/cml@0.7.6",
    "name": "@dvcorg/cml",
    "escapedName": "@dvcorg%2fcml",
    "scope": "@dvcorg",
    "rawSpec": "0.7.6",
    "saveSpec": null,
    "fetchSpec": "0.7.6"
  },

So I reckoned I am on the wrong track and tried querying NPM:

root@52ef753f26ef:/usr/lib/node_modules/@dvcorg/cml# npm ls cml
@dvcorg/cml@0.7.5 /usr/lib/node_modules/@dvcorg/cml
└── (empty)

Then I tried installing 0.7.6 and ran into massive trouble - maybe I took wrong turn here. Or your build process failed unnoticed…?

root@52ef753f26ef:/usr/lib/node_modules/@dvcorg/cml# npm install --global "@dvcorg/cml@0.7.6"
npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated har-validator@5.1.5: this library is no longer supported
npm WARN deprecated uuid@3.4.0: Please upgrade  to version 7 or higher.  Older versions may use Math.random() in certain circumstances, which is known to be problematic.  See https://v8.dev/blog/math-random for details.
/usr/bin/cml -> /usr/lib/node_modules/@dvcorg/cml/bin/cml.js
/usr/bin/cml-send-github-check -> /usr/lib/node_modules/@dvcorg/cml/bin/legacy.js
/usr/bin/cml-send-comment -> /usr/lib/node_modules/@dvcorg/cml/bin/legacy.js
/usr/bin/cml-publish -> /usr/lib/node_modules/@dvcorg/cml/bin/legacy.js
/usr/bin/cml-tensorboard-dev -> /usr/lib/node_modules/@dvcorg/cml/bin/legacy.js
/usr/bin/cml-cloud-runner-entrypoint -> /usr/lib/node_modules/@dvcorg/cml/bin/legacy.js
/usr/bin/cml-pr -> /usr/lib/node_modules/@dvcorg/cml/bin/legacy.js
/usr/bin/cml-runner -> /usr/lib/node_modules/@dvcorg/cml/bin/legacy.js

> cpu-features@0.0.2 install /usr/lib/node_modules/@dvcorg/cml/node_modules/cpu-features
> node-gyp rebuild

make: Entering directory '/usr/lib/node_modules/@dvcorg/cml/node_modules/cpu-features/build'
  ACTION Configuring dependencies /usr/lib/node_modules/@dvcorg/cml/node_modules/cpu-features/deps/cpu_features/build/Makefile
/bin/sh: 1: cmake: not found
make: *** [config_deps.target.mk:13: /usr/lib/node_modules/@dvcorg/cml/node_modules/cpu-features/deps/cpu_features/build/Makefile] Error 127
make: Leaving directory '/usr/lib/node_modules/@dvcorg/cml/node_modules/cpu-features/build'
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:194:23)
gyp ERR! stack     at ChildProcess.emit (events.js:314:20)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:276:12)
gyp ERR! System Linux 4.15.0-159-generic
gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /usr/lib/node_modules/@dvcorg/cml/node_modules/cpu-features
gyp ERR! node -v v12.22.7
gyp ERR! node-gyp -v v5.1.0
gyp ERR! not ok
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: cpu-features@0.0.2 (node_modules/@dvcorg/cml/node_modules/cpu-features):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: cpu-features@0.0.2 install: `node-gyp rebuild`
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Exit status 1

+ @dvcorg/cml@0.7.6
updated 1 package in 41.289s

I rebuilt the container and ran cml --version:

root@4194bb3d236b:/usr/lib/node_modules/@dvcorg/cml/src# cml --version
0.7.5

To me it feels like the bugfix hasn’t made it into the Docker Hub image.

1reaction
jamt9000commented, Oct 16, 2021

Thanks for the quick fix 😄

Read more comments on GitHub >

github_iconTop Results From Across the Web

Error : Cannot read property 'map' of undefined - Stack Overflow
The error Cannot read property 'map' of undefined' is thrown when the map function in the CommentList component is executed.
Read more >
How to Prevent the TypeError: Cannot Read Property Map of ...
A guide on the root cause of 'cannot read map of undefined' as well as techniques and tools to prevent this error.
Read more >
Changelog - Cypress Documentation
Cypress no longer throws the error "cannot read property split of undefined" in certain circumstances when application errors are thrown. Fixes #17378.
Read more >
Bug listing with status RESOLVED with resolution OBSOLETE ...
... Bug:106343 - "dev-java/mapdb - Concurrent Maps, Sets and Queues backed by ... and can't be read" status:RESOLVED resolution:OBSOLETE severity:normal ...
Read more >
Type error: cannot read property 'map' of null - react JS
How have you defined products is still not clear. I can just guess that its initialized as null in your component and that...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found