web command not found
Closed this issue · 6 comments
Hi @deepansh946
Could you please share the package.json
file in the root of the project?
Also please run npx crnwa --version
to see which version you have.. if you installed the package globally before it might be an old version
@deepansh946 that's a bit strange since I have it working and the package.json file looks like this:
{
"name": "myapp",
"version": "0.0.1",
"private": true,
"scripts": {
"android": "react-native run-android",
"ios": "react-native run-ios",
"start": "react-native start",
"lint": "eslint .",
"web": "react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test",
"eject": "react-scripts eject"
},
"dependencies": {
"react": "^17.0.1",
"react-native": "^0.63.3",
"react-dom": "^17.0.1",
"react-native-web": "^0.14.8",
"react-scripts": "4.0.0",
"web-vitals": "^0.2.4"
},
"devDependencies": {
"@babel/core": "^7.8.4",
"@babel/runtime": "^7.8.4",
"@react-native-community/eslint-config": "^1.1.0",
"metro-react-native-babel-preset": "^0.59.0",
"react-test-renderer": "17.0.1"
},
"browserslist": {
"production": [
">0.2%",
"not dead",
"not op_mini all"
],
"development": [
"last 1 chrome version",
"last 1 firefox version",
"last 1 safari version"
]
}
}
with the same command you shared.
only thing I can think of is maybe there's a limitation since the template package is not included as a dependency of the core package.. I would update and request later for you to check it if you could.
Thanks again for posting.. could you share your nodejs and npm versions? it might be related
@deepansh946 I just release a minor version 0.16.3
should be up shortly, would you please run
npx crnwa --version
to verify you're getting the new version and then if you do get 0.16.3
please try again the steps to reproduce that you mentioned above?
could you try please this command?
npx react-native init MyApp --template react-native-template-react-native-web
this is basically using the react-native cli to start a react native project with a template.. it's also the template we use here in the project.
if it doesn't work I'd suggest posting an issue linking to this one at https://github.com/react-native-community/cli since we're using their cli maybe they would know the reason.
Thanks again for posting