Jest SecurityError: localStorage is not available for opaque origins

前端 未结 12 515
礼貌的吻别
礼貌的吻别 2021-01-30 19:24

When I want to run my project with the command npm run test, I get the error below. What is causing this?

FAIL
● Test suite failed to run

SecurityE         


        
12条回答
  •  后悔当初
    2021-01-30 19:33

    This may sound silly, but for me, the problem was caused because I had mistakenly installed random packages with npm update. I was running npm install and then npm update but I should have only ran npm install. I fixed the problem by deleting node_modules directory and running npm install again.

提交回复
热议问题