redis / redis/node-redis

Error: Webpack compilation error

Open
#2,011 11 comments 3 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Bug
Dominant language
TypeScript
Stars
17.6k
Forks
2k
Avg merge
2d 3h
Merged PRs (30d)
40

Description

We are using Redis cache in our Node JS Typescript Lambda API. Also we using webpack to run or build the API. While running the API we get Webpack compilation error . Please find the details below

ERROR in ./node_modules/redis/dist/index.js
Module parse failed: Unexpected token (27:4)
You may need an appropriate loader to handle this file type.
| __exportStar(require("@node-redis/time-series"), exports);

Environment:

  • Node.js Version: nodejs14.x
  • Redis Server Version: 6.2.5
  • Node Redis Version:^4.0.4
  • Platform: Windows 10

Contributor guide

Open the contributing guide

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.

Research direction

Start by reproducing the Node.js 14.x build with Redis 4.0.4 and inspect the webpack configuration alongside node_modules/redis/dist/index.js, where the reported parse failure occurs. Compare the Lambda API build and runtime setup; done means the webpack compilation completes successfully without the reported module parse error.

Written by the indexing model from the issue text.

Assessment

Tech stack
node.js, redis, typescript, webpack
Domain
backend, build-system
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.