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.

Dependencies missing for install & Fail to exec dev script

See original GitHub issue

Observed Behavior

After running npm run dev recieved message “Failed to exec dev script”

Suspected Cause

Dependencies are missing for fresh installation backdating to against an exisiting Laravel 5.3 app

Reproduction Steps

Using an existing Laravel 5.3 app (all API driven, but it would be good to add a simple UI to update the data).

  1. Delete gulpfile.js
  2. Delete yarn.lock file
  3. Recursively delete node_modules directory
  4. Run yarn add laravel-mix
  5. Copy webpack.config.js and webpack.mix.js to home directory.
  6. Copy scripts from npm-scripts laravel-mix documentation to packages.json
  7. Run npm run dev

Local Stack

  • Node v6.3.1
  • NPM v4.1.1

Work Around

I was able to work around the issue and get to a working instance by:

  1. Manually install webpack 2.2.0-rc.4 yarn add webpack@2.2.0-rc.4
  2. Manually install graceful-fs yarn add graceful-fs
  3. Run webpack --progress --hide-modules instead of the script

NPM Error Log

0 info it worked if it ends with ok
1 verbose cli [ '/usr/local/Cellar/node/6.3.1/bin/node',
1 verbose cli   '/Users/dfurman/.node/bin/npm',
1 verbose cli   'run',
1 verbose cli   'dev' ]
2 info using npm@4.1.1
3 info using node@v6.3.1
4 verbose run-script [ 'predev', 'dev', 'postdev' ]
5 info lifecycle @~predev: @
6 silly lifecycle @~predev: no script for predev, continuing
7 info lifecycle @~dev: @
8 verbose lifecycle @~dev: unsafe-perm in lifecycle true
9 verbose lifecycle @~dev: PATH: /Users/dfurman/.node/lib/node_modules/npm/bin/node-gyp-bin:/Users/dfurman/Code/web/routing/node_modules/.bin:/Users/dfurman/.node/bin:/Users/dfurman/.composer/vendor/bin:/usr/local/sbin:/usr/local/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin:/usr/local/git/bin:/usr/local/MacGPG2/bin
10 verbose lifecycle @~dev: CWD: /Users/dfurman/Code/web/routing
11 silly lifecycle @~dev: Args: [ '-c',
11 silly lifecycle   'cross-env NODE_ENV=development webpack --watch --progress --hide-modules' ]
12 info lifecycle @~dev: Failed to exec dev script
13 verbose stack Error: @ dev: `cross-env NODE_ENV=development webpack --watch --progress --hide-modules`
13 verbose stack spawn ENOENT
13 verbose stack     at ChildProcess.<anonymous> (/Users/dfurman/.node/lib/node_modules/npm/lib/utils/spawn.js:33:16)
13 verbose stack     at emitTwo (events.js:106:13)
13 verbose stack     at ChildProcess.emit (events.js:191:7)
13 verbose stack     at maybeClose (internal/child_process.js:852:16)
13 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:215:5)
14 verbose pkgid @
15 verbose cwd /Users/dfurman/Code/web/routing
16 error Darwin 15.6.0
17 error argv "/usr/local/Cellar/node/6.3.1/bin/node" "/Users/dfurman/.node/bin/npm" "run" "dev"
18 error node v6.3.1
19 error npm  v4.1.1
20 error file sh
21 error code ELIFECYCLE
22 error errno ENOENT
23 error syscall spawn
24 error @ dev: `cross-env NODE_ENV=development webpack --watch --progress --hide-modules`
24 error spawn ENOENT
25 error Failed at the @ dev script 'cross-env NODE_ENV=development webpack --watch --progress --hide-modules'.
25 error Make sure you have the latest version of node.js and npm installed.
25 error If you do, this is most likely a problem with the  package,
25 error not with npm itself.
25 error Tell the author that this fails on your system:
25 error     cross-env NODE_ENV=development webpack --watch --progress --hide-modules
25 error You can get information on how to open an issue for this project with:
25 error     npm bugs
25 error Or if that isn't available, you can get their info via:
25 error     npm owner ls
25 error There is likely additional logging output above.
26 verbose exit [ 1, true ]

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:17 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
nmfzonecommented, Jan 14, 2017

@rikless hmmm 😕 So, I’m not wrong about it 😉 Anyway, good to see it works.

@JeffreyWay I think to be clear, need some note in the docs before using Mix, make sure “you” have cross-env and webpack globally. If I’ve enough time, maybe I’ll send PR.

1reaction
nmfzonecommented, Jan 18, 2017

@ricardocanelas Whoops, nope. Good to see it works.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Dependencies missing for install & Fail to exec dev script #94
Observed Behavior. After running npm run dev recieved message "Failed to exec dev script". Suspected Cause. Dependencies are missing for ...
Read more >
npm run dev script error - Stack Overflow
a friend and I figured it out. Weirdly enough, I had to use the command: npm link webpack to link it in from...
Read more >
NPM Script Error: <dependency> command not found - Medium
After upgrading Nodejs and NPM via nvm install --lts , I deleted the project's node_modules subdirectory and executed npm install once again.
Read more >
Common errors | npm Docs
You are trying to install on a drive that either has no space, or has no permission to write. Free some disk space...
Read more >
Troubleshooting - Puppeteer
Make sure all the necessary dependencies are installed. You can run ldd chrome | grep not on a Linux machine to check which...
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