Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

index.min.js is missing from the latest version #1549

Closed
7iomka opened this issue Apr 29, 2018 · 22 comments
Closed

index.min.js is missing from the latest version #1549

7iomka opened this issue Apr 29, 2018 · 22 comments

Comments

@7iomka
Copy link

7iomka commented Apr 29, 2018

Issue details

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

@7iomka 7iomka changed the title Latest version on npm don't have index file Latest version (inclusive on npm) don't have index file Apr 29, 2018
@vinceshere
Copy link

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

@darkzairen
Copy link

Same issue here, after updating to v2.24.0

@huijing
Copy link

huijing commented Apr 30, 2018

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)

@Carlosdvp
Copy link

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

@vinceshere
Copy link

vinceshere commented Apr 30, 2018

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

@Carlosdvp
Copy link

Carlosdvp commented Apr 30, 2018

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

@inspector71
Copy link

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".

@dhffdh
Copy link

dhffdh commented Apr 30, 2018

OMG =(((

@dhffdh
Copy link

dhffdh commented Apr 30, 2018

HEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEELP!!!)))))

@3cp
Copy link

3cp commented Apr 30, 2018

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

@dhffdh
Copy link

dhffdh commented Apr 30, 2018

@huochunpeng THANK YOU =)

@shakyShane
Copy link
Contributor

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 browser-sync@2.24.1

❤️

@3cp
Copy link

3cp commented Apr 30, 2018

@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.

yarnpkg/yarn#5235
pnpm/pnpm#855

@7iomka 7iomka changed the title Latest version (inclusive on npm) don't have index file index.min.js is missing from the latest version Apr 30, 2018
@wasong
Copy link

wasong commented May 19, 2022

@shakyShane Hi, I think this issue might be revived again from the latest release v2.27.10. I ras running v2.27.9 in my projects and started to get this error recently.

@martinpring
Copy link

@shakyShane Same for me. I started to see this problem (missing index.min.js) when upgrading to v2.27.10.

@gerbsen
Copy link

gerbsen commented Jun 17, 2022

Same here in my new jHipster project with "browser-sync": "2.27.9",

@krmahadevan
Copy link

I also experienced the same issue when using JHipster to create a new standalone app using browser-sync version 2.27.9. For now I have went back to pinning to an older version in the package.jsonviz., "browser-sync": "2.24.1"

@thienleminh1982
Copy link

thienleminh1982 commented Jun 23, 2022

Hello guys,

  • I ran into the exactly same problem when using JHipster as well, when in package.json : "browser-sync": "2.27.9", and when run npm install first time (no node_modules exists), it will generate package-lock.json with this dependency of browser-sync-client

"browser-sync-client": {
"version": "2.27.10",
"resolved": "https://registry.npmjs.org/browser-sync-client/-/browser-sync-client-2.27.10.tgz",
"integrity": "sha512-KCFKA1YDj6cNul0VsA28apohtBsdk5Wv8T82ClOZPZMZWxPj4Ny5AUbrj9UlAb/k6pdxE5HABrWDhP9+cjt4HQ==",
"dev": true,
"requires": {
"etag": "1.8.1",
"fresh": "0.5.2",
"mitt": "^1.1.3",
"rxjs": "^5.5.6",
"typescript": "^4.6.2"
},

Error: Cannot find module 'browser-sync-client/dist/index.min.js'
Require stack:
-myproject/node_modules/browser-sync/dist/snippet.js
-myproject/node_modules/browser-sync/dist/hooks.js
-myproject/node_modules/browser-sync/dist/browser-sync.js
-myproject/node_modules/browser-sync/dist/index.js
-myproject/node_modules/browser-sync-webpack-plugin/lib/BrowserSyncPlugin.js
-myproject/node_modules/browser-sync-webpack-plugin/index.js
-myproject/webpack/webpack.custom.js
-myproject/node_modules/@angular-builders/custom-webpack/dist/utils.js
-myproject/node_modules/@angular-builders/custom-webpack/dist/custom-webpack-builder.js
-myproject/node_modules/@angular-builders/custom-webpack/dist/transform-factories.js
-myproject/node_modules/@angular-builders/custom-webpack/dist/generic-browser-builder.js
-myproject/node_modules/@angular-builders/custom-webpack/dist/dev-server/index.js
-myproject/node_modules/@angular/cli/node_modules/@angular-devkit/architect/node/node-modules-architect-host.js
-myproject/node_modules/@angular/cli/node_modules/@angular-devkit/architect/node/index.js
-myproject/node_modules/@angular/cli/models/architect-command.js
-myproject/node_modules/@angular/cli/commands/serve-impl.js
-myproject/node_modules/@angular-devkit/schematics/tools/export-ref.js
-myproject/node_modules/@angular-devkit/schematics/tools/index.js
-myproject/node_modules/@angular/cli/utilities/json-schema.js
-myproject/node_modules/@angular/cli/models/command-runner.js
-myproject/node_modules/@angular/cli/lib/cli/index.js
-myproject/node_modules/@angular/cli/lib/init.js
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:902:15)
at Function.resolve (internal/modules/cjs/helpers.js:98:19)
atmyproject/node_modules/browser-sync/dist/snippet.js:87:52
atmyproject/node_modules/browser-sync-client/index.js:59:39
at Array.reduce ()
at processItems myproject/node_modules/browser-sync-client/index.js:54:10)
atmyproject/node_modules/browser-sync-client/index.js:89:22
at call myproject/node_modules/connect/index.js:239:7)
at next myproject/node_modules/connect/index.js:183:5)
at next myproject/node_modules/connect/index.js:161:14)

  • Note that with version browser-sync-client:2.27.9 , it was OK, no missing index.min.js , the package-lock.json should be like this:

