DEV Community

Gem Cloud
Gem Cloud

Posted on

 

cross-env for front-end (Nextjs) on Windows 10 11

If you are doing front-end projects on windows 10 or 11.
specially, you want to run some of sample codes from GitHub!
Do not forget to install "npm i cross-env" on your project.

> npm i cross-env
Enter fullscreen mode Exit fullscreen mode

The "cross-env" helps us save a lot of time. otherwise the codes threw errors!
for example:

  1. read some of files from folder (markdown for blog etc.) on Nextjs

  2. use "NODE_ENV=development" on project.json, see below command about lingui.

    "__NoWorkOnWindow_lang:extract": "NODE_ENV=development lingui extract --clean",
    "lang:extract": "cross-env NODE_ENV=development lingui extract --clean",

Enter fullscreen mode Exit fullscreen mode

Happy Coding!

Oldest comments (0)

16 Libraries You Should Know as a React Developer

Being a modern React developer is not about knowing just React itself. To stay competitive, it is highly recommended to explore the whole ecosystem. This article contains some of the most useful React component libraries to speed up your developer workflow.