Я пытаюсь установить шаблон в React native под Expo.
npm установить, npm запустить, npm установить --g cross-env,
I удалил папку "node_modules" и "package-lock. json"
и в моем файле "package. json" я добавил "NODE_PATH =. / sr" в стартовой строке
, как указано в документации
, но мое приложение не запускается, и я получил некоторые ошибки
Инструменты разработчика: - Визуальный код - Версия узла: v12.13.0 - npm : 6.12.0
это мой json код:
{
"name": "rn-material-kit-free",
"version": "1.4.0",
"description": "Material Kit React Native. Coded by Creative Tim",
"main": "node_modules/expo/AppEntry.js",
"private": true,
"scripts": {
"start": "cross-env REACT_EDITOR=code expo start",
"android": "cross-env REACT_EDITOR=code expo start --android",
"ios": "cross-env REACT_EDITOR=code expo start --ios",
"eject": "expo eject",
"test": "node ./node_modules/jest/bin/jest.js --watchAll"
},
"jest": {
"preset": "jest-expo"
},
"dependencies": {
"check-node-version": "^4.0.2",
"expo": "^35.0.0",
"expo-asset": "~7.0.0",
"expo-font": "~7.0.0",
"expo-linear-gradient": "~7.0.0",
"galio-framework": "^0.6.3",
"ipfs-api": "^26.1.2",
"react": "16.8.3",
"react-native": "https://github.com/expo/react-native/archive/sdk-35.0.0.tar.gz",
"react-native-gesture-handler": "~1.3.0",
"react-native-modal-dropdown": "^0.6.2",
"react-navigation": "^3.11.0"
},
"devDependencies": {
"babel-preset-expo": "^7.0.0",
"cross-env": "^5.2.0",
"expo-cli": "^2.4.0",
"jest-expo": "^35.0.0"
},
"bugs": {
"url": "https://github.com/creativetimofficial/material-kit-react-native/issues"
},
"homepage": "https://demos.creative-tim.com/material-kit-react-native/"
}
Это моя консольная ошибка
PS C:\Users\campus\Material-kit-react-native-master> npm start
> rn-material-kit-free@1.4.0 start C:\Users\campus\Material-kit-react-native-master
> cross-env REACT_EDITOR=code expo start
┌─────────────────────────────────────────────────────────────┐
│ │
│ There is a new version of expo-cli available (3.13.1). │
│ You are currently using expo-cli 2.21.2 │
│ Run `npm install -g expo-cli` to get the latest version │
│ │
└─────────────────────────────────────────────────────────────┘
Starting project at C:\Users\campus\Material-kit-react-native-master
Expo DevTools is running at http://localhost:19002
Opening DevTools in the browser... (press shift-d to disable)
ConfigUtils.configFilenameAsync is not a function
Set EXPO_DEBUG=true in your env to view the stack trace.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! rn-material-kit-free@1.4.0 start: `cross-env REACT_EDITOR=code expo start`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the rn-material-kit-free@1.4.0 start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\campus\AppData\Roaming\npm-cache\_logs\2020-02-13T14_59_57_306Z-debug.log
PS C:\Users\campus\Material-kit-react-native-master>