question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Help Requested From Windows Users

See original GitHub issue

Hey, everyone. I could use some help from Windows users. If you have the time, would you mind doing:

laravel new example
npm install
npm run dev

Did you get an error related to “node_modules not being an external command”, or anything along those lines? If so, can you try running a variant of this command?

node node_modules/cross-env/bin/cross-env.js NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js

This ends up being more complicated, because Yarn has this weird thing where it doesn’t symlink bin installs to node_modules/.bin. So, if you install Mix with NPM, no problem. But if you do it through Yarn, the NPM script can’t find webpack or webpack-dev-server.

So we updated the NPM script to specify the full path to these executable, but now some Windows users are having issues, and I’m not quite sure what the root of it is.

Any help would be appreciated! 😃

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:10
  • Comments:50 (8 by maintainers)

github_iconTop GitHub Comments

31reactions
cklmercercommented, Jan 25, 2017

No error on my end.

12reactions
stephandesouzacommented, Mar 6, 2017

cross-env made a BC from version 3.1 to 3.2 and changed the “bin” folder from

node_modules/cross-env/bin

to

node_modules/cross-env/dist/bin

This issues when upgrading yarn/npm, or a clean install with npm. A clean install of yarn dont make version upgrade, so it read the version from yarn.lock.

So might the package.json edited to persist this change:

 "scripts": {
    "dev": "node node_modules/cross-env/dist/bin/cross-env.js NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js",
    "watch": "node node_modules/cross-env/bin/dist/cross-env.js NODE_ENV=development node_modules/webpack/bin/webpack.js --watch --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js",
    "watch-poll": "node node_modules/cross-env/dist/bin/cross-env.js NODE_ENV=development node_modules/webpack/bin/webpack.js --watch --watch-poll --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js",
    "hot": "node node_modules/cross-env/dist/bin/cross-env.js NODE_ENV=development node_modules/webpack-dev-server/bin/webpack-dev-server.js --inline --hot --config=node_modules/laravel-mix/setup/webpack.config.js",
    "production": "node node_modules/cross-env/dist/bin/cross-env.js NODE_ENV=production node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js"
  },
Read more comments on GitHub >

github_iconTop Results From Across the Web

Solve PC problems remotely with Remote Assistance and ...
Go to the search box and enter remote assistance, then select Invite someone to connect to your PC and help you, or offer...
Read more >
Use Quick Assist to help users - Windows Client Management
Quick Assist is a Microsoft Store application that enables a person to share their device with another person over a remote connection. Your ......
Read more >
Solve PC problems over a remote connection
To help someone you know by using Quick Assist · Select Start , enter Quick Assist, then select it in the list of...
Read more >
Fix a corrupted user profile in Windows - Microsoft Support
Open Microsoft Management Console by selecting Start , typing mmc into the search box, and then pressing Enter. If you're prompted for an...
Read more >
Receive Remote Assistance Support from Microsoft
Remote Assistance Support from Microsoft allows a Microsoft support professional in another location to view your computer screen and work on your computer ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found