SvenKirschbaum / react-stomp-hooks

This repository contain a react library which enables simple access to stomp subscriptions via hooks.
MIT License
59 stars 12 forks source link

The example project doesn't run #21

Closed jelle-blaauw closed 1 year ago

jelle-blaauw commented 1 year ago

I pulled the project and tried to the example through the guide provided: npm install npm start

This is the result:

> react-stomp-hooks-example@0.0.0 start
> node ../node_modules/react-scripts/bin/react-scripts.js start

node:internal/modules/cjs/loader:958
  throw err;
  ^

Error: Cannot find module 'C:\React\workspace\react-stomp-hooks-master\node_modules\react-scripts\bin\react-scripts.js'
    at Module._resolveFilename (node:internal/modules/cjs/loader:955:15)
    at Module._load (node:internal/modules/cjs/loader:803:27)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12)
    at node:internal/main/run_main_module:18:47 {
  code: 'MODULE_NOT_FOUND',
  requireStack: []
}

Node.js v18.8.0

Could you please help?

SvenKirschbaum commented 1 year ago

Hello!

You have to first run npm install and npm run build inside the parent directory (the root directory of the repository).

The Readme file inside the example directory has never been updated after it had been autogenerated, which is why it is not accurate. I will update it for the future. The example project is directly linked to the library in its parent directory for easier development, which is why it has to be build prior to running the example project.