Ran into an issue where I kept getting an ‘Error: Cannot find build/webpack.dev.conf.js’ when trying to run ‘npm run dev’ on a Vue.js webpack project, like the following:

nalis-MacBook-Air:dashv2 nali$ npm run dev

> dashv2@1.0.0 dev /Users/nali/Downloads/test/playground/dashv2
> webpack-dev-server --inline --progress --config build/webpack.dev.conf.js

module.js:557
    throw err;
    ^

Error: Cannot find module '/Users/nali/Downloads/test/playground/dashv2/build/webpack.dev.conf.js'
    at Function.Module._resolveFilename (module.js:555:15)
    at Function.Module._load (module.js:482:25)
    at Module.require (module.js:604:17)
    at require (internal/module.js:11:18)
    at requireConfig (/Users/nali/Downloads/test/playground/dashv2/node_modules/webpack/bin/convert-argv.js:97:18)

The problem was that I was checking out a folder that had a lot of different directories, with code written in different languages, and the top level .gitignore included ‘build/’ for Python. Either add ‘!build/’ to a .gitignore in the root folder of the node project when checking it in…or do a better job separating projects and folders like a sensible person.

Make Haste Slowly

Are you tired of all the bullshit business, marketing and technology news out there? Do you have a bad case of FOMO? The signal to noise ratio is entirely out of whack nowadays. All the incentives are misaligned. If you want an unbiased view on on the intersection of technology, marketing, products/services and the impacts on consumers, businesses, and society in general, sign up below.

You have Successfully Subscribed!