score:6
according the documentation the syntax for npx is:
npx [options] <command>[@version] [command-arg]...
if you want react version 16.7 you have to find out which version of create-react-app installs react 16.7 because the version numbers are not the same. if i'm correct version 3.4.1 of create-react-app installs the latest version of react before they introduce hooks.
can simply run:
npx create-react-app@3.4.1 my-app
score:0
some packages may use a different name for the package and the tool, causing some forms of the version specifier to fail when the plain command works:
$ npx uglifyjs --version
uglify-js 3.14.4
$ npx uglifyjs@3.10.0 --version
npm err! code etarget
npm err! notarget no matching version found for uglifyjs@3.10.0.
npm err! notarget in most cases you or one of your dependencies are requesting
npm err! notarget a package version that doesn't exist.
[..]
install for [ 'uglifyjs@3.10.0' ] failed with code 1
in this case, using -p
/ --package
, or specifying the package name instead, will allow npx to work as expected:
$ npx --package uglify-js@3.10.0 uglifyjs --version
npx: installed 1 in 0.631s
uglify-js 3.10.0
$ npx uglify-js@3.10.0 --version
npx: installed 1 in 0.524s
uglify-js 3.10.0
undefined
(nb: the first npx uglifyjs
only works when inside a project that has had uglify-js
added to the package.json file.)
Source: stackoverflow.com
Related Query
- How create a react app with a specific version using the npx command?
- How to create react app using create-react-app with reactjs 15 version
- How to create a react project with specific version of create-react-app?
- Using LESS CSS with the latest Create React App
- Disable the bundle.js bundling file Webpack creates in React using Create React App or Craco? Or at least get 'Performance' to work with source maps
- How to determine the order of css in my create react app build with webpack and customize-cra?
- How can I render the react app with redux using the ReactJS.NET?
- How can I get rid of the `Node "13.0.0-nightly20190802452b393c1f"` so that I can be able to create a react app using the `create-react-app` tool?
- How can I find the input with a specific ID using the React Testing Library?
- How to organize imports in a React App with three.js (without using the window object)?
- I am trying to create a react app using the "npx/npm create-react-app hello" command and got this whole message
- I'm having a problem that can't create react app using npx command
- How to create a React app directly in the current folder
- How to create multiple page app using react
- How to mock history.push with the new React Router Hooks using Jest
- How to detect the device on React SSR App with Next.js?
- How to inject port and host using ENV variable in Create React App Proxy settings?
- How to compress the files using gzip in react app
- What's the easiest way to use Create React App with Relay?
- How to create a preview (Image and description) to the Url when shared link on Social media,Gmail and Skype using React JS?
- How to read console.log from a mounted component with Enzyme and Jest in Create React App
- how to use .env.qa or .env.staging with create react app
- How to get the element with the testid using react testing library?
- how to config create react app with worker-loader
- How to use Turborepo for an existing react app created with Create React App in order to make it a monorepo?
- Create React App with an older version of node
- How to fix 'The command "npm install" exited with code 1' error when building the ASP.NET Core app with React?
- How to check Current version of React using command prompt
- How to apply react-native-linear-gradient for the entire app background with React Native
- React app showing page with "404 the requested path could not be found" when using Apache
More Query from same tag
- React Bootstrap Form.Check with Formik
- React Number Format Styling
- How to get all rows and filter rows from ag grid
- How do i pull data from redux state in react
- window is undefined when use react server rendering
- Adding event listener to window, after clicking on button
- Front end design for RESTful Web API
- Replace Yup with custom function for basic validation
- Awaiting for a for loop to end to continue function in javascript
- What is the difference between reactjs vs nextjs
- react-pdf library is giving error at gatsby build time
- Reactjs Cannot update the value of provision category_price
- Map method is not rendering components in React.js
- React ant design reset only one input filed
- Sending streams as response of a axios request
- how to bring all the pictures from a collection in firebase?
- MUI Autocomplete with Select All
- How to sort or create a new array by grouping year and data
- DIV onClick Pass Array to Function in ReactJS
- Running Firebase code when closing tab (React)
- did i install create-react-app incorrectly?
- How to get data from an object with arrays/strings and then pass that data to a React component
- How to access ReactJS property in JavaScript function
- Tree Table - Setting children on react.js
- map initialValues prop dynamically with nested objects
- Use React-Router browserHistory, Webpack 2 historyApiFallback and Node
- How to avoid CSS conflicts in ReactJs
- change Usestate Object with prop
- Can I preload an image for a component before it gets used in nextjs
- Access Gatsby Component from a function