Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
1.1k views
in Technique[技术] by (71.8m points)

handlebars.js - handlebars-helpers /node_modules/log-utils/ cannot statically analyse 'require(..., ...)' webpack

I am installing the handlebars-helpers to my project.

After I added the "unlazy-loader" to my webpack file, the issue of

WARNING in ./node_modules/create-frame/utils.js 3:34-41 Critical dependency: require function is used in a way in which dependencies cannot be statically extracted

got resolved, however, I got an error:

./node_modules/logging-helpers/node_modules/log-utils/index.js Cannot statically analyse 'require(..., ...)' in line 21

question from:https://stackoverflow.com/questions/65857860/handlebars-helpers-node-modules-log-utils-cannot-statically-analyse-require

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

It seems it has been a long time since the last time handlebars-helpers and logging-helpers updated.

So there are some dependencies outdated.

I solved this issue by edit the node_modules/logging-helpers/package.json

updated it to:

"dependencies": {
    "isobject": "^3.0.0",
    "log-utils": "0.3.0"
  },

also, I updated the package-lock.json.

Then the issue got resolved.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...