Skip to content

Can't use this package with express or node js (Error: Cannot find module 'react') #25

@kisshan13

Description

@kisshan13

It uses a next-basics which requires react as dependency. If i install react then there will be no issue running the app .

Error: Cannot find module 'react'
Require stack:
- D:\k-emilo\emilo-business-api-dev\node_modules\@umami\api-client\node_modules\next-basics\dist\cjs\index.js
- D:\k-emilo\emilo-business-api-dev\node_modules\@umami\api-client\dist\cjs\index.js
    at Function._resolveFilename (node:internal/modules/cjs/loader:1365:15)
    at defaultResolveImpl (node:internal/modules/cjs/loader:1021:19)
    at resolveForCJSWithHooks (node:internal/modules/cjs/loader:1026:22)
    at Function._load (node:internal/modules/cjs/loader:1175:37)
    at TracingChannel.traceSync (node:diagnostics_channel:322:14)
    at wrapModuleLoad (node:internal/modules/cjs/loader:235:24)
    at Module.require (node:internal/modules/cjs/loader:1445:12)
    at require (node:internal/modules/helpers:135:16)
    at Object.<anonymous> (D:\k-emilo\emilo-business-api-dev\node_modules\@umami\api-client\node_modules\next-basics\dist\cjs\index.js:1:75)
    at Module._compile (node:internal/modules/cjs/loader:1688:14) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [
    'D:\\k-emilo\\emilo-business-api-dev\\node_modules\\@umami\\api-client\\node_modules\\next-basics\\dist\\cjs\\index.js',
    'D:\\k-emilo\\emilo-business-api-dev\\node_modules\\@umami\\api-client\\dist\\cjs\\index.js'
  ]
}

Node.js v22.18.0
[nodemon] app crashed - waiting for file changes before starting...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions