Skip to content

For development we need install npm packages on the host OS#3

Open
tmszi wants to merge 1 commit intoOpenPlainsInc:mainfrom
tmszi:fix-webapp-doc-npm-install-before-up
Open

For development we need install npm packages on the host OS#3
tmszi wants to merge 1 commit intoOpenPlainsInc:mainfrom
tmszi:fix-webapp-doc-npm-install-before-up

Conversation

@tmszi
Copy link
Contributor

@tmszi tmszi commented Dec 4, 2022

Inside ./webapp dir before docker compose up.

Fix tomorrownowapp_webapp_1 container launch error:

> webapp@0.1.0 start
> react-scripts start

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

Error: Cannot find module 'react'
Require stack:
- /home/node/.npm-global/lib/node_modules/react-scripts/scripts/start.js
    at Function.Module._resolveFilename (node:internal/modules/cjs/loader:985:15)
    at Function.resolve (node:internal/modules/cjs/helpers:109:19)
    at Object.<anonymous> (/home/node/.npm-global/lib/node_modules/react-scripts/scripts/start.js:43:31)
    at Module._compile (node:internal/modules/cjs/loader:1155:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1209:10)
    at Module.load (node:internal/modules/cjs/loader:1033:32)
    at Function.Module._load (node:internal/modules/cjs/loader:868:12)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12)
    at node:internal/main/run_main_module:22:47 {
  code: 'MODULE_NOT_FOUND',
  requireStack: [
    '/home/node/.npm-global/lib/node_modules/react-scripts/scripts/start.js'
  ]
}

To Reproduce
Steps to reproduce the behavior:

  1. Fresh clone Git repository git clone https://github.com/tomorrownow/TomorrowNowApp.git
  2. Follow Configuration instruction https://github.com/tomorrownow/TomorrowNowApp#configuration
  3. Start apps docker-compose up
  4. docker logs tomorrownowapp_webapp_1
  5. See error
> webapp@0.1.0 start
> react-scripts start

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

Error: Cannot find module 'react'
Require stack:
- /home/node/.npm-global/lib/node_modules/react-scripts/scripts/start.js
    at Function.Module._resolveFilename (node:internal/modules/cjs/loader:985:15)
    at Function.resolve (node:internal/modules/cjs/helpers:109:19)
    at Object.<anonymous> (/home/node/.npm-global/lib/node_modules/react-scripts/scripts/start.js:43:31)
    at Module._compile (node:internal/modules/cjs/loader:1155:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1209:10)
    at Module.load (node:internal/modules/cjs/loader:1033:32)
    at Function.Module._load (node:internal/modules/cjs/loader:868:12)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12)
    at node:internal/main/run_main_module:22:47 {
  code: 'MODULE_NOT_FOUND',
  requireStack: [
    '/home/node/.npm-global/lib/node_modules/react-scripts/scripts/start.js'
  ]
}

Inside ./webapp dir before docker compose up.

Fix tomorrownowapp_webapp_1 container launch error:

```
> webapp@0.1.0 start
> react-scripts start

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

Error: Cannot find module 'react'
Require stack:
- /home/node/.npm-global/lib/node_modules/react-scripts/scripts/start.js
    at Function.Module._resolveFilename (node:internal/modules/cjs/loader:985:15)
    at Function.resolve (node:internal/modules/cjs/helpers:109:19)
    at Object.<anonymous> (/home/node/.npm-global/lib/node_modules/react-scripts/scripts/start.js:43:31)
    at Module._compile (node:internal/modules/cjs/loader:1155:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1209:10)
    at Module.load (node:internal/modules/cjs/loader:1033:32)
    at Function.Module._load (node:internal/modules/cjs/loader:868:12)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12)
    at node:internal/main/run_main_module:22:47 {
  code: 'MODULE_NOT_FOUND',
  requireStack: [
    '/home/node/.npm-global/lib/node_modules/react-scripts/scripts/start.js'
  ]
}
```
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

Successfully merging this pull request may close these issues.

1 participant