编译项目的时候提示如下警告,如何才能定位到警告的具体位置呢
1 | (node:48258) Warning: Accessing non-existent property 'lineno' of module exports inside circular dependency |
按照警告提示,使用如下命令:
1 | node --trace-warnings ... |
得到如下的结果也不能很好的定位具体问题是什么引起的:
1 | internal/modules/cjs/loader.js:1017 |
为了看到详细的信息,我们可以使用下面的命令:
1 | # yarn dev 是我项目本身需要执行的开发命令 |
得到如下警告提示,可以分析出是和 stylus 相关,但是这个具体的问题也和 NodeJs 版本有关系,具体如何解决问题呢
1 | (node:49923) Warning: Accessing non-existent property 'lineno' of module exports inside circular dependency |