Ava throws `Cannot read property 'moduleName' of null` since `0.19.0`
See original GitHub issueDescription
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
- ws-promise (ava worked at 1.0.3)
Environment
Node.js v7.7.3 linux 4.10.9-1-ARCH 0.19.1 4.1.1
Issue Analytics
- State:
- Created 6 years ago
- Comments:5 (3 by maintainers)
Top 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 >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
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/10For 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.hullabaloo-config-manager@1.0.1
is now available.