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

Unable to run the demo on local machine #201

Closed
msrshahrukh100 opened this issue Aug 14, 2022 · 2 comments
Closed

Unable to run the demo on local machine #201

msrshahrukh100 opened this issue Aug 14, 2022 · 2 comments

Comments

@msrshahrukh100
Copy link

Describe the bug
When trying to run the local development server with npm start after npm install I am getting websocket error RangeError: Invalid WebSocket frame: RSV1 must be clear Here are the error logs -

modules by path ./src/ 8.56 KiB (javascript) 35.7 KiB (css/mini-extract)
  modules by path ./src/components/click-counter/ 3.86 KiB 3 modules
  modules by path ./src/*.ts 1.04 KiB 2 modules
  modules by path ./src/themes/website/styles/*.scss 332 bytes (javascript) 35.7 KiB (css/mini-extract) 2 modules
  modules by path ./src/user/*.ts 2.55 KiB 2 modules
  ./src/modules/demo.runtime.module.ts 794 bytes [built] [code generated]
webpack 5.74.0 compiled successfully in 77273 ms
events.js:377
      throw er; // Unhandled 'error' event
      ^

RangeError: Invalid WebSocket frame: RSV1 must be clear
    at Receiver.getInfo (/Users/mohammad.shahrukh/Code/home/paperbits-demo/node_modules/ws/lib/receiver.js:189:14)
    at Receiver.startLoop (/Users/mohammad.shahrukh/Code/home/paperbits-demo/node_modules/ws/lib/receiver.js:136:22)
    at Receiver._write (/Users/mohammad.shahrukh/Code/home/paperbits-demo/node_modules/ws/lib/receiver.js:83:10)
    at writeOrBuffer (internal/streams/writable.js:358:12)
    at Receiver.Writable.write (internal/streams/writable.js:303:10)
    at Socket.socketOnData (/Users/mohammad.shahrukh/Code/home/paperbits-demo/node_modules/ws/lib/websocket.js:1192:35)
    at Socket.emit (events.js:400:28)
    at addChunk (internal/streams/readable.js:293:12)
    at readableAddChunk (internal/streams/readable.js:267:9)
    at Socket.Readable.push (internal/streams/readable.js:206:10)
Emitted 'error' event on WebSocket instance at:
    at Receiver.receiverOnError (/Users/mohammad.shahrukh/Code/home/paperbits-demo/node_modules/ws/lib/websocket.js:1078:13)
    at Receiver.emit (events.js:400:28)
    at emitErrorNT (internal/streams/destroy.js:106:8)
    at emitErrorCloseNT (internal/streams/destroy.js:74:3)
    at processTicksAndRejections (internal/process/task_queues.js:82:21) {
  code: 'WS_ERR_UNEXPECTED_RSV_1',
  [Symbol(status-code)]: 1002
}
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] start: `webpack serve --open --config webpack.develop.js`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the [email protected] start script.

To Reproduce
Steps to reproduce the behavior:

  1. git clone https://github.com/paperbits/paperbits-demo.git
  2. cd paperbits-demo
  3. npm install
  4. npm start

**Versions

➜ node --version
v14.20.0
➜ npm --version
6.14.17

macOS version - 10.15.7
@azaslonov
Copy link
Member

@msrshahrukh100, this seems to be specific to your environment, because we can't repo it. Please try this, just in case:

  1. git clean -xdf - cleanup files not in the repo.
  2. npm i - install packages again
  3. npm start - start.

If this doesn't help: The error you see seems to be related to webpack dev server, so you can try to just build the designer (npm run build-designer, the result goes to dist/designer folder) and run it with some other web server (i.e. this one).

Hope that helps.

@msrshahrukh100
Copy link
Author

Thanks, @azaslonov. It worked with another web server.

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

2 participants