Skip to content
This repository has been archived by the owner on Nov 4, 2024. It is now read-only.

[Regression since 3.0.75] Crash when working with Istanbul #579

Closed
GMartigny opened this issue Aug 21, 2018 · 4 comments
Closed

[Regression since 3.0.75] Crash when working with Istanbul #579

GMartigny opened this issue Aug 21, 2018 · 4 comments
Labels

Comments

@GMartigny
Copy link

Following #551, I upgrade to 3.0.75 and get an exception:

TypeError: Cannot read property 'f' of undefined
  at Object.<anonymous> (file:///pencil.js/modules/image/image.js:1)
  at Generator.next (<anonymous>)
  at file:///pencil.js/node_modules/nyc/node_modules/append-transform/index.js:62:4
  at extensions.(anonymous function) (file:///pencil.js/node_modules/require-precompiled/index.js:16:3)
  at file:///pencil.js/node_modules/nyc/node_modules/append-transform/index.js:62:4
  at require.extensions.(anonymous function) (file:///pencil.js/node_modules/ava/lib/process-adapter.js:100:4)
  at Object.<anonymous> (file:///pencil.js/node_modules/nyc/node_modules/append-transform/index.js:62:4)
  at Module.load (internal/modules/cjs/loader.js:599:32)

It occur when I execute npx nyc ava where AVA requires esm. However, I get no exception when I do npx ava or when I use esm@3.0.74.

I tried every version of esm between 75 and 79 without any luck. I don't manage yet to isolate this error in a simple repo (still trying tho).

The weird stuff is that when I clean the .cache folder and rerun the command, I don't always get the same amount of exceptions.

@jdalton jdalton added the bug label Aug 21, 2018
@jdalton
Copy link
Member

jdalton commented Aug 21, 2018

Hi @GMartigny!

This is likely a caching related issue. Though if you can create a repro repo for us we'll be able to dig in a bit more.

@GMartigny
Copy link
Author

You're right, it was a caching issue. I manage to update my repro repo to trigger the bug every times.

It appear when I import a module twice via different mean in the same test suite. In my case: A.test import A import B then B.test import B.

Just clone it and run:

npx lerna bootstrap
npx nyc ava #No issue
npx nyc ava #Cannot read 'f' of undefined

Clearing the cache allow to get back to no issue the first time.

@jdalton
Copy link
Member

jdalton commented Aug 23, 2018

v3.0.80 is released 🎉

@GMartigny
Copy link
Author

Your reactivity is a boon ! Thanks a bunch.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Development

No branches or pull requests

2 participants