"browser-sync-client": {
"version": "2.27.9",
"resolved": "https://registry.npmjs.org/browser-sync-client/-/browser-sync-client-2.27.9.tgz",
"integrity": "sha512-FHW8kydp7FXo6jnX3gXJCpHAHtWNLK0nx839nnK+boMfMI1n4KZd0+DmTxHBsHsF3OHud4V4jwoN8U5HExMIdQ==",
"dev": true,
"requires": {
"etag": "1.8.1",
"fresh": "0.5.2",
"mitt": "^1.1.3",
"rxjs": "^5.5.6"
},

  • How I quick fixed the problem: just same as @krmahadevan did, I explicitly put in my package.json the dependency: "browser-sync-client": "2.27.9". I removed the node_modules folder, and I run the npm install again. Now the package-lock.json will have the browser-sync-client:2.2.7.9 again, and no more error in console :).

  • I believe the best fix must be to fix the release distribution of browser-sync-client-2.27.10.tgz itself.

@Malak88
Copy link

Malak88 commented Aug 12, 2022

In jhipster, instead of browser-sync-client@2.27.10 change it to browser-sync-client@2.27.9 by

  1. Delete package-lock.json
  2. install npm i browser-sync-client@2.27.9
  3. npm install
  4. check package.json to verify the update of browser-sync-client then try ./mvnw or npm start

@djphan
Copy link

djphan commented Aug 23, 2022

I ran into this issue testing out a browser sync update. Since this issue was closed back 2018 and fixed does it make sense to reopen this thread or make a new one since a recent update in client caused the same issue?

Currently my workaround is to keep my pinned package.lock file for browser sync to the older version.

@mimkorn
Copy link

mimkorn commented Feb 1, 2023

Same issue still at 2.26.13

@toFrankie
Copy link

+1

  • browser-sync v2.27.7
  • node v16.20.0
  • pnpm v8.5.0
→ ●● svg $ pnpm start                                                                                                                                                                             [17:28:57]

> svg@1.0.0 start /Users/frankie/Web/ifanr/wechat-svg-post/svg
> gulp start

[17:29:12] Using gulpfile ~/Web/ifanr/wechat-svg-post/svg/gulpfile.js
[17:29:12] Starting 'start'...
[Browsersync] Access URLs:
 ---------------------------------
    Local: http://localhost:3000
 External: http://172.16.3.83:3000
 ---------------------------------
[Browsersync] Serving files from: dist-dev/pages
Error: Cannot find module 'browser-sync-client/dist/index.min.js'
Require stack:
- /Users/frankie/Web/ifanr/wechat-svg-post/svg/node_modules/.pnpm/browser-sync@2.27.7/node_modules/browser-sync/dist/snippet.js
- /Users/frankie/Web/ifanr/wechat-svg-post/svg/node_modules/.pnpm/browser-sync@2.27.7/node_modules/browser-sync/dist/hooks.js
- /Users/frankie/Web/ifanr/wechat-svg-post/svg/node_modules/.pnpm/browser-sync@2.27.7/node_modules/browser-sync/dist/browser-sync.js
- /Users/frankie/Web/ifanr/wechat-svg-post/svg/node_modules/.pnpm/browser-sync@2.27.7/node_modules/browser-sync/dist/index.js
- /Users/frankie/Web/ifanr/wechat-svg-post/svg/gulpfile.js
- /Users/frankie/Web/ifanr/wechat-svg-post/svg/node_modules/.pnpm/gulp-cli@2.3.0/node_modules/gulp-cli/lib/shared/require-or-import.js
- /Users/frankie/Web/ifanr/wechat-svg-post/svg/node_modules/.pnpm/gulp-cli@2.3.0/node_modules/gulp-cli/lib/versioned/^4.0.0/index.js
- /Users/frankie/Web/ifanr/wechat-svg-post/svg/node_modules/.pnpm/gulp-cli@2.3.0/node_modules/gulp-cli/index.js
- /Users/frankie/Web/ifanr/wechat-svg-post/svg/node_modules/.pnpm/gulp@4.0.2/node_modules/gulp/bin/gulp.js
    at Function.Module._resolveFilename (node:internal/modules/cjs/loader:1026:15)
    at Function.resolve (node:internal/modules/cjs/helpers:114:19)
    at /Users/frankie/Web/ifanr/wechat-svg-post/svg/node_modules/.pnpm/browser-sync@2.27.7/node_modules/browser-sync/dist/snippet.js:87:50
    at /Users/frankie/Web/ifanr/wechat-svg-post/svg/node_modules/.pnpm/browser-sync-client@2.29.1/node_modules/browser-sync-client/index.js:59:39
    at Array.reduce (<anonymous>)
    at processItems (/Users/frankie/Web/ifanr/wechat-svg-post/svg/node_modules/.pnpm/browser-sync-client@2.29.1/node_modules/browser-sync-client/index.js:54:10)
    at /Users/frankie/Web/ifanr/wechat-svg-post/svg/node_modules/.pnpm/browser-sync-client@2.29.1/node_modules/browser-sync-client/index.js:89:22
    at call (/Users/frankie/Web/ifanr/wechat-svg-post/svg/node_modules/.pnpm/connect@3.6.6/node_modules/connect/index.js:239:7)
    at next (/Users/frankie/Web/ifanr/wechat-svg-post/svg/node_modules/.pnpm/connect@3.6.6/node_modules/connect/index.js:183:5)
    at next (/Users/frankie/Web/ifanr/wechat-svg-post/svg/node_modules/.pnpm/connect@3.6.6/node_modules/connect/index.js:161:14)

However, it seems to be working fine with yarn, which is strange!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests