1

遵循react-rative-web上的指南后,我遇到了几个错误。

我首先创建了一个新项目:react-native init test --version 0.55.4

然后我安装了依赖项:

yarn add --dev babel-loader url-loader webpack webpack-cli webpack-dev-server babel-plugin-react-native-web
yarn add react react-dom react-native-web

复制了index.web.jsweb/webpack.config.js

执行命令后:

webpack-dev-server -d --config ./web/webpack.config.js --inline --hot --colors

我得到错误:

ERROR in ./index.web.js
    Module build failed (from ./node_modules/babel-loader/lib/index.js):
    Error: Cannot find module 'react-art'

好的。所以我安装了(可选?)模块yarn add react-art

下一次运行打印:

ERROR in ./index.web.js
    Module build failed (from ./node_modules/babel-loader/lib/index.js):
    Error: Plugin 0 specified in "base" provided an invalid property of "createElement"

现在我不知道该怎么办。我该如何解决这个错误(可能还有以下错误)?

4

0 回答 0