npx

The 'npx create-react-app command' doesn't correctly work

为君一笑 提交于 2021-02-11 13:53:33
问题 As we know, there are a lot of questions in this community about npx create-react-app , but none of them couldn't solve my problem. I had used npx create-react-app several times and I didn't have any problem with it, but from a couple of days ago when I run this command, my project is created but in its folder, there isn't any files and folders that I expected to exist in it (except node_modules, package.json, and yarn.lock). For solving my problem, I updated Node.js and uninstall and

“npx create-react-app appname” not working

可紊 提交于 2021-02-10 23:59:26
问题 When I run npx create-react-app appname I get the following error message: You are running `create-react-app` 4.0.0, which is behind the latest release (4.0.1). We no longer support global installation of Create React App. Please remove any global installs with one of the following commands: - npm uninstall -g create-react-app - yarn global remove create-react-app The latest instructions for creating a new app can be found here: https://create-react-app.dev/docs/getting-started/ npm ERR! code

“npx tsc --version” reports different TypeScript version inside virtual machine

ぃ、小莉子 提交于 2021-02-09 02:57:48
问题 I want to be able to run npx tsc on my project on both my host + guest operating systems. But the guest is using a different (older) version of tsc - and I'm not sure where it's coming from. My setup: Host OS: Windows 10 Guest OS: Debian 9 I'm using VirtualBox, and the guest is mounting the host's files using VirtualBox's "shared folders" feature - so it doesn't have a separate copy of the project files - my project is accessed through shared folders at all times. I do NOT have Typescript

“npx tsc --version” reports different TypeScript version inside virtual machine

…衆ロ難τιáo~ 提交于 2021-02-09 02:56:09
问题 I want to be able to run npx tsc on my project on both my host + guest operating systems. But the guest is using a different (older) version of tsc - and I'm not sure where it's coming from. My setup: Host OS: Windows 10 Guest OS: Debian 9 I'm using VirtualBox, and the guest is mounting the host's files using VirtualBox's "shared folders" feature - so it doesn't have a separate copy of the project files - my project is accessed through shared folders at all times. I do NOT have Typescript

Passing a same random number to all tests in Cypress

左心房为你撑大大i 提交于 2021-01-29 20:41:54
问题 So I have two tests - Test1.spec.js and Test2.spec.js and I want that with every test run a random number should be generated and the same random number should be used in both the specs. I wrote a simple Math.random() function for this under support/index.js Cypress.config('UniqueNumber', `${Math.floor(Math.random() * 10000000000000)}`) And in the tests I am writing as: cy.get('locator').type(Cypress.config('UniqueNumber')) When I am trying to execute the tests using the cypress app npm

Create-react-app returns “Cannot find module 'rxjs'”

风流意气都作罢 提交于 2021-01-29 09:28:51
问题 I've just installed NodeJS and NPM in a new machine. I added rxjs package in all my existing projects in order to make then start properly. However, when I run create-react-app - using npm globally or npx - I receive "Error: Cannot find module 'rxjs' ". Seems like rxjs is a new dependency of something (considering it's affecting old projects too). I have already changed Node version to 8, 10 and 12. Reinstalled NPM, changed CRA version to 2.x.x and the trouble persists. How can I use CRA

Tailwind in React project - getting “Cannot find module 'autoprefixer'” error during setup

岁酱吖の 提交于 2021-01-05 07:08:38
问题 I'm following the documentation for setting up Tailwind in a React project over on https://tailwindcss.com/docs/guides/create-react-app. I've been following the steps, but when I get to the part where I'm supposed to run npx tailwindcss init in order to generate a tailwind.config.js file, I get the following error: Cannot find module 'autoprefixer' Require stack: - C:\Users\[user]\AppData\Roaming\npm-cache\_npx\16096\node_modules\tailwindcss\lib\cli\commands\build.js - C:\Users\[user]\AppData

Tailwind in React project - getting “Cannot find module 'autoprefixer'” error during setup

蓝咒 提交于 2021-01-05 07:04:30
问题 I'm following the documentation for setting up Tailwind in a React project over on https://tailwindcss.com/docs/guides/create-react-app. I've been following the steps, but when I get to the part where I'm supposed to run npx tailwindcss init in order to generate a tailwind.config.js file, I get the following error: Cannot find module 'autoprefixer' Require stack: - C:\Users\[user]\AppData\Roaming\npm-cache\_npx\16096\node_modules\tailwindcss\lib\cli\commands\build.js - C:\Users\[user]\AppData

I'm having a problem that can't create react app using npx command

别说谁变了你拦得住时间么 提交于 2020-08-20 12:09:34
问题 I can't use npx create-react-app <projectname> to create my react project. The console give out this: Must use import to load ES Module: C:\Users\user\AppData\Roaming\npm-cache\_npx\4536\node_modules\create-react-app\node_modules\is-promise\index.js // require() of ES modules is not supported. // require() of C:\Users\user\AppData\Roaming\npm-cache\_npx\4536\node_modules\create-react-app\node_modules\is-promise\index.js from C:\Users\user\AppData\Roaming\npm-cache\_npx\4536\node_modules