bpmnServer / bpmn-web

WebServer for bpmn-server
2 stars 9 forks source link

Errors on running setup #5

Closed ralphhanna closed 11 months ago

ralphhanna commented 11 months ago

Thanks so much for all your great work,

I have applied all PRs -removed tools folder -added INSTALL* files -added some required .js files

But still get many errors in running.

  1. Question: how to run cli and app When I run npm run start

When I run node dist\app I get error

E:\X4\master\bpmn-web>npm run start

> bpmn-server.webapp@2.0.0 start
> node app

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

Error: Cannot find module 'E:\X4\master\bpmn-web\app'
    at Module._resolveFilename (node:internal/modules/cjs/loader:1075:15)
    at Module._load (node:internal/modules/cjs/loader:920:27)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12)
    at node:internal/main/run_main_module:23:47 {
  code: 'MODULE_NOT_FOUND',
  requireStack: []
}

Node.js v18.16.0

But node dist\app get also errors

E:\X4\master\bpmn-web>node dist\app
bpmn-server WebApp.ts version cannot locate package.json current: E:\X4\master\bpmn-web\dist path E:\X4\master\bpmn-web\dist/package.json
MongoDB URL mongodb://0.0.0.0:27017/new
bpmn-server version 2.0.3-alpha2
server started..
App is running at http://localhost:3000 in development mode
  Press CTRL-C to stop

myserver started
UserService.init()
linonetwo commented 11 months ago

I just sleep for 8.5 hours.

TBH, I only played setup and start. I will look at rest of scripts.

ralphhanna commented 11 months ago

Sorry, this is fixed now, now worries

linonetwo commented 11 months ago

Seems you did not write these code? Are you also discovering tech relics?

linonetwo commented 11 months ago

图片

I'm learning now

linonetwo commented 11 months ago

All these import { BPMNServer, DefaultAppDelegate, Logger } from "./"; should change from "./" to "bpmn-server"

ralphhanna commented 11 months ago

The problem with that is in WorkflowApp/test/feature files do not work with the package.json definition of 'bpmn-server'. So it is much easier to mention 'bpmn-server' once only and let other files use refer to so. So If I have to debug locally, just change one file 'index' Thanks

ralphhanna commented 11 months ago

Still having problems with test

npm run test

linonetwo commented 11 months ago

Why you change require("../../") to require("./")? Does it work?

I would change them to require("bpmn-server") instead

linonetwo commented 11 months ago

Fixed in #11 , which is based on #10

ralphhanna commented 11 months ago

fixed