Failed to compile
./node_modules/[email protected]@react-particles-js/cjs/particles.js
Module not found: Can't resolve 'tsparticles' in 'D:\Three phase\react\8.1\myapp\node_modules\[email protected]@react-particles-js\cjs'
这个问题咱们首先看它直译过来的意思:
未能编译
./节点\模块/\反应粒子[email protected]@反应颗粒js/cjs/颗粒。js
未找到模块:无法解析“D:\Three phase\react\8.1\myapp\node\u modules\\u react-particles”中的“tsparticles”[email protected]@反应粒子js\cjs'
也就是说咱们在依赖中,找不到tsparticles这个模块,确实因为你没有下载它对于的模块,然而咱们在使用react-particle-js是需要用到这个模块里边的东西的
所以咱们只需要补充下载这个依赖就好了(cnpm i -S tsparticles)此处使用的是淘宝镜像有需要的伙伴可自行下载,代码附下面
npm install -g cnpm --registry=https://registry.npm.taobao.org
在npm中直接下载就好,下载好之后,用cnpm代替npm下载依赖会更快捷一些
有关以上报错其实