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

Installation issue #4141

Open
Shtooth opened this issue Dec 2, 2023 · 3 comments
Open

Installation issue #4141

Shtooth opened this issue Dec 2, 2023 · 3 comments

Comments

@Shtooth
Copy link

Shtooth commented Dec 2, 2023

Hello people!

During the installation while running the node ./bin/prepare.js command I got the following error. Would you mind taking a look?
I noticed that /home/programming/Desktop/condo/node_modules/@open-condo/icons/ folder does not exist at all if that helps with the debuging.
Thanks in advance

====> Preparing address-service databases / .env
========> Creating PG DB if not exists
========> Filling default .env values
========> Running migration script
(node:20267) [DEP0111] DeprecationWarning: Access to process.binding('http_parser') is deprecated.
(Use `node --trace-deprecation ...` to show where the warning was created)

RUN "return await knex.migrate.latest(config)"
 -> [ 2, [] ]
====> Preparing condo databases / .env
========> Creating PG DB if not exists
========> Filling default .env values
========> Running migration script
Error: Command failed: yarn workspace @app/condo migrate
ERROR: can't get knex schema

    at ChildProcess.exithandler (node:child_process:422:12)
    at ChildProcess.emit (node:events:514:28)
    at maybeClose (node:internal/child_process:1105:16)
    at ChildProcess._handle.onexit (node:internal/child_process:305:5) {
  code: 1,
  killed: false,
  signal: null,
  cmd: 'yarn workspace @app/condo migrate',
  stdout: 'ERROR: logfile = /home/programming/Desktop/condo/apps/condo/.kmigrator/get.knex.settings.log\n' +
    'Browserslist: caniuse-lite is outdated. Please run:\n' +
    'npx browserslist@latest --update-db\n' +
    'node:internal/modules/cjs/loader:435\n' +
    '      throw err;\n' +
    '      ^\n' +
    '\n' +
    `Error: Cannot find module '/home/programming/Desktop/condo/node_modules/@open-condo/icons/dist/index.js'. Please verify that the package.json has a valid "main" entry\n` +
    '    at tryPackage (node:internal/modules/cjs/loader:427:19)\n' +
    '    at Function.Module._findPath (node:internal/modules/cjs/loader:640:18)\n' +
    '    at Function.Module._resolveFilename (node:internal/modules/cjs/loader:1014:27)\n' +
    '    at Function.Module._load (node:internal/modules/cjs/loader:873:27)\n' +
    '    at Module.require (node:internal/modules/cjs/loader:1100:19)\n' +
    '    at require (node:internal/modules/cjs/helpers:119:18)\n' +
    '    at Object.<anonymous> (/home/programming/Desktop/condo/apps/condo/domains/miniapp/schema/fields/integration.js:4:18)\n' +
    '    at Module._compile (node:internal/modules/cjs/loader:1198:14)\n' +
    '    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1252:10)\n' +
    '    at Module.load (node:internal/modules/cjs/loader:1076:32)\n' +
    '    at Function.Module._load (node:internal/modules/cjs/loader:911:12)\n' +
    '    at Module.require (node:internal/modules/cjs/loader:1100:19)\n' +
    '    at require (node:internal/modules/cjs/helpers:119:18)\n' +
    '    at Object.<anonymous> (/home/programming/Desktop/condo/apps/condo/domains/billing/schema/BillingIntegration.js:29:5)\n' +
    '    at Module._compile (node:internal/modules/cjs/loader:1198:14)\n' +
    '    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1252:10) {\n' +
    "  code: 'MODULE_NOT_FOUND',\n" +
    "  path: '/home/programming/Desktop/condo/node_modules/@open-condo/icons/package.json',\n" +
    "  requestPath: '@open-condo/icons'\n" +
    '}\n' +
    '\n',
  stderr: "ERROR: can't get knex schema\n"
@SavelevMatthew
Copy link
Member

Hi, thanks for finding the issue. We were able to reproduce it locally and will try to fix the bug soon.

The error is related to the fact that during migration some of the applications began to require dependencies, even though they didn't need them before on this step.

To continue working now you can pre-build icons using yarn workspace @open-condo/icons build, or build the whole packages via yarn build:packages

@Simernope
Copy link
Contributor

Simernope commented Mar 28, 2024

Initially, the description of the readme file says to use node above version 16.
This is incorrect, when using node above version 16, the following error occurs:

PS C:\Users\simeo\WebstormProjects\condo> node ./bin/prepare.js   
--> Running sanity checks
--> Receiving all existing apps
--> Apps found: address-service, condo, dev-api, dev-portal, miniapp
--> Assigning ports, urls and db indexes/names to all apps
--> Copying global .env.example values to global .env if not exists
--> Writing services <service-name>_DOMAIN variables to global .env
--> Filtering apps to prepare: address-service, condo, dev-api, dev-portal, miniapp
--> Creating databases for apps if not exists: local-address-service, local-condo, local-dev-api, local-miniapp
--> Preparing "address-service" app
------> Copying app's .env.example values to .env if not exists
------> Writing assigned urls / ports / dbs to app's .env
------> Running migration script
(node:18716) [DEP0111] DeprecationWarning: Access to process.binding('http_parser') is deprecated.
(Use `node --trace-deprecation ...` to show where the warning was created)

RUN "return await knex.migrate.latest(config)"
 -> [ 2, [] ]
--> Preparing "condo" app
------> Copying app's .env.example values to .env if not exists
------> Writing assigned urls / ports / dbs to app's .env
------> Running migration script
Error: Command failed: yarn workspace @app/condo migrate
C:\Users\simeo\WebstormProjects\condo\bin\kmigrator.py:645: SyntaxWarning: invalid escape sequence '\)'
  (code, _) = re.subn(r'\s*migrations\.RemoveField\([^)]*?model_name=[\'"](' + m + ')[\'"][^)]*?\),', _repl, code, flags=flags)
ERROR: can't get knex schema

    at ChildProcess.exithandler (node:child_process:422:12)
    at ChildProcess.emit (node:events:514:28)
    at maybeClose (node:internal/child_process:1105:16)
    at ChildProcess._handle.onexit (node:internal/child_process:305:5) {
  code: 1,
  killed: false,
  signal: null,
  cmd: 'yarn workspace @app/condo migrate',
  stdout: 'ERROR: logfile = C:\\Users\\simeo\\WebstormProjects\\condo\\apps\\condo\\.kmigrator\\get.knex.settings.log\r\n' +
    'Browserslist: caniuse-lite is outdated. Please run:\r\n' +
    'npx browserslist@latest --update-db\r\n' +
    'node:internal/modules/cjs/loader:598\r\r\n' +
    '      throw e;\r\r\n' +
    '      ^\r\r\n' +
    '\r\r\n' +
    `Error [ERR_PACKAGE_PATH_NOT_EXPORTED]: Package subpath './public/extractFiles' is not defined by "exports" in C:\\Users\\simeo\\WebstormProjects\\condo\\node_modules\\extract-files\\package.json\r\r\n` +
    '    at exportsNotFound (node:internal/modules/esm/resolve:294:10)\r\r\n' +
    '    at packageExportsResolve (node:internal/modules/esm/resolve:641:9)\r\r\n' +
    '    at resolveExports (node:internal/modules/cjs/loader:591:36)\r\r\n' +
    '    at Module._findPath (node:internal/modules/cjs/loader:668:31)\r\r\n' +
    '    at Module._resolveFilename (node:internal/modules/cjs/loader:1130:27)\r\r\n' +
    '    at Module._load (node:internal/modules/cjs/loader:985:27)\r\r\n' +
    '    at Module.require (node:internal/modules/cjs/loader:1235:19)\r\r\n' +
    '    at require (node:internal/modules/helpers:176:18)\r\r\n' +
    '    at Object.<anonymous> (C:\\Users\\simeo\\WebstormProjects\\condo\\node_modules\\apollo-upload-client\\public\\createUploadLink.js:18:20)\r\r\n' +
    '    at Module._compile (node:internal/modules/cjs/loader:1376:14) {\r\r\n' +
    "  code: 'ERR_PACKAGE_PATH_NOT_EXPORTED'\r\r\n" +
    '}\r\r\n' +
    '\r\r\n' +
    'Node.js v20.10.0\r\r\n' +
    '\r\n',
  stderr: "C:\\Users\\simeo\\WebstormProjects\\condo\\bin\\kmigrator.py:645: SyntaxWarning: invalid escape sequence '\\)'\r\n" +
    `  (code, _) = re.subn(r'\\s*migrations\\.RemoveField\\([^)]*?model_name=[\\'"](' + m + ')[\\'"][^)]*?\\),', _repl, code, flags=flags)\r\n` +
    "ERROR: can't get knex schema\r\n"
}
PS C:\Users\simeo\WebstormProjects\condo> node ./bin/prepare.js -v
error: unknown option '-v'

There is already a similar case on stackoverflow https://stackoverflow.com/questions/70008637/error-err-package-path-not-exported-package-subpath-public-extractfiles-i.
It is also not specified which version of python is needed.
When using the current 3.12 version, the following error occurs: ModuleNotFoundError: No module named 'distutils'. https://stackoverflow.com/questions/77549389/i-get-import-gyp-error-when-try-to-install-package-for-electron
I am currently using node 16.20.2 and python 3.8.10 versions. But now I have when executing the command "node ./bin/prepare.js" the following error occurs:

simeo@Simeon MINGW64 ~/WebstormProjects/condo (master)
$ node ./bin/prepare.js
--> Running sanity checks
--> Receiving all existing apps
--> Apps found: address-service, condo, dev-api, dev-portal, miniapp
--> Assigning ports, urls and db indexes/names to all apps
--> Copying global .env.example values to global .env if not exists
--> Writing services <service-name>_DOMAIN variables to global .env
--> Filtering apps to prepare: address-service, condo, dev-api, dev-portal, miniapp
--> Creating databases for apps if not exists: local-address-service, local-condo, local-dev-api, local-miniapp
--> Preparing "address-service" app
------> Copying app's .env.example values to .env if not exists
------> Writing assigned urls / ports / dbs to app's .env
------> Running migration script
(node:19040) [DEP0111] DeprecationWarning: Access to process.binding('http_parser') is deprecated.
(Use `node --trace-deprecation ...` to show where the warning was created)

RUN "return await knex.migrate.latest(config)"
 -> [
  1,
  [
    '20220819090735-0001_initial.js',
    '20221124181138-0002_address_addresshistoryrecord_and_more.js',
    '20230216132102-0003_address_overrides_addresshistoryrecord_overrides.js',
    '20230216132102-0004_manual_lowercase_address_source.js'
  ]
]
--> Preparing "condo" app
------> Copying app's .env.example values to .env if not exists
------> Writing assigned urls / ports / dbs to app's .env
------> Running migration script
Error: Command failed: yarn workspace @app/condo migrate
ERROR: can't get knex schema

    at ChildProcess.exithandler (node:child_process:402:12)
    at ChildProcess.emit (node:events:513:28)
    at maybeClose (node:internal/child_process:1100:16)
    at Process.ChildProcess._handle.onexit (node:internal/child_process:304:5) {
  code: 1,
  killed: false,
  signal: null,
  cmd: 'yarn workspace @app/condo migrate',
  stdout: 'ERROR: logfile = C:\\Users\\simeo\\WebstormProjects\\condo\\apps\\condo\\.kmigrator\\get.knex.settings.log\r\n' +
    'Browserslist: caniuse-lite is outdated. Please run:\r\n' +
    'npx browserslist@latest --update-db\r\n' +
    '\r\n',
  stderr: "ERROR: can't get knex schema\r\n"
}

@SavelevMatthew
Copy link
Member

Sorry for the confusion caused by a typo in our README. Node versions higher than 16 are not supported yet, as we need to change exports in our packages.json, and solve a couple of other issues. So for now we recommend to use Node 16 to work with the project.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

3 participants