Giter Club home page Giter Club logo

Comments (7)

Bezdekm avatar Bezdekm commented on August 17, 2024 2

Oh sorry, no. I have lowercase w in code.

I got this errors:

WARNING in ./~/bufferutil/~/bindings/bindings.js
Critical dependencies:
76:22-40 the request of a dependency is an expression
76:43-53 the request of a dependency is an expression
 @ ./~/bufferutil/~/bindings/bindings.js 76:22-40 76:43-53

WARNING in ./~/bufferutil/~/bindings/README.md

Module parse failed: /Users/martin/Desktop/Projects/cimie.cz/node_modules/bufferutil/node_modules/bindings/README.md Line 2: Unexpected
token ===
You may need an appropriate loader to handle this file type.
| node-bindings
| =============
| ### Helper module for loading your native module's .node file
|
 @ ./~/bufferutil/~/bindings ^\.\/.*$

WARNING in ./~/bufferutil/~/bindings/package.json
Module parse failed: /Users/martin/Desktop/Projects/cimie.cz/node_modules/bufferutil/node_modules/bindings/package.json Line 2: Unexpect
ed token :
You may need an appropriate loader to handle this file type.
| {
|   "name": "bindings",
|   "description": "Helper module for loading your native module's .node file",
|   "keywords": [
 @ ./~/bufferutil/~/bindings ^\.\/.*$
WARNING in ./~/utf-8-validate/~/bindings/README.md
Module parse failed: /Users/martin/Desktop/Projects/cimie.cz/node_modules/utf-8-validate/node_modules/bindings/README.md Line 2: Unexpec
ted token ===
You may need an appropriate loader to handle this file type.
| node-bindings
| =============
| ### Helper module for loading your native module's .node file
|

 @ ./~/utf-8-validate/~/bindings ^\.\/.*$

WARNING in ./~/utf-8-validate/~/bindings/package.json
Module parse failed: /Users/martin/Desktop/Projects/cimie.cz/node_modules/utf-8-validate/node_modules/bindings/package.json Line 2: Unex
pected token :
You may need an appropriate loader to handle this file type.
| {
|   "name": "bindings",
|   "description": "Helper module for loading your native module's .node file",
|   "keywords": [
 @ ./~/utf-8-validate/~/bindings ^\.\/.*$

ERROR in ./~/ws/~/options/lib/options.js
Module not found: Error: Cannot resolve module 'fs' in /Users/martin/Desktop/Projects/cimie.cz/node_modules/ws/node_modules/options/lib
 @ ./~/ws/~/options/lib/options.js 6:9-22

ERROR in ./~/bufferutil/~/bindings/bindings.js
Module not found: Error: Cannot resolve module 'fs' in /Users/martin/Desktop/Projects/cimie.cz/node_modules/bufferutil/node_modules/bind
ings
 @ ./~/bufferutil/~/bindings/bindings.js 6:9-22

ERROR in ./~/utf-8-validate/~/bindings/bindings.js
Module not found: Error: Cannot resolve module 'fs' in /Users/martin/Desktop/Projects/cimie.cz/node_modules/utf-8-validate/node_modules/
bindings
 @ ./~/utf-8-validate/~/bindings/bindings.js 6:9-22

from webpack-library-starter.

calebissharp avatar calebissharp commented on August 17, 2024 1

The 'ws' library cannot be used in a browser context. You have to use WebSockets API directly (https://developer.mozilla.org/en-US/docs/Web/API/WebSockets_API). See this issue. Socket.io will work in the browser as well

from webpack-library-starter.

krasimir avatar krasimir commented on August 17, 2024

Hey, how you exactly tried importing the library? Can you please post the code here.

from webpack-library-starter.

Bezdekm avatar Bezdekm commented on August 17, 2024

First I installed package by npm install --save ws. In index.js I import library by require('Ws');.
Webpack file I changed many times. Without changes in webpack file I got error as cannot load module ... and after some changes (added node: {fs: 'empty'} eg.) I got other errors.

Thx

from webpack-library-starter.

krasimir avatar krasimir commented on August 17, 2024

Is it because you typed require('Ws') and not require('ws'). Should be lowercase w.

from webpack-library-starter.

krasimir avatar krasimir commented on August 17, 2024

Ok, thanks. I'll try replicating your issue.

from webpack-library-starter.

krasimir avatar krasimir commented on August 17, 2024

Thanks for the follow up @EpicSharp. @Bezdekm does the comment above makes sense your case?

from webpack-library-starter.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.