Closed jgwinner closed 7 years ago
What version of react-vr-cli are you running? If you're out of date, it should print a red error message saying "Current CLI version is 0.3.5, but the latest available version is 0.3.6" every time you run it.
This has already been updated in the latest CLI, here's the current contents of the latest package: https://unpkg.com/react-vr-cli@0.3.6/generators/package.json.generator.js
We can't automatically update your CLI generator for you due to the way npm / yarn work, so the best we can do is query npm, check if you have the latest version of the CLI, and print an error message if you don't with instructions on how to update.
You are right that the update instructions for existing apps need to include react and react-native as well. I've fixed that on the release.
Ouch - never noticed that error. I think it scrolled by, but I should have noticed it at the start. Sorry for that!
Updated! Whoo Hoo! That worked, I'm on 2.0.0
There are a few other differences in the CLI generated 2.0 and manually updated. I think the problem might have been in the dev-dependencies. I'll do some more testing on a manual upgrade.
Manually updated:
"dependencies": {
"ovrui": "~2.0.0",
"react": "~16.0.0",
"react-native": "~0.48.0",
"three": "^0.80.1",
"react-vr": "~2.0.0",
"react-vr-web": "~2.0.0"
},
"devDependencies": {
"babel-jest": "^19.0.0",
"babel-preset-react-native": "^1.9.1",
"jest": "^19.0.2",
"react-devtools": "^2.1.3",
"react-test-renderer": "~15.4.1",
"xopen": "1.0.0"
},
CLI generated:
"dependencies": {
"ovrui": "~2.0.0",
"react": "16.0.0",
"react-native": "~0.48.0",
"three": "^0.87.0",
"react-vr": "~2.0.0",
"react-vr-web": "~2.0.0"
},
"devDependencies": {
"babel-jest": "^19.0.0",
"babel-preset-react-native": "^1.9.1",
"jest": "^19.0.2",
"react-devtools": "^2.5.2",
"react-test-renderer": "16.0.0",
"xopen": "1.0.0"
},
When I generate an app, I did notice this:
+-- UNMET PEER DEPENDENCY react@16.0.0
If I run npm install in the generated 2.0.0 directory (with the updated CLI) I get errors, but it does run:
MazeGame200@0.0.1 F:\ReactVR\MazeGame200
+-- UNMET PEER DEPENDENCY react@16.0.0
`-- react-native@0.48.4
+-- babel-preset-react-native@2.1.0
`-- metro-bundler@0.11.0
`-- babel-preset-react-native@2.1.0
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.1.1 (node_modules\jest-haste-map\node_modules\sane\node_modules\fseven
ts):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.1.2: wanted {"os":"darwin","arch":"any"} (curren
t: {"os":"win32","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.1.1 (node_modules\metro-bundler\node_modules\sane\node_modules\fsevent
s):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.1.2: wanted {"os":"darwin","arch":"any"} (curren
t: {"os":"win32","arch":"x64"})
npm WARN react-native@0.48.4 requires a peer of react@16.0.0-alpha.12 but none was installed.
If I check the version of react in the react-vr-cli generated version, I get an error (but it does run!)
MazeGame200@0.0.1 F:\ReactVR\MazeGame200
`-- UNMET PEER DEPENDENCY react@16.0.0
npm ERR! peer dep missing: react@16.0.0-alpha.12, required by react-native@0.48.4
npm ERR! code 1
If I manually check node_modules\react, it seems to be:
"version": "16.0.0"
^^ That's a React Native issue, not something we can control. The error shouldn't actually prevent installing dependencies, though
I hear you. Should I open a bug there?
== John ==
No point, it's just a configuration annoyance that's resolved in 0.49. We'll make that upgrade in a couple weeks, it just requires a significant overhaul of our Animated implementation that I'm working on now.
That sounds interesting!
Ok, got it, thanks for taking a look.
== John ==
Added all updates to release notes, closing since there is no issue with the CLI
Description
Not sure if this is a bug or just something that isn't working yet
Expected behavior
react-vr init should install version 2.0.0
Actual behavior
react-vr init installs 1.4.0 of react-vr and react-vr-web
Reproduction
I've installed react-vr, react-vr-web and ovrui to 2.0.0 I've installed the dependencies, all in global mode.
I use react-vr init to create a new React-VR app. The app is not the current version. I've checked the code in 'generate' in react and it has these lines:
Solution
Update
react-vr-cli\generators\package.json.generator.js
to include the lines:PLEASE double check these versions; if I run npm list react-vr in the directory: