Pull down the taro project and report an error

$ cnpm run dev:weapp

[email protected] dev:weapp D:\VR\durian-weapp
npm run build:weapp – --watch

[email protected] build:weapp D:\VR\durian-weapp
taro build --type weapp “–watch”

Tarot v3.1.3

(node:12848) UnhandledPromiseRejectionWarning: Error: Cannot find module ‘@tarojs/plugin-platform-weapp’ from ‘D:\VR\durian-weapp’
at Function.resolveSync [as sync] (C:\Users\Administrator\AppData\Roaming\npm\node_modules@tarojs\cli\node_modules@tarojs\service\node_modules\resolve\lib\sync.js:81:15)
at C:\Users\Administrator\AppData\Roaming\npm\node_modules@tarojs\cli\node_modules@tarojs\service\dist\utils\index.js:46:31
at Array.map ()
at Object.resolvePresetsOrPlugins (C:\Users\Administrator\AppData\Roaming\npm\node_modules@tarojs\cli\node_modules@tarojs\service\dist\utils\index.js:45:30)
at Kernel.resolvePlugins (C:\Users\Administrator\AppData\Roaming\npm\node_modules@tarojs\cli\node_modules@tarojs\service\dist\Kernel.js:90:36)
at Kernel.initPresetsAndPlugins (C:\Users\Administrator\AppData\Roaming\npm\node_modules@tarojs\cli\node_modules@tarojs\service\dist\Kernel.js:81:14)
at Kernel. (C:\Users\Administrator\AppData\Roaming\npm\node_modules@tarojs\cli\node_modules@tarojs\service\dist\Kernel.js:40:18)
at Generator.next ()
at C:\Users\Administrator\AppData\Roaming\npm\node_modules@tarojs\cli\node_modules@tarojs\service\dist\Kernel.js:8:71
at new Promise ()
(node:12848) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing
inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 2)
(node:12848) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

Insert picture description here
The solution is that the installed version is inconsistent

npm install -g @tarojs/[email protected]

That's it

Guess you like

Origin blog.csdn.net/weixin_45663264/article/details/114831042