Skip to content
This repository has been archived by the owner on Jun 17, 2020. It is now read-only.

Uncaught TypeError: request.charCodeAt is not a function #25

Open
alexcroox opened this issue Jun 23, 2017 · 4 comments
Open

Uncaught TypeError: request.charCodeAt is not a function #25

alexcroox opened this issue Jun 23, 2017 · 4 comments

Comments

@alexcroox
Copy link

alexcroox commented Jun 23, 2017

I'm not sure if this is a webpack issue, but I'm doing the following:

const fetchProjects = requireTaskPool(require.resolve('./Projects/fetchProjects'))

fetchProjects(this.existingProjects)

./Projects/fetchProjects.js

function fetchProjectsWorker (existingProjects) {

}

module.exports = fetchProjectsWorker

But I get Uncaught TypeError: request.charCodeAt is not a function

Debugging with console.log(require.resolve('./Projects/fetchProjects')) returns 100, so I think that might be the issue?

@alexcroox
Copy link
Author

alexcroox commented Jun 25, 2017

It's definitely an issue with webpack compatibility. But even when I manually put in an absolute path to the module as a string manually, I'm getting "Unexpected token import" (I have import statements at the top of the worker)

@wateryoma
Copy link

@alexcroox have you solved this issue?

@alexcroox
Copy link
Author

No, turns out it's been confirmed several times by the author he won't support webpack, see denied PR helping to fix it: #20

@alexcroox alexcroox reopened this Jul 5, 2017
@maxkoryukov
Copy link

Probably, one of the maintainers should fix the bug. But what to do right now?

I have a bug, and I know - it is because Webpack eats my import and includes it into the bundle. But Electron-remote expects to load module by itself.

Probably, it is not a big deal for webpack-enlightened guys, but I am not one of them (at least for now), and I don't have 2 hours to find a proper solution.

So guys, if someone has a proper solution - PLEASE SHARE

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

No branches or pull requests

3 participants