我不熟悉Jhipster,React和React Native的第一次使用。尝试在上述命令上启动应用程序失败,并显示以下输出错误。我已经设法使用Jhipster + React开发了一个应用,现在尝试使用Ignite Jhipster开发它的React Native UI
➜ code git:(master) ✗ ignite new vimsmob --boilerplate ignite-jhipster
-----------------------------------------------
( ) (
)\ ) ( ( /( )\ ) * )
(()/( )\ ) )\()) (()/( ` ) /( (
/(_)) (()/( ((_)\ /(_)) ( )(_)) )\
(_)) /(_))_ _((_) (_)) (_(_()) ((_)
|_ _| (_)) __| | \| | |_ _| |_ _| | __|
| | | (_ | | .` | | | | | | _|
|___| \___| |_|\_| |___| |_| |___|
-----------------------------------------------
An unfair headstart for your React Native apps.
https://infinite.red/ignite
-----------------------------------------------
? igniting app vimsmob
✔ Generating a React Native client for JHipster apps
✔ Enter the path to your JHipster project root directory: · /Users/shahzad/git/vims/code/vims
Looking for /Users/shahzad/git/vims/code/vims/.yo-rc.json
Found JHipster config file at /Users/shahzad/git/vims/code/vims/.yo-rc.json
✔ Do you want to enable end-to-end tests with Detox? (y/N) · false
Using npm as the package manager
✔ added React Native 0.60.5 in 74.93s
✔ using the JHipster boilerplate
✔ project generated
✔ set up react-native-navigation for iOS/Android
✔ dependencies installed
JHipster config saved to your app's .jhipster folder.
⠙ ▸ running pod installan error occured while installing ignite-jhipster boilerplate.
{ Error: Command failed: cd ios && pod install && cd ..
at ChildProcess.exithandler (child_process.js:294:12)
at ChildProcess.emit (events.js:198:13)
at maybeClose (internal/child_process.js:982:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:259:5)
killed: false,
code: 1,
signal: null,
cmd: 'cd ios && pod install && cd ..',
stderr: '' }
error installing boilerplate
➜ code git:(master) ✗
➜ code git:(master) ✗ node -v
v10.17.0
➜ code git:(master) ✗ npm -v
6.11.3
➜ code git:(master) ✗ react-native -v
react-native-cli: 2.0.1
➜ vimsmob git:(master) ✗ pwd
/Users/shahzad/git/vims/code/vimsmob
版本:
- Ignite JHipster Version: 3.3.1
- `ignite doctor` output:
➜ vimsmob git:(master) ✗ ignite doctor
System
platform darwin
arch x64
cpu 12 cores Intel(R) Core(TM) i7-8850H CPU @ 2.60GHz
directory vimsmob /Users/shahzad/git/vims/code/vimsmob
JavaScript
node 10.17.0 /usr/local/bin/node
npm 6.11.3 /usr/local/bin/npm
yarn - not installed
Ignite
ignite-cli 3.3.1 /usr/local/bin/ignite
ignite src build /usr/local/lib/node_modules/ignite-cli/build
generators {"entity":"ignite-jhipster","import-jdl":"ignite-jhipster","upgrade":"ignite-jhipster"}
Android
java 11.0.2 /Users/shahzad/.sdkman/candidates/java/current/bin/java
android home - undefined
iOS
xcode -
cocoapods 1.8.4 /usr/local/bin/pod
项目目录树
➜ vimsmob git:(master) ✗ tree -L 3
.
├── package-lock.json
├── package.json
└── vimsmob
├── README.md
├── android
│ ├── app
│ ├── build.gradle
│ ├── gradle
│ ├── gradle.properties
│ ├── gradlew
│ ├── gradlew.bat
│ └── settings.gradle
├── app
│ ├── config
│ ├── modules
│ ├── navigation
│ └── shared
├── app.json
├── babel.config.js
├── fastlane
│ ├── Appfile
│ ├── Fastfile
│ └── Matchfile
├── ignite
│ ├── ignite.json
│ └── plugins
├── index.js
├── ios
│ ├── Podfile
│ ├── Pods
│ ├── vimsmob
│ ├── vimsmob-tvOS
│ ├── vimsmob-tvOSTests
│ ├── vimsmob.xcodeproj
│ └── vimsmobTests
├── metro.config.js
├── package-lock.json
├── package.json
├── patches
│ ├── @storybook+react-native+5.2.1.patch
│ ├── README.md
│ └── tcomb-form-native+0.6.20.patch
├── storybook
│ ├── addons.js
│ ├── index.js
│ ├── rn-addons.js
│ └── stories.js
└── test
├── setup.js
└── spec
https://github.com/ruddell/ignite-jhipster/blob/v3.3.1/src/boilerplate/index.js第224行似乎是导致此问题的原因
我试图使用/usr/local/lib/node_modules/ignite-jhipster/src/boilerplate/index.js中的固定路径更新此文件,但是在项目中,这些更改未反映在生成的项目中。
答案 0 :(得分:0)
在/Application/Xcode.app上->确保您是Xcode.app。我已经做了很多研发工作。就我而言,我的Mac上有多个Xcode,因此我已将其重命名为Xcode 11.4.1.app和Xcode 10.4.app,因此我将Xcode 11.4.1.app重命名为Xcode.app,然后繁荣发展,工作正常!