Skip to content

Problem with @handlebars/parser @ 2.2.0 #1669

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

Open
MichalBryxi opened this issue Apr 14, 2025 · 2 comments · May be fixed by #1670 or #1671
Open

Problem with @handlebars/parser @ 2.2.0 #1669

MichalBryxi opened this issue Apr 14, 2025 · 2 comments · May be fixed by #1670 or #1671

Comments

@MichalBryxi
Copy link

MichalBryxi commented Apr 14, 2025

Given app created like:

ember addon sandboxaddon
cd sandboxaddon/
pnpm install
pnpm exec ember install ember-cli-addon-docs
pnpm exec ember install ember-cli-addon-docs-yuidoc
pnpm start

On the last step I will get following error:

> [email protected] start /Users/michal/sandbox/sandboxaddon
> ember serve

require() of ES Module /Users/michal/sandbox/sandboxaddon/node_modules/.pnpm/@[email protected]/node_modules/@handlebars/parser/dist/cjs/index.js not supported.
Instead change the require of index.js in null to a dynamic import() which is available in all CommonJS modules.


Stack Trace and Error Report: /var/folders/8q/yrjx_8s115q43r8w5qd90_m00000gn/T/error.dump.374c2f832c85fd615c1e5d4c2fc23452.log
 ELIFECYCLE  Command failed with exit code 1.

This is somehow related to v2.2.0 of @handlebars/parser because when I add following to package.json:

  "pnpm": {
    "overrides": {
     "@handlebars/parser": "2.1.0"
    }
  }

And then re-start the process:

pnpm install
pnpm start

Then this error goes away.

@MichalBryxi
Copy link
Author

Related: handlebars-lang/handlebars-parser#20

@MichalBryxi
Copy link
Author

Should be fixed with: handlebars-lang/handlebars-parser#21

MichalBryxi added a commit to MichalBryxi/ember-cli-addon-docs that referenced this issue Apr 17, 2025
@MichalBryxi MichalBryxi linked a pull request Apr 17, 2025 that will close this issue
MichalBryxi added a commit to MichalBryxi/handlebars-parser that referenced this issue Apr 17, 2025
- As per [this issue in ember-cli-addon-docs](ember-learn/ember-cli-addon-docs#1669)
- As per [this Discord discussion](https://discord.com/channels/480462759797063690/484421898210377729/1361741610735370240)

1) _Correct_ solution is quite convoluted
2) Having _some_ documentation to be search-able seems like a good step anyway
3) Requiring `node>=20.19` internally seems like a good step anyway?
MichalBryxi added a commit to MichalBryxi/ember-cli-addon-docs that referenced this issue Apr 17, 2025
- Fixes ember-learn#1669

Caused by:

```
require() of ES Module .../.pnpm/@handlebars+parser@file+..+handlebars-parser/node_modules/@handlebars/parser/dist/cjs/index.js not supported.
Instead change the require of index.js in null to a dynamic import() which is available in all CommonJS modules.
```

When using older node in consuming app.
@MichalBryxi MichalBryxi linked a pull request Apr 17, 2025 that will close this issue
MichalBryxi added a commit to MichalBryxi/ember-cli-addon-docs that referenced this issue Apr 17, 2025
- Fixes ember-learn#1669

Caused by:

```
require() of ES Module .../.pnpm/@handlebars+parser@file+..+handlebars-parser/node_modules/@handlebars/parser/dist/cjs/index.js not supported.
Instead change the require of index.js in null to a dynamic import() which is available in all CommonJS modules.
```

When using older node in consuming app.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant