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.

Ava throws `Cannot read property 'moduleName' of null` since `0.19.0`

See original GitHub issue

Description

Upgrading ava from 0.18.2 to 0.19.0 broke the tests in ws-promise. Running ava will cause Cannot read property 'moduleName' of null.

This still happens in 0.19.1.

Test Source

No tests are required to reproduce; commenting out all tests in ws-promise results in the same error.

Error Message & Stack Trace

╭─kdex@punchy-old  ~/dev/wp  ‹master› 
╰─$ $(npm bin)/ava                                                                                                                                    1 ↵

  1 exception

  Uncaught Exception
  TypeError: /home/kdex/dev/wp/test/Client.js: Cannot read property 'moduleName' of null
    at getRuntimeModuleName (/home/kdex/dev/wp/node_modules/babel-plugin-transform-runtime/lib/index.js:10:16)
    at PluginPass.pre (/home/kdex/dev/wp/node_modules/babel-plugin-transform-runtime/lib/index.js:21:24)
    at File.call (/home/kdex/dev/wp/node_modules/babel-core/lib/transformation/file/index.js:628:18)
    at File.transform (/home/kdex/dev/wp/node_modules/babel-core/lib/transformation/file/index.js:544:12)
    at /home/kdex/dev/wp/node_modules/babel-core/lib/transformation/pipeline.js:50:19
    at File.wrap (/home/kdex/dev/wp/node_modules/babel-core/lib/transformation/file/index.js:564:16)
    at Pipeline.transform (/home/kdex/dev/wp/node_modules/babel-core/lib/transformation/pipeline.js:47:17)
    at CachingPrecompiler._transform (/home/kdex/dev/wp/node_modules/ava/lib/caching-precompiler.js:58:24)
    at transform (/home/kdex/dev/wp/node_modules/caching-transform/index.js:43:10)
    at CachingPrecompiler.transform (/home/kdex/dev/wp/node_modules/caching-transform/index.js:60:17)
    at CachingPrecompiler.precompileFile (/home/kdex/dev/wp/node_modules/ava/lib/caching-precompiler.js:39:9)
    at Api._runFile (/home/kdex/dev/wp/node_modules/ava/api.js:57:33)
    at resolve (/home/kdex/dev/wp/node_modules/ava/api.js:240:24)
From previous event:
    at Api._runWithoutPool (/home/kdex/dev/wp/node_modules/ava/api.js:237:5)
    at _setupPrecompiler.then.then (/home/kdex/dev/wp/node_modules/ava/api.js:164:23)

Config

{
  "ava": {
    "require": "babel-register",
    "babel": "inherit"
  }
}

Command-Line Arguments

$(npm bin)/ava

Relevant Links

Environment

Node.js v7.7.3 linux 4.10.9-1-ARCH 0.19.1 4.1.1

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
novemberborncommented, Apr 18, 2017

Sorry, it somehow hadn’t clicked that you were using AVA to develop ws-promise, I thought it was a dependency!

This is due to a bug in the module we started using in 0.19 to resolve Babel options: https://github.com/novemberborn/hullabaloo-config-manager/issues/10

For now you can work around this by not putting ["transform-runtime"] in an array, or by specifying an empty options object (["transform-runtime", {}]). I’ll try and get a fix out soon.

0reactions
novemberborncommented, Apr 18, 2017

hullabaloo-config-manager@1.0.1 is now available.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Uncaught TypeError: Cannot read property of null - iDiallo
This error occurs when you read a property or call a method on a null object . That's because the DOM API returns...
Read more >
Custom fields error: Cannot read property 'Required' of null
When editing in Custom fields view an error is thrown: "Uncaught TypeError: Cannot read property 'Required' of null". After performing an ...
Read more >
Getting 'Cannot read property 'ɵmod' of undefined' when ...
Im summary the reason for this problem is an incomplete or wrongly uploaded package in your main repository. In my case for example,...
Read more >
Cannot Read Property options of null browser error in portal
Hi All, I am getting console error cannot read property options of null error in one of my catalog item in portal after...
Read more >
How to Prevent the Error: Cannot Read Property '0' of Undefined
If the items field is undefined , the previous code will throw the Cannot read property '0' of undefined error. If a new...
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