Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Unexpected token 'export' on webpack.config.js

Open
#289 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
25/100
Issue type
Bug
Clarity
Needs clarification
Activity status
Stale
Tech stack
javascript, node.js, webpack
Domain
build-system, cli

Research direction

Reproduce the failure with npx grapesjs-cli serve and the shown webpack.config.js, then trace how the configuration is loaded from the entry point in dist/cli.js. The work is done when the CLI can load the reported configuration without the Unexpected token 'export' error.

Written by the indexing model from the issue text.

Description

Error log:

❯ npx grapesjs-cli serve


Start the development server...


/path-to-my-project/webpack.config.js:1
export default ({ config }) => {
^^^^^^

SyntaxError: Unexpected token 'export'
    at internalCompileFunction (node:internal/vm:77:18)
    at wrapSafe (node:internal/modules/cjs/loader:1288:20)
    at Module._compile (node:internal/modules/cjs/loader:1340:27)
    at Module._extensions..js (node:internal/modules/cjs/loader:1435:10)
    at Module.load (node:internal/modules/cjs/loader:1207:32)
    at Module._load (node:internal/modules/cjs/loader:1023:12)
    at Module.require (node:internal/modules/cjs/loader:1235:19)
    at require (node:internal/modules/helpers:176:18)
    at z (/path-to-my-project/node_modules/grapesjs-cli/dist/cli.js:2:3246)
    at /path-to-my-project/node_modules/grapesjs-cli/dist/cli.js:2:5256
Dominant language
TypeScript
Stars
107
Forks
32
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from GrapesJS/cli

All issues in GrapesJS/cli

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.