Closed kahlan88 closed 3 years ago
Hi @kahlan88, thanks for reporting the issue and sorry you are running into this. It seems while we do a healtcheck as part of the pack command, your server start fails with memory issue. Can you run yarn start and confirm that you can successfully build and start the server locally. Once confirmed, we will investigate the issue on our end. Thanks!
Hi @mazhisai, I am able to run yarn start
successfully and develop the modules locally. The yarn start
command also shows the heap out of memory
error however I am able to run & view my changes on localhost.
Other commands, such as yarn msdyn365 clone
etc seem to work fine too.
I'm on versions:
"@msdyn365-commerce-modules/starter-pack": "9.24",
"@msdyn365-commerce-modules/fabrikam-design-kit": "9.24",
"@msdyn365-commerce/bootloader": "^1.0.0",
"@msdyn365-commerce/retail-proxy": "9.24",
@kahlan88 The issue seems to be occurring because your Node server is running out of allocated memory to use. As part of the pack process, a Node server using your build is started to ensure that it passes a basic health check before being deployed via LCS.
In a newly released version of SDK, 1.26.13, we have added two options to the pack command that you can use to help resolve this issue.
--use-max-memory-heap
. E.g. yarn msdyn365 pack --use-max-memory-heap
to increase the max memory allocated to your Node process. This should hopefully allow you to run your health check without any issues and once the health check passes, the pack process will finish--skip-health-check
. E.g. yarn msdyn365 pack --skip-health-check
. This will skip the health check process entirely.You do not need to make any changes to your package.json
as the pack command will automatically pick up the latest SDK available. Try running with one of the two options above and see if that resolves the issue. Please let me know if that fixes the issue or if you run into any other issues.
@siddthesciencekid I have tried both commands.
yarn msdyn365 pack --use-max-memory-heap
isn't successful:
yarn run v1.22.5
$ C:\Users\kamila.mielczarek\Projects\Neptune-D365-Outlet\node_modules\.bin\msdyn365 pack --use-max-memory-heap
process.env.NODE_DEBUG --> [undefined][false]
-- Running MSDyn365 CLI Version 1.26.13
-- Existing yarn.lock found. Removing to regenerate yarn.lock
FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - JavaScript heap out of memory
-- pack command failed with Error: Command failed: yarn --force
FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - JavaScript heap out of memory
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
yarn msdyn365 pack --skip-health-check
runs with the fatal error, but I am getting a .zip file. When we upload the file to LCS it fails on validation however. There's no information about what fails as getting to the log also throws an error in LCS.
Could you verify whether the contents of the .zip are what you were expecting? I expected the whole package not just my changes to be there. Is dist
or build
folder missing or are they not required? We get:
public
src
(with just the newly created packages & theme).env
.npmrc
.yarnrc
package.json
and tsconfig tslintyarn.lock
Update
We've managed to resolve issues by running yarn msdyn365 validate ./
and resolving issues highlighted.
To run the pack command I was advised to run with the flag yarn msdyn365 pack --skip-health-check
and that generates the .zip.
We're still awaiting support resolution as the package doesn't validate upon uploading it to LCS.
I was also advised to use --use-max-memory-heap
when running the commands, but that just makes yarn start
or pack fail immediately.
process.env.NODE_DEBUG --> [undefined][false]
-- Running MSDyn365 CLI Version 1.26.13
-- Existing yarn.lock found. Removing to regenerate yarn.lock
FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - JavaScript heap out of memory
-- pack command failed with Error: Command failed: yarn --force
FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - JavaScript heap out of memory
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
Just to clarify, after you resolved the issues found with yarn msdyn365 validate ./
and ran the pack command, the resulting zip file did not validate upon uploading to LCS?
The contents of your zip file are as expected, we don't include the dist
or build
folder, just the src
and public
and other files as you saw. This is because upon uploading to LCS we build your assets once again to verify everything works as expected before completing the upload.
Would it be possible to upload the logs you see when you yarn msdyn365 pack --skip-health-check
? You mentioned there is fatal error popping up and I would like to debug that further.
Lastly, if possible, could you kindly share the hardware specs of the machine that you're running this command on and if possible try running this command on a different machine to see if you're able to resolve the out of memory issues?
Additionally, if you have any linting errors the package will fail validation. I would double check that there are no linting errors by running yarn lint:fix
If you do encounter linting errors you may either:
// tslint:disable
commentsClosing this issue for now as we haven't received an update - Please feel free to reach out or re-open the issue if you running into further issues.
When I run the
yarn msdyn365 pack
command, I don't see the zip file being created and it seems like probably some problem with the server?server is not healty
I am also seeing JS fatal error.
Here's a full log.
``` yarn msdyn365 pack yarn run v1.22.5 $ C:\Users\kamila.mielczarek\Projects\Msdyn365.Commerce.Online\node_modules\.bin\msdyn365 pack process.env.NODE_DEBUG --> [undefined][false] -- Running MSDyn365 CLI Version 1.26.11 warning @msdyn365-commerce/bootloader > @babel/polyfill@7.12.1: � This package has been depre cated in favor of separate inclusion of a polyfill and regenerator-runtime (when needed). See the @babel/polyfill docs (https://babeljs.io/docs/en/babel-polyfill) for more information. warning @msdyn365-commerce/bootloader > applicationinsights-js@1.0.21: This package has been m oved to @microsoft/applicationinsights-web. Please install that package instead for the latest updates & features warning @msdyn365-commerce/bootloader > @babel/polyfill > core-js@2.6.12: core-js@<3 is no lon ger maintained and not recommended for usage due to the number of issues. Please, upgrade your dependencies to the actual version of core-js@3. warning @msdyn365-commerce/bootloader > fork-ts-checker-webpack-plugin > chokidar@2.1.8: Choki dar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies. warning @msdyn365-commerce/bootloader > webpack-dev-server > chokidar@2.1.8: Chokidar 2 will b reak on node v14+. Upgrade to chokidar 3 with 15x less dependencies. warning @msdyn365-commerce/bootloader > @msdyn365-commerce/cli-internal > axios@0.18.1: Critic al security vulnerability fixed in v0.21.1. For more information, see https://github.com/axios /axios/pull/3410 warning @msdyn365-commerce/bootloader > @msdyn365-commerce/runtime-internal > axios@0.18.1: Cr itical security vulnerability fixed in v0.21.1. For more information, see https://github.com/a xios/axios/pull/3410 warning @msdyn365-commerce/bootloader > @msdyn365-commerce/utilities-internal > axios@0.18.1: Critical security vulnerability fixed in v0.21.1. For more information, see https://github.com /axios/axios/pull/3410 warning @msdyn365-commerce/bootloader > @msdyn365-commerce/runtime-internal > @msdyn365-commer ce/core-internal > axios@0.18.1: Critical security vulnerability fixed in v0.21.1. For more in formation, see https://github.com/axios/axios/pull/3410 warning @msdyn365-commerce/bootloader > @msdyn365-commerce/runtime-internal > @msdyn365-commer ce/telemetry-internal > applicationinsights-js@1.0.21: This package has been moved to @microso ft/applicationinsights-web. Please install that package instead for the latest updates & featu res warning @msdyn365-commerce/bootloader > error-overlay-webpack-plugin > react-dev-utils > fork- ts-checker-webpack-plugin > chokidar@2.1.8: Chokidar 2 will break on node v14+. Upgrade to cho kidar 3 with 15x less dependencies. warning @msdyn365-commerce/bootloader > testcafe > testcafe-hammerhead > debug@4.1.1: Debug ve rsions >=3.2.0 <3.2.7 || >=4 <4.3.1 have a low-severity ReDos regression when used in a Node.j s environment. It is recommended you upgrade to 3.2.7 or 4.3.1. (https://github.com/visionmedi a/debug/issues/797) warning @msdyn365-commerce/bootloader > fork-ts-checker-webpack-plugin > chokidar > fsevents@1 .2.13: fsevents 1 will break on node v14+ and could be using insecure binaries. Upgrade to fse vents 2. warning @msdyn365-commerce/bootloader > @msdyn365-commerce/build-scripts-internal > node-sass > request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3 142 warning @msdyn365-commerce/bootloader > @msdyn365-commerce/build-scripts-internal > node-sass > node-gyp > request@2.88.2: request has been deprecated, see https://github.com/request/reque st/issues/3142 warning @msdyn365-commerce/bootloader > @msdyn365-commerce/runtime-internal > @msdyn365-commer ce/core-internal > intl-locales-supported@1.8.12: bad publish warning @msdyn365-commerce/bootloader > testcafe > testcafe-legacy-api > babel-runtime > core- js@1.2.7: core-js@<3 is no longer maintained and not recommended for usage due to the number o f issues. Please, upgrade your dependencies to the actual version of core-js@3. warning @msdyn365-commerce/bootloader > webpack > watchpack > watchpack-chokidar2 > chokidar@2 .1.8: Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies. warning @msdyn365-commerce/bootloader > @msdyn365-commerce/build-scripts-internal > node-sass > request > har-validator@5.1.5: this library is no longer supported warning @msdyn365-commerce/bootloader > testcafe > testcafe-hammerhead > css > urix@0.1.0: Ple ase see https://github.com/lydell/urix#deprecated warning @msdyn365-commerce/bootloader > fork-ts-checker-webpack-plugin > micromatch > snapdrag on > source-map-resolve > urix@0.1.0: Please see https://github.com/lydell/urix#deprecated warning @msdyn365-commerce/bootloader > fork-ts-checker-webpack-plugin > micromatch > snapdrag on > source-map-resolve > resolve-url@0.2.1: https://github.com/lydell/resolve-url#deprecated warning @msdyn365-commerce-modules/starter-pack > @msdyn365-commerce-modules/automation-utilit ies > axios@0.18.1: Critical security vulnerability fixed in v0.21.1. For more information, se e https://github.com/axios/axios/pull/3410 warning @msdyn365-commerce-modules/starter-pack > @msdyn365-commerce-modules/checkout-utilitie s > axios@0.18.1: Critical security vulnerability fixed in v0.21.1. For more information, see https://github.com/axios/axios/pull/3410 warning @msdyn365-commerce-modules/starter-pack > @msdyn365-commerce-modules/retail-actions > axios@0.18.1: Critical security vulnerability fixed in v0.21.1. For more information, see http s://github.com/axios/axios/pull/3410 warning @msdyn365-commerce-modules/starter-pack > @msdyn365-commerce-modules/cart > @msdyn365- commerce-modules/order-summary-utilities > axios@0.18.1: Critical security vulnerability fixed in v0.21.1. For more information, see https://github.com/axios/axios/pull/3410 warning @msdyn365-commerce-modules/starter-pack > @msdyn365-commerce-modules/buybox > @msdyn36 5-commerce-modules/bopis-utilities > axios@0.18.1: Critical security vulnerability fixed in v0 .21.1. For more information, see https://github.com/axios/axios/pull/3410 warning @msdyn365-commerce-modules/starter-pack > @msdyn365-commerce-modules/search > @msdyn36 5-commerce-modules/search-utilities > axios@0.18.1: Critical security vulnerability fixed in v 0.21.1. For more information, see https://github.com/axios/axios/pull/3410 warning @msdyn365-commerce-modules/starter-pack > @msdyn365-commerce-modules/utilities > react -popper > popper.js@1.16.1: You can find the new Popper v2 at @popperjs/core, this package is dedicated to the legacy v1 warning @msdyn365-commerce/retail-proxy > axios@0.18.1: Critical security vulnerability fixed in v0.21.1. For more information, see https://github.com/axios/axios/pull/3410 warning @types/reactstrap > popper.js@1.16.1: You can find the new Popper v2 at @popperjs/core , this package is dedicated to the legacy v1 warning jest > jest-cli > jest-config > babel-core > babel-runtime > core-js@2.6.12: core-js@< 3 is no longer maintained and not recommended for usage due to the number of issues. Please, u pgrade your dependencies to the actual version of core-js@3. warning jest > jest-cli > jest-haste-map > sane > fsevents@1.2.13: fsevents 1 will break on no de v14+ and could be using insecure binaries. Upgrade to fsevents 2. warning jest > jest-cli > jest-environment-jsdom > jsdom > request@2.88.2: request has been de precated, see https://github.com/request/request/issues/3142 warning jest > jest-cli > prompts > kleur@2.0.2: Please upgrade to kleur@3 or migrate to 'ansi -colors' if you prefer the old syntax. VisitIs there anything I can do to resolve or is this an issue on your side?
I'm using Windows 10, yarn
1.22.5
, node12.20.1