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

Lots of warnings in CLI #2533

Closed
st-a opened this issue May 3, 2020 · 8 comments
Closed

Lots of warnings in CLI #2533

st-a opened this issue May 3, 2020 · 8 comments

Comments

@st-a
Copy link

st-a commented May 3, 2020

hey there,
I am getting lots of warnings when invoking Stylus from the command line. Doesn't matter which option I use, e.g. $ stylus --help. Despite these warnings, Stylus is working as expected.

  • Stylus 0.54.7
  • Node.js 14.0.0
  • Arch Linux
(node:113126) Warning: Accessing non-existent property 'lineno' of module exports inside circular dependency
(Use `node --trace-warnings ...` to show where the warning was created)
(node:113126) Warning: Accessing non-existent property 'column' of module exports inside circular dependency
(node:113126) Warning: Accessing non-existent property 'filename' of module exports inside circular dependency
(node:113126) Warning: Accessing non-existent property 'lineno' of module exports inside circular dependency
(node:113126) Warning: Accessing non-existent property 'column' of module exports inside circular dependency
(node:113126) Warning: Accessing non-existent property 'filename' of module exports inside circular dependency
$ node --trace-warnings index.js
(node:113140) Warning: Accessing non-existent property 'lineno' of module exports inside circular dependency
    at emitCircularRequireWarning (internal/modules/cjs/loader.js:814:11)
    at Object.get (internal/modules/cjs/loader.js:825:5)
    at Boolean.Node [as constructor] (/usr/lib/node_modules/stylus/lib/nodes/node.js:44:23)
    at new Boolean (/usr/lib/node_modules/stylus/lib/nodes/boolean.js:23:8)
    at Object.<anonymous> (/usr/lib/node_modules/stylus/lib/nodes/index.js:57:16)
    at Module._compile (internal/modules/cjs/loader.js:1185:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1205:10)
    at Module.load (internal/modules/cjs/loader.js:1034:32)
    at Function.Module._load (internal/modules/cjs/loader.js:923:14)
    at Module.require (internal/modules/cjs/loader.js:1074:19)
(node:113140) Warning: Accessing non-existent property 'column' of module exports inside circular dependency
    at emitCircularRequireWarning (internal/modules/cjs/loader.js:814:11)
    at Object.get (internal/modules/cjs/loader.js:825:5)
    at Boolean.Node [as constructor] (/usr/lib/node_modules/stylus/lib/nodes/node.js:45:23)
    at new Boolean (/usr/lib/node_modules/stylus/lib/nodes/boolean.js:23:8)
    at Object.<anonymous> (/usr/lib/node_modules/stylus/lib/nodes/index.js:57:16)
    at Module._compile (internal/modules/cjs/loader.js:1185:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1205:10)
    at Module.load (internal/modules/cjs/loader.js:1034:32)
    at Function.Module._load (internal/modules/cjs/loader.js:923:14)
    at Module.require (internal/modules/cjs/loader.js:1074:19)
(node:113140) Warning: Accessing non-existent property 'filename' of module exports inside circular dependency
    at emitCircularRequireWarning (internal/modules/cjs/loader.js:814:11)
    at Object.get (internal/modules/cjs/loader.js:825:5)
    at Boolean.Node [as constructor] (/usr/lib/node_modules/stylus/lib/nodes/node.js:46:25)
    at new Boolean (/usr/lib/node_modules/stylus/lib/nodes/boolean.js:23:8)
    at Object.<anonymous> (/usr/lib/node_modules/stylus/lib/nodes/index.js:57:16)
    at Module._compile (internal/modules/cjs/loader.js:1185:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1205:10)
    at Module.load (internal/modules/cjs/loader.js:1034:32)
    at Function.Module._load (internal/modules/cjs/loader.js:923:14)
    at Module.require (internal/modules/cjs/loader.js:1074:19)
(node:113140) Warning: Accessing non-existent property 'lineno' of module exports inside circular dependency
    at emitCircularRequireWarning (internal/modules/cjs/loader.js:814:11)
    at Object.get (internal/modules/cjs/loader.js:825:5)
    at Boolean.Node [as constructor] (/usr/lib/node_modules/stylus/lib/nodes/node.js:44:23)
    at new Boolean (/usr/lib/node_modules/stylus/lib/nodes/boolean.js:23:8)
    at Object.<anonymous> (/usr/lib/node_modules/stylus/lib/nodes/index.js:58:17)
    at Module._compile (internal/modules/cjs/loader.js:1185:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1205:10)
    at Module.load (internal/modules/cjs/loader.js:1034:32)
    at Function.Module._load (internal/modules/cjs/loader.js:923:14)
    at Module.require (internal/modules/cjs/loader.js:1074:19)
(node:113140) Warning: Accessing non-existent property 'column' of module exports inside circular dependency
    at emitCircularRequireWarning (internal/modules/cjs/loader.js:814:11)
    at Object.get (internal/modules/cjs/loader.js:825:5)
    at Boolean.Node [as constructor] (/usr/lib/node_modules/stylus/lib/nodes/node.js:45:23)
    at new Boolean (/usr/lib/node_modules/stylus/lib/nodes/boolean.js:23:8)
    at Object.<anonymous> (/usr/lib/node_modules/stylus/lib/nodes/index.js:58:17)
    at Module._compile (internal/modules/cjs/loader.js:1185:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1205:10)
    at Module.load (internal/modules/cjs/loader.js:1034:32)
    at Function.Module._load (internal/modules/cjs/loader.js:923:14)
    at Module.require (internal/modules/cjs/loader.js:1074:19)
(node:113140) Warning: Accessing non-existent property 'filename' of module exports inside circular dependency
    at emitCircularRequireWarning (internal/modules/cjs/loader.js:814:11)
    at Object.get (internal/modules/cjs/loader.js:825:5)
    at Boolean.Node [as constructor] (/usr/lib/node_modules/stylus/lib/nodes/node.js:46:25)
    at new Boolean (/usr/lib/node_modules/stylus/lib/nodes/boolean.js:23:8)
    at Object.<anonymous> (/usr/lib/node_modules/stylus/lib/nodes/index.js:58:17)
    at Module._compile (internal/modules/cjs/loader.js:1185:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1205:10)
    at Module.load (internal/modules/cjs/loader.js:1034:32)
    at Function.Module._load (internal/modules/cjs/loader.js:923:14)
    at Module.require (internal/modules/cjs/loader.js:1074:19)
@AdrianoCahete
Copy link

AdrianoCahete commented May 8, 2020

Same. That bug comes from lexer lib

stylus/lib/lexer.js

Lines 43 to 49 in cf3792a

function Lexer(str, options) {
options = options || {};
this.stash = [];
this.indentStack = [];
this.indentRe = null;
this.lineno = 1;
this.column = 1;

in conjunction with node v14 nodejs/node#29935.

Edit: Adding lexer lines.

@buckle2000
Copy link

buckle2000 commented May 15, 2020

Happens when using it as a library as well. What even is the issue?
I think the warning comes from here:

stylus/lib/nodes/node.js

Lines 43 to 47 in cf3792a

var Node = module.exports = function Node(){
this.lineno = nodes.lineno || 1;
this.column = nodes.column || 1;
this.filename = nodes.filename;
};

@st-a
Copy link
Author

st-a commented Jul 16, 2020

Those warnings are gone with stylus 0.54.8. The issue was fixed by #2538.

@st-a st-a closed this as completed Jul 16, 2020
@zaneclaes
Copy link

zaneclaes commented Nov 17, 2020

@st-a I'm on 0.54.8 and still having these exact issues.

I do see the changes in the PR, though:

cat node_modules/stylus/lib/nodes/index.js
Yields:

/*!
 * Stylus - nodes
 * Copyright (c) Automattic <developer.wordpress.com>
 * MIT Licensed
 */

exports.lineno = null;
exports.column = null;
exports.filename = null;
[...]

@st-a
Copy link
Author

st-a commented Nov 18, 2020

hey @zaneclaes, I just checked with Node v15.2.1 and Stylus 0.54.8 and did not see any issues. Could it be, you have Stylus installed locally and globally and one of them is not updated? Take a look at the output of npm list --depth=0 vs. npm list -g --depth=0 for example.

@zaneclaes
Copy link

zaneclaes commented Nov 18, 2020

FWIW, I'm on Node v14 and using yarn workspaces.

yarn list --depth=0 | grep stylus
├─ stylus-loader@4.3.0
├─ stylus@0.54.8
yarn list -g --depth=0 | grep stylus
├─ stylus-loader@4.3.0
├─ stylus@0.54.8

Same results from the package root vs. workspace root. This is the only project in the workspace with stylus installed. Moreover, I only just installed stylus for the first time (have never used it before a couple days ago), so I highly doubt there are lingering old versions on my system.

@zaneclaes
Copy link

As I look deeper at the stack trace, it seems that the stylus in question is loaded by nib. It seems the nib package was last published 4 years ago. I'm actually porting some code, so I'm a bit beyond my normal experience here. But the Webpack docs still seem to use nib. Is there something I'm missing re: getting the dependencies to line up?

(node:13462) Warning: Accessing non-existent property 'lineno' of module exports inside circular dependency
    at emitCircularRequireWarning (internal/modules/cjs/loader.js:848:11)
    at Object.get (internal/modules/cjs/loader.js:862:5)
    at Boolean.Node [as constructor] (/Users/zaneclaes/OWS/node_modules/nib/node_modules/stylus/lib/nodes/node.js:42:23)
    at new Boolean (/Users/zaneclaes/OWS/node_modules/nib/node_modules/stylus/lib/nodes/boolean.js:23:8)
    at Object.<anonymous> (/Users/zaneclaes/OWS/node_modules/nib/node_modules/stylus/lib/nodes/index.js:57:16)
    at Module._compile (internal/modules/cjs/loader.js:1251:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1272:10)
    at Module.load (internal/modules/cjs/loader.js:1100:32)
    at Function.Module._load (internal/modules/cjs/loader.js:962:14)
    at Module.require (internal/modules/cjs/loader.js:1140:19)
(node:13462) Warning: Accessing non-existent property 'column' of module exports inside circular dependency
    at emitCircularRequireWarning (internal/modules/cjs/loader.js:848:11)
    at Object.get (internal/modules/cjs/loader.js:862:5)
    at Boolean.Node [as constructor] (/Users/zaneclaes/OWS/node_modules/nib/node_modules/stylus/lib/nodes/node.js:43:23)
    at new Boolean (/Users/zaneclaes/OWS/node_modules/nib/node_modules/stylus/lib/nodes/boolean.js:23:8)
    at Object.<anonymous> (/Users/zaneclaes/OWS/node_modules/nib/node_modules/stylus/lib/nodes/index.js:57:16)
    at Module._compile (internal/modules/cjs/loader.js:1251:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1272:10)
    at Module.load (internal/modules/cjs/loader.js:1100:32)
    at Function.Module._load (internal/modules/cjs/loader.js:962:14)
    at Module.require (internal/modules/cjs/loader.js:1140:19)
(node:13462) Warning: Accessing non-existent property 'filename' of module exports inside circular dependency
    at emitCircularRequireWarning (internal/modules/cjs/loader.js:848:11)
    at Object.get (internal/modules/cjs/loader.js:862:5)
    at Boolean.Node [as constructor] (/Users/zaneclaes/OWS/node_modules/nib/node_modules/stylus/lib/nodes/node.js:44:25)
    at new Boolean (/Users/zaneclaes/OWS/node_modules/nib/node_modules/stylus/lib/nodes/boolean.js:23:8)
    at Object.<anonymous> (/Users/zaneclaes/OWS/node_modules/nib/node_modules/stylus/lib/nodes/index.js:57:16)
    at Module._compile (internal/modules/cjs/loader.js:1251:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1272:10)
    at Module.load (internal/modules/cjs/loader.js:1100:32)
    at Function.Module._load (internal/modules/cjs/loader.js:962:14)
    at Module.require (internal/modules/cjs/loader.js:1140:19)
(node:13462) Warning: Accessing non-existent property 'lineno' of module exports inside circular dependency
    at emitCircularRequireWarning (internal/modules/cjs/loader.js:848:11)
    at Object.get (internal/modules/cjs/loader.js:862:5)
    at Boolean.Node [as constructor] (/Users/zaneclaes/OWS/node_modules/nib/node_modules/stylus/lib/nodes/node.js:42:23)
    at new Boolean (/Users/zaneclaes/OWS/node_modules/nib/node_modules/stylus/lib/nodes/boolean.js:23:8)
    at Object.<anonymous> (/Users/zaneclaes/OWS/node_modules/nib/node_modules/stylus/lib/nodes/index.js:58:17)
    at Module._compile (internal/modules/cjs/loader.js:1251:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1272:10)
    at Module.load (internal/modules/cjs/loader.js:1100:32)
    at Function.Module._load (internal/modules/cjs/loader.js:962:14)
    at Module.require (internal/modules/cjs/loader.js:1140:19)
(node:13462) Warning: Accessing non-existent property 'column' of module exports inside circular dependency
    at emitCircularRequireWarning (internal/modules/cjs/loader.js:848:11)
    at Object.get (internal/modules/cjs/loader.js:862:5)
    at Boolean.Node [as constructor] (/Users/zaneclaes/OWS/node_modules/nib/node_modules/stylus/lib/nodes/node.js:43:23)
    at new Boolean (/Users/zaneclaes/OWS/node_modules/nib/node_modules/stylus/lib/nodes/boolean.js:23:8)
    at Object.<anonymous> (/Users/zaneclaes/OWS/node_modules/nib/node_modules/stylus/lib/nodes/index.js:58:17)
    at Module._compile (internal/modules/cjs/loader.js:1251:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1272:10)
    at Module.load (internal/modules/cjs/loader.js:1100:32)
    at Function.Module._load (internal/modules/cjs/loader.js:962:14)
    at Module.require (internal/modules/cjs/loader.js:1140:19)
(node:13462) Warning: Accessing non-existent property 'filename' of module exports inside circular dependency
    at emitCircularRequireWarning (internal/modules/cjs/loader.js:848:11)
    at Object.get (internal/modules/cjs/loader.js:862:5)
    at Boolean.Node [as constructor] (/Users/zaneclaes/OWS/node_modules/nib/node_modules/stylus/lib/nodes/node.js:44:25)
    at new Boolean (/Users/zaneclaes/OWS/node_modules/nib/node_modules/stylus/lib/nodes/boolean.js:23:8)
    at Object.<anonymous> (/Users/zaneclaes/OWS/node_modules/nib/node_modules/stylus/lib/nodes/index.js:58:17)
    at Module._compile (internal/modules/cjs/loader.js:1251:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1272:10)
    at Module.load (internal/modules/cjs/loader.js:1100:32)
    at Function.Module._load (internal/modules/cjs/loader.js:962:14)
    at Module.require (internal/modules/cjs/loader.js:1140:19)

@st-a
Copy link
Author

st-a commented Nov 18, 2020

There is an open Issue at nib regarding the outdated stylus dependency. It looks like you can override the dependency resolution manually with yarn: stylus/nib#347 (comment)

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

4 participants