-
Notifications
You must be signed in to change notification settings - Fork 2
Can't use cli on windows #4
Comments
Maybe it could not create the larted-web because it contains the '-' sign, could you try lartedweb? |
Actually the name I used with cli is just larted. I just tried |
what happens if you try to run
It looks like this does crash somehow |
No problem with this command |
Hmm. I don't know how to fix it since I don't have a windows machine I would accept a PR which fixes this error! |
I experienced the same issue. @RichardLindhout could help you solve the problem? |
New version released. Does it work now? |
I personally tried using I had the same error mentioned above. So I ask you, which latest version are you referring to? Is there any way to specify the version in the command? |
npx always downloads latest version |
Therefore, I can confirm that on Windows it still does not work |
Released a newer version again. What is the result now? |
ok... the latest version completes the process and seems to work, but something went wrong with configuration/merging because if I try to run This is package.json at the end of the process (is that right?): {
"name":"ridgetest",
"version":"0.1.0",
"private":true,
"scripts":{
"android":"react-native run-android",
"ios":"react-native run-ios",
"start":"react-native start",
"test":"jest",
"lint":"eslint .",
"web:build":"react-app-rewired build",
"web:test":"react-app-rewired test",
"web:eject":"react-app-rewired eject",
"web":"react-app-rewired start"
},
"dependencies":{
"react":"16.13.1",
"react-native":"0.63.4"
},
"devDependencies":{
"@babel/core":"^7.8.4",
"@babel/runtime":"^7.8.4",
"@react-native-community/eslint-config":"^1.1.0",
"babel-jest":"^25.1.0",
"eslint":"^6.5.1",
"jest":"^25.1.0",
"metro-react-native-babel-preset":"^0.59.0",
"react-test-renderer":"16.13.1"
},
"jest":{
"preset":"react-native"
},
"eslintConfig":{
"extends":[
"react-app",
"react-app/jest"
]
},
"browserslist":{
"production":[
">0.2%",
"not dead",
"not op_mini all"
],
"development":[
"last 1 chrome version",
"last 1 firefox version",
"last 1 safari version"
]
}
} |
Strange it should be {
"name": "myappname",
"version": "0.1.0",
"private": true,
"scripts": {
"android": "react-native run-android",
"ios": "react-native run-ios",
"start": "react-native start",
"test": "jest",
"lint": "eslint .",
"web:build": "react-app-rewired build",
"web:test": "react-app-rewired test",
"web:eject": "react-app-rewired eject",
"web": "react-app-rewired start"
},
"dependencies": {
"react": "^17.0.1",
"react-dom": "^17.0.1",
"react-native": "0.63.4",
"react-native-web": "^0.14.10",
"react-scripts": "4.0.1"
},
"devDependencies": {
"@babel/core": "^7.12.10",
"@babel/runtime": "^7.12.5",
"@react-native-community/eslint-config": "^2.0.0",
"@testing-library/jest-dom": "^5.11.4",
"@testing-library/react": "^11.1.0",
"@testing-library/user-event": "^12.1.10",
"@types/react": "^17.0.0",
"@types/react-native": "^0.63.43",
"babel-jest": "^26.6.3",
"babel-plugin-import": "^1.13.3",
"customize-cra": "^1.0.0",
"eslint": "^7.16.0",
"jest": "^26.6.3",
"metro-react-native-babel-preset": "^0.64.0",
"react-app-rewired": "^2.1.8",
"react-test-renderer": "16.13.1",
"typescript": "^4.1.3"
},
"jest": {
"preset": "react-native"
},
"eslintConfig": {
"extends": [
"react-app",
"react-app/jest"
]
},
"browserslist": {
"production": [
">0.2%",
"not dead",
"not op_mini all"
],
"development": [
"last 1 chrome version",
"last 1 firefox version",
"last 1 safari version"
]
}
}
|
I think this line does not work on windows https://github.com/web-ridge/create-react-native-web-application/blob/main/src/index.ts#L169 |
I think I'll try out https://www.npmjs.com/package/cross-spawn |
I now use cross-spawn and I hope it will resolve the issues on Windows. I really like the help you're giving me ;) Can you try it again? |
mmh, there is still something wrong... the process now stops at this step: This is the error on shell: (node:12184) UnhandledPromiseRejectionWarning: Error: spawn yarn ENOENT
at notFoundError (C:\Users\JohnDoe\AppData\Roaming\npm-cache\_npx\12184\node_modules\create-react-native-web-application\node_modules\cross-spawn\lib\enoent.js:6:26)
at verifyENOENT (C:\Users\JohnDoe\AppData\Roaming\npm-cache\_npx\12184\node_modules\create-react-native-web-application\node_modules\cross-spawn\lib\enoent.js:40:16)
at ChildProcess.cp.emit (C:\Users\JohnDoe\AppData\Roaming\npm-cache\_npx\12184\node_modules\create-react-native-web-application\node_modules\cross-spawn\lib\enoent.js:27:25)
at Process.ChildProcess._handle.onexit (internal/child_process.js:272:12)
(node:12184) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:12184) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code. I apologize because I would like to help you with a pull request, but I don't know where to start 😅 |
Ok lol I use yarn to install extra packages can you install it? It is a npm alternative with less problems |
ok, I have installed anyway, now everything works correctly.. well done! 🥳 |
I agree |
I have added this to the README.md. Thanks for following up and testing 👍 ! |
Can't use the cli on windows 10 with node js 10 or 12:
The text was updated successfully, but these errors were encountered: