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

log4js #52

Closed
philals opened this issue Jul 18, 2017 · 2 comments
Closed

log4js #52

philals opened this issue Jul 18, 2017 · 2 comments

Comments

@philals
Copy link
Contributor

philals commented Jul 18, 2017

I'm having the same issue as outlined here: NaturalNode/natural#320

Looks like log4js has a bunch of require statements but does not have the dependancies in package.json
image

Looks like log4js got a major overhaul since NZTim was working on the module and is now log4js-node but has the same npm name (log4js).

I tried updating to the latest version (2.2.0) but this broke the build as there was a/some API changes.

Making an Issue to track the bug. I have not done any active work on getting 2.2.0 to work in the project. Anyone else is welcome to give it a go.

Webpack output:

` ERROR in ./node_modules/log4js/lib/appenders/loggly.js
Module not found: Error: Can't resolve 'loggly' in 'C:\Users\phil.alsford\Desktop\project\node_modules\log4js\lib\appenders'
@ ./node_modules/log4js/lib/appenders/loggly.js 3:11-28
@ ./node_modules/log4js/lib/appenders ^./.*$
@ ./node_modules/log4js/lib/log4js.js
@ ./node_modules/xero-node/lib/logger.js
@ ./node_modules/xero-node/lib/index.js
@ ./src/server.ts

ERROR in ./node_modules/log4js/lib/appenders/mailgun.js
Module not found: Error: Can't resolve 'mailgun-js' in 'C:\Users\phil.alsford\Desktop\project\node_modules\log4js\lib\appenders'
 @ ./node_modules/log4js/lib/appenders/mailgun.js 34:14-35
 @ ./node_modules/log4js/lib/appenders ^\.\/.*$
 @ ./node_modules/log4js/lib/log4js.js
 @ ./node_modules/xero-node/lib/logger.js
 @ ./node_modules/xero-node/lib/index.js
 @ ./src/server.ts

ERROR in ./node_modules/log4js/lib/appenders/slack.js
Module not found: Error: Can't resolve 'slack-node' in 'C:\Users\phil.alsford\Desktop\project\node_modules\log4js\lib\appenders'
 @ ./node_modules/log4js/lib/appenders/slack.js 2:12-33
 @ ./node_modules/log4js/lib/appenders ^\.\/.*$
 @ ./node_modules/log4js/lib/log4js.js
 @ ./node_modules/xero-node/lib/logger.js
 @ ./node_modules/xero-node/lib/index.js
 @ ./src/server.ts

ERROR in ./node_modules/log4js/lib/appenders/smtp.js
Module not found: Error: Can't resolve 'nodemailer' in 'C:\Users\phil.alsford\Desktop\project\node_modules\log4js\lib\appenders'
 @ ./node_modules/log4js/lib/appenders/smtp.js 4:13-34
 @ ./node_modules/log4js/lib/appenders ^\.\/.*$
 @ ./node_modules/log4js/lib/log4js.js
 @ ./node_modules/xero-node/lib/logger.js
 @ ./node_modules/xero-node/lib/index.js
 @ ./src/server.ts

`

@philals
Copy link
Contributor Author

philals commented Jul 23, 2017

Thanks for pushing my update.

So I'm still having issues with log4js and webpack...

I believe log4js is going to be a barrier to anyone using webpack and xero-node. I'm sure there is a way in your webpack config to fix it, but it's a barrier.

Is anyone else using webpack and having these issues?

I have a branch that removes all references to log4js and replaces them with console.logs. Is that something you want to be PRd?

@philals
Copy link
Contributor Author

philals commented Jul 23, 2017

Have sent a PR #59

I understand if a change this big needs time/discussion...

Long term I think it would be good if xero-node removed all it's logging, and threw nice exceptions.

@philals philals mentioned this issue Jul 23, 2017
@philals philals closed this as completed Jul 31, 2017
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

1 participant