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

gemcloud

Gem Cloud

Posted on December 29, 2021

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!

💖 💪 🙅 🚩
gemcloud
Gem Cloud

Posted on December 29, 2021

Join Our Newsletter. No Spam, Only the good stuff.

Sign up to receive the latest update from our blog.

Related