各位大神,本人在写代码时遇到一个特别诡异的问题。js文件中利用import关键字引用其他js中的类,在idea中显示是正常的,及按住Ctrl点击该类是可以跳转到被引用的js文件,说明路径没有问题。但是在页面上调试的时候,总是限制 is not defined。请问这该如何解决?此处按住CTRL+点击lockr是可以进入到对应的lockr.js文件的。
但是在页面调试的时候,却出现了如图所示的Lockr is not defined。
请各位大神看看问题出在了哪里。谢谢
经调试,发现root中的所有参数都会报错,
其错误信息为:
TypeError: 'caller', 'callee', and 'arguments' properties may not be accessed on strict mode functions or the arguments objects for calls to them
at Function.invokeGetter (<anonymous>:2:14)
at http://172.21.0.63:8090/app.js:79219:3
at Object.../node_modules/lockr/lockr.js (http://172.21.0.63:8090/app.js:79226:2)
at __webpack_require__ (http://172.21.0.63:8090/app.js:768:30)
at fn (http://172.21.0.63:8090/app.js:131:20)
at Module../src/store/modules/user.js (http://172.21.0.63:8090/app.js:145632:63)
at __webpack_require__ (http://172.21.0.63:8090/app.js:768:30)
at fn (http://172.21.0.63:8090/app.js:131:20)
at Module../src/store/index.js (http://172.21.0.63:8090/app.js:145175:71)
at __webpack_require__ (http://172.21.0.63:8090/app.js:768:30)
请各位大神再帮忙看看
lockr.js文件代码如下: