Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeError: Cannot read property 'isProvided' of undefined #37

Closed
MichalLytek opened this issue Nov 23, 2018 · 2 comments
Closed

TypeError: Cannot read property 'isProvided' of undefined #37

MichalLytek opened this issue Nov 23, 2018 · 2 comments

Comments

@MichalLytek
Copy link

MichalLytek commented Nov 23, 2018

After upgrade to 3.1.0, I've started to get this error when I'm running the tests.

FAIL src/Recordings/recordings.model.test.ts
  ● Test suite failed to run

    TypeError: Cannot read property 'isProvided' of undefined

      at log (node_modules/@craco/craco/lib/logger.js:4:17)
      at Object.<anonymous> (node_modules/@craco/craco/lib/paths.js:36:1)
      at Object.<anonymous> (node_modules/@craco/craco/lib/config.js:3:25)

Looking into the source code, you have circular dependencies between loggger.js and args.js, so one of them is resolved to an empty object, resulting in this error.

@MichalLytek
Copy link
Author

MichalLytek commented Nov 23, 2018

@patricklafrance
After commenting that line:
https://github.com/sharegate/craco/blob/3dfbc5089459f9a9af88e9cb8523e8d07655bf2f/packages/craco/lib/args.js#L37
my tests are passing, so it's clearly circular deps problem.
I can reproduce it also on v3.0.1.

@patricklafrance
Copy link
Contributor

Hi @19majkel94

Thanks for the issue.

You're right about that circular dependency. I don't understand why the tests in my local sandbox were running without that error.

Anyway, it's fix in 3.1.1

Thank you :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants