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 'referencePaths' of undefined #4

Open
stephanschubert opened this issue May 27, 2019 · 1 comment
Open

Comments

@stephanschubert
Copy link

Hi, I am getting this error when running npm run build

TypeError: Cannot read property 'referencePaths' of undefined
    at handleFactoryFunction (/Users/sschubert/git/<redacted>/node_modules/babel-plugin-debug-source/index.js:13:52)
    ...

at this part of the code:

import logger from "debug";

export const debug = namespace => {
  return logger(namespace);
};
@robin-drexler
Copy link
Owner

Sorry for the very late reply. I totally missed this issue.

When I try your snippet and transform

import logger from "debug";

export const debug = namespace => {
  return logger(namespace);
};


debug('hello')

I receive

import logger from "debug";
export const debug = namespace => {
  return logger(namespace);
};
debug('hello', "/Users/robindrexler/src/github.com/robin-drexler/babel-plugin-debug-source/test.js:8:0");

which looks good and doesn't produce an error.

I did update babel dependencies, though. So this might have fixed it for me.

Would you mind trying again?

Thanks so much for the initial report and sorry again!

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