Consider adding `cross-env` as devDependencies for better development experience
See original GitHub issueIs your feature request related to a problem? Please describe.
storybook
script requires you to set environment variables called STORYBOOK_VUE_DEV_TOOLS
. Unfortunately, npm
scripts cannot set environment variables on Windows.
To solve this issue, I suggest adding cross-env before setting the environment variables. cross-env
works on Windows, Linux, and macOS.
Issue Analytics
- State:
- Created 3 years ago
- Reactions:2
- Comments:5 (4 by maintainers)
Top Results From Across the Web
Laravel 5.4 'cross-env' Is Not Recognized as an Internal or ...
I'm trying to run npm run dev for Laravel Mix and I get this error: > @ dev D:\projects\ptcs > cross-env NODE_ENV=development webpack...
Read more >bug* Yarn will not install devDependencies when NODE_ENV ...
My current workaround is to use NODE_ENV=development yarn . Proposed solutions. Add a flag which forces all dependencies to be installed yarn ...
Read more >cross-env not found on npm run dev - Laracasts
When I run npm run dev, I get the cross-env not found error. My environment, all freshly ... Ran vagrant box add laravel/homestead...
Read more >cross-env - npm
Run scripts that set and use environment variables across platforms. Latest version: 7.0.3, last published: 2 years ago.
Read more >dependencies vs devDependencies strategy. - Drupal
Problem/Motivation Currently, we don't have a consistent pattern of when a node dependency is a devDependency, versus a dependency.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I haven’t tried WSL2 yet since I have bad experiences from WSL. I’ll give it a shot later.
Nonetheless, I’ll create a pull request to address this issue as
cross-env
ensures maximum compatibility in most machines.That statement simply hasn’t been true for the last 10 years. There are some low-level differences if you’re interacting with the shell languages directly, like how Windows’ PowerShell and the many *nix’s shell variants use a different syntax for environment variables but that and others are easily handleable.
There’s nothing wrong with developing on Windows without WSL(2) - it has excellent dev tooling and support like any other OS.