-
-
Notifications
You must be signed in to change notification settings - Fork 543
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
No such native module with winstonjs/winston #178
Comments
Hi! This is a common issue at the moment, I'd revert to Browserify has some kinks at the moment, and solves some other ones. It's a bit off a difficult setup at the moment. |
I'd have a go at browserify.exclude
browserify.requires
browserify.paths and see if any of those help you, specifically paths. (adds the the lookup array for require.resolve) |
Same problem even I'm using
my package.json setting
When I tried to use nexe verison
What about switch browserify to webpack, as I know webpack can handle a lazy loading modules. |
I'll look into webpack! |
@Kurtas I've been looking into webpack. It works for most of the tests, but for big projects it doesn't seem to work. Specifically express (test/express-test). If it's just my configuration then please try it out and see if you can figure anything out, thanks! module.exports = {
context: __dirname,
target: 'node',
entry: "./bin/www", //entry point
module: {
loaders: [
{
test: /\.json$/,
loader: "json-loader"
}
]
}
} |
@gbaumgart Can you elaborate your comment? What do you mean by:
|
@gbaumgart Thanks for your comments. I ended up writing a workaround which loads required transport files statically. |
@calvin Hello, i have a same issue. Can you talk about your solution? |
@thekiba It was done in a quick-and-dirty manner hence not fully tested. https://gist.github.com/calvin/f72be59338ccbaefb5f9617d33fe2e3a |
@calvin how do I use your transport.js? |
The issue disappeared for me after upgrading to the latest winston. |
I get this error when I run the compiled application.
The file that might be triggering the error is https://github.com/winstonjs/winston/blob/0.8.3/lib/winston/transports.js#L32
I tried the following to workaround the dynamic requires:
In the file where I call
nexe.compile()
, I added a code before that to create a file on the same directory astransports.js
. The file contains:Then that file is required at my main file:
And also, the generated binary file contains the required files as what I saw in
output.exe/.rdata
:Any idea why the error occurs?
The text was updated successfully, but these errors were encountered: