Warning: Accessing non-existent property xxxx of module exports inside circular dependency

Node报Warning

$ (node:10816) Warning: Accessing non-existent property 'lineno' of module exports inside circular dependency
bash: syntax error near unexpected token `Warning:'
(node:10816) Warning: Accessing non-existent property 'column' of module exports inside circular dependency
(node:10816) Warning: Accessing non-existent property 'filename' of module exports inside circular dependency
(node:10816) Warning: Accessing non-existent property 'lineno' of module exports inside circular dependency
(node:10816) Warning: Accessing non-existent property 'column' of module exports inside circular dependency
(node:10816) Warning: Accessing non-existent property 'filename' of module exports inside circular dependency
(node:10816) Warning: Accessing non-existent property 'lineno' of module exports inside circular dependency

排查

node --trace-warnings queue.js 

看来是 stylus 的问题,百度了下都说是Node版本太高,要切版本。
懒得切。。

(node:11572) 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] (\node_modules\stylus\lib\nodes\node.js:44:23)
    at new Boolean (\node_modules\stylus\lib\nodes\boolean.js:23:8)
    at Object.<anonymous> (\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:11572) 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] (\node_modules\stylus\lib\nodes\node.js:45:23)
    at new Boolean (\node_modules\stylus\lib\nodes\boolean.js:23:8)
    at Object.<anonymous> (\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)

查了下官方 issues https://github.com/stylus/stylus/issues/2534

看到有人已经修复了这个问题 https://github.com/stylus/stylus/pull/2538
但是推在dev上,也木有发布 https://github.com/stylus/stylus/pull/2538/commits/16e2a6c6f96f80b0d700411879f1c13991a0a1a5
@3bl3gamer committed 10 days ago

npmjs 上也没更新 https://www.npmjs.com/package/stylus ,还是0.54.7
Warning: Accessing non-existent property xxxx of module exports inside circular dependency_第1张图片

算了做自己改吧

搜索到项目中文件: \node_modules\stylus\lib\nodes\index.js ,代码最前面加入一下:

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

你可能感兴趣的:(Node)