0

我只是想尝试 vue-native。但是我得到这个错误。 捆绑失败:TypeError:无法读取未定义的属性“transformFile”

这是我的 package.json 文件

{
  "name": "vueNativeDeneme",
  "version": "0.0.1",
  "private": true,
  "scripts": {
    "start": "node node_modules/react-native/local-cli/cli.js start",
    "test": "jest"
  },
  "dependencies": {
    "react": "16.8.3",
    "react-native": "0.59.10",
    "vue-native-core": "^0.1.4",
    "vue-native-helper": "^0.1.4"
  },
  "devDependencies": {
    "@babel/core": "7.6.4",
    "@babel/runtime": "7.6.3",
    "babel-jest": "24.9.0",
    "jest": "24.9.0",
    "metro-react-native-babel-preset": "0.56.3",
    "react-test-renderer": "16.8.3"
  },
  "jest": {
    "preset": "react-native"
  }
}

我怎样才能解决这个问题?

4

1 回答 1

1

更改您的 devDependencies:

"devDependencies":{   
    "@babel/core": "^7.0.0",
    "@babel/preset-env": "^2.0.0-alpha.20",
    "babel-preset-expo": "~8.0.0",
    "vue-native-scripts": "0.0.16"
  },

问题解决了。

于 2020-02-10T22:40:03.850 回答