apostrophecms / apostrophe

A full-featured, open-source content management framework built with Node.js that empowers organizations by combining in-context editing and headless architecture in a full-stack JS environment.
https://apostrophecms.com
Other
4.36k stars 590 forks source link

Fix pnpm: true #4750

Closed myovchev closed 1 month ago

myovchev commented 1 month ago

Summary

Fix a problem when using pnpm option:

// app.js
require('apostrophe')({
  pnpm: true
});

that results in Apostrophe crash "can not invoke add of undefined".

What are the specific steps to test this change?

Adding the option above is not crashing the instance.

What kind of change does this PR introduce?

(Check at least one)

Make sure the PR fulfills these requirements:

If adding a new feature without an already open issue, it's best to open a feature request issue first and wait for approval before working on it.

Other information: