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

issue in starting node application after use of winston #1256

Closed
rahuliet opened this issue Apr 3, 2018 · 1 comment
Closed

issue in starting node application after use of winston #1256

rahuliet opened this issue Apr 3, 2018 · 1 comment

Comments

@rahuliet
Copy link

rahuliet commented Apr 3, 2018

I have recently included winston in my project by "npm i winston@next --save " for logging purpose.. the error which I am getting is on linux server machine on start of application

*********/node_modules/winston/lib/winston/common.js:9
const { format } = require('util');
      ^
SyntaxError: Unexpected token {
    at Module._compile (module.js:439:25)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Module.require (module.js:364:17)
    at require (module.js:380:17)
    at Object.<anonymous> (*******/node_modules/winston/lib/winston.js:9:16)
    at Module._compile (module.js:456:26)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)**

Linux OS Version & Details
LSB Version: :base-4.0-amd64:base-4.0-noarch:core-4.0-amd64:core-4.0-noarch:graphics-4.0-amd64:graphics-4.0-noarch:printing-4.0-amd64:printing-4.0-noarch
Distributor ID: RedHatEnterpriseServer
Description: Red Hat Enterprise Linux Server release 6.9 (Santiago)
Release: 6.9

@indexzero
Copy link
Member

You are using an older version of node that does not support ES6 destructing assignment. Please upgrade you version of node.

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