Browser-sync: index.min.js is missing from the latest version

Created on 29 Apr 2018  路  13Comments  路  Source: BrowserSync/browser-sync

Issue details

Error: ENOENT: no such file or directory, ........ node_modules\browser-sync\client\dist\index.min.js

Most helpful comment

Thanks all for the fast feedback :)

I had removed the compiled assets from the repo, with the aim of rebuilding them only when publishing - but I used an incorrect NPM lifecycle hook - oops!

It's fixed now though [email protected]

鉂わ笍

All 13 comments

Same problem here... Reload/Stream functions suddenly stopped work.

Same issue here, after updating to v2.24.0

Same issue. Error log as follows:

Error: ENOENT: no such file or directory, open '/Users/.../node_modules/browser-sync/client/dist/index.min.js'
    at Object.fs.openSync (fs.js:545:3)
    at Object.fs.readFileSync (fs.js:451:33)
    at /Users/.../node_modules/browser-sync/dist/snippet.js:87:29
    at /Users/.../node_modules/browser-sync/dist/client.js:52:35
    at Array.reduce (<anonymous>)
    at processItems (/Users/.../node_modules/browser-sync/dist/client.js:47:10)
    at /Users/.../node_modules/browser-sync/dist/client.js:80:22
    at call (/Users/.../node_modules/connect/index.js:239:7)
    at next (/Users/.../node_modules/connect/index.js:183:5)
    at next (/Users/.../node_modules/connect/index.js:161:14)

I began to see this error message after upgrading npm to v6.0.0; even with browsersync v2.18.15

But @Carlosdvp , if you check the Git history it was removed in one of the last commits:

https://github.com/BrowserSync/browser-sync/tree/master/client/dist

You are right @vinceshere I was looking through the node_modules for previous projects that I had been using browsersync with, and they were working fine because the contents for that folder were intact. The cause as far as I can tell is that the contents for the directory you mention are now gone.

To correct my previous comment: It has nothing to do with npm v6.0.0, tested old installs of browser-sync with npm v6 and they work fine

browser-sync/client/dist contents are missing in new installs of browser-sync, that is the cause for this error message. I just copied the missing files into the empty folder and now it's working fine

Please change this issue's title to something like:

"index.min.js is missing from the latest version"

Not trying to be a grammar nasty but at least it would be easier to understand if it were "does not" instead of "don't".

OMG =(((

HEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEELP!!!)))))

@dhffdh pin your version to the old one "browser-sync": "2.23.7",.

@huochunpeng THANK YOU =)

Thanks all for the fast feedback :)

I had removed the compiled assets from the repo, with the aim of rebuilding them only when publishing - but I used an incorrect NPM lifecycle hook - oops!

It's fixed now though [email protected]

鉂わ笍

@shakyShane I like the removal in general.

FYI, but it could create some trouble for some users (like contributors) who directly installs the package from git repo, if they use yarn or pnpm.

https://github.com/yarnpkg/yarn/issues/5235
https://github.com/pnpm/pnpm/issues/855

Was this page helpful?
0 / 5 - 0 ratings

Related issues

zewa666 picture zewa666  路  3Comments

pensierinmusica picture pensierinmusica  路  4Comments

kraf picture kraf  路  3Comments

danielverejan picture danielverejan  路  3Comments

sedubois picture sedubois  路  3Comments