asclepiadae
04/14/2024, 5:27 PMpackages/server/medplum.config.json as required, but I'm getting a build failure when I run npm t (as a somewhat aside - I have not used npm/typescript/NodeJS before, so is it usual to require sudo to run npm t? If I try without I get a permissions error...)
Anyway, as for the test build, here's the error I'm seeing:
@medplum/core:test: Summary of all failing tests
@medplum/core:test: FAIL src/format.test.ts
@medplum/core:test: ● Format date
@medplum/core:test: expect(received).toEqual(expected) // deep equality
@medplum/core:test: Expected: "6/1/2021"
@medplum/core:test: Received: "2021-06-01"
...
@medplum/core:test: at Object.toEqual (src/format.test.ts:247:36)
@medplum/core:test:
@medplum/core:test: ● Format Money
@medplum/core:test: expect(received).toBe(expected) // Object.is equality
@medplum/core:test: Expected: "$10.10"
@medplum/core:test: Received: "US$10.10"
To me it looks like it could be a localization issue? I'm in Canada, so my default date format is a bit different, but shouldn't the software account for that with other regionalization? Or is there something in the software that isn't working right on AlmaLinux (RHEL rather than Debian based).
Anyway, after that I get a lot more errors in the log:
@medplum/docs:build: ● Client █████████████████████████ building (10%) 0/1 entries 6/33 dependencies 0/5 modules 5 active
@medplum/docs:build: babel-loader › ../../node_modules/@docusaurus/core/lib/client/exports/ExecutionEnvironment.js
@medplum/docs:build: ● Server █████████████████████████ building (10%) 0/1 entries 5/10 dependencies 0/5 modules 5 active
@medplum/docs:build: babel-loader › ../../node_modules/@docusaurus/core/lib/client/BrokenLinksContext.js
...
@medplum/core:test: Test Suites: 1 failed, 53 passed, 54 total
@medplum/core:test: Tests: 2 failed, 115 skipped, 1460 passed, 1577 total
...
@medplum/core:test: npm ERR! Lifecycle script `test` failed with error:
@medplum/core:test: npm ERR! Error: command failed
@medplum/core:test: npm ERR! in workspace: @medplum/core@3.1.2
@medplum/core:test: npm ERR! at location: /home/<username>/medplum/packages/core
@medplum/core:test: ERROR: command finished with error: command (/home/<username>/medplum/packages/core) /bin/npm run test exited (1)
...
@medplum/app:build: vite v5.2.8 building for production...
../../node_modules/@mantine/core/esm/core/utils/get-env/get-env.mjs (1:0): Error when using sourcemap for reporting an error: Can't resolve original location of error.
../../node_modules/@mantine/hooks/esm/use-focus-trap/use-focus-trap.mjs (1:0): Error when using sourcemap for reporting an error: Can't resolve original location of error.
../../node_modules/@mantine/hooks/esm/use-focus-trap/tabbable.mjs (1:0): Error when using sourcemap for reporting an error: Can't resolve original location of error.
...
@medplum/app:build: (!) Some chunks are larger than 500 kB after minification. Consider:
@medplum/app:build: - Using dynamic import() to code-split the application
@medplum/app:build: - Use build.rollupOptions.output.manualChunks to improve chunking: https://rollupjs.org/configuration-options/#output-manualchunks
@medplum/app:build: - Adjust chunk size limit for this warning via build.chunkSizeWarningLimit.
@medplum/app:build: ✓ built in 15.35s
@medplum/core#test: command (/home/<username>/medplum/packages/core) /bin/npm run test exited (1)
Tasks: 27 successful, 45 total
Cached: 7 cached, 45 total
Time: 1m57.317s
Failed: @medplum/core#test
ERROR run failed: command exited (1)
Appreciate any advice anyone here can offer! Thanks!asclepiadae
04/14/2024, 9:56 PMrahul1
04/15/2024, 4:37 AMrahul1
04/15/2024, 4:40 AMrahul1
04/15/2024, 4:41 AMnpm run build:fastasclepiadae
04/15/2024, 5:51 AMnpm ERR! Lifecycle script `build:fast` failed with error:
npm ERR! Error: Missing script: "build:fast"
To see a list of scripts, run:
npm run
npm ERR! in workspace: @medplum/server@3.1.2
Lifecycle scripts included in @medplum/server@3.1.2:
start
node --require ./dist/otel/instrumentation.js dist/index.js
test
jest --runInBand
available via `npm run-script`:
build
npm run clean && tsc --project tsconfig.build.json
clean
rimraf dist
dev
ts-node-dev --poll --respawn --transpile-only --require ./src/otel/instrumentation.ts src/index.tsasclepiadae
04/15/2024, 5:52 AMrahul1
05/06/2024, 6:23 PMbuild:fast from the root medplum directory?