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
stylus

算了做自己改吧

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

exports.lineno = null;
exports.column = null;
exports.filename = null;
  • 20
    点赞
  • 26
    收藏
    觉得还不错? 一键收藏
  • 10
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 10
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值