question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

TypeError: require(...) is not a function

See original GitHub issue

demo: https://github.com/DengRiGuang/micro-main.git

TypeError: require(...) is not a function
    at Object.<anonymous> (D:\My\micro-main\vue.config.js:83:47)
    at Module._compile (internal/modules/cjs/loader.js:1072:14)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1101:10)
    at Module.load (internal/modules/cjs/loader.js:937:32)
    at Function.Module._load (internal/modules/cjs/loader.js:778:12)
    at Module.require (internal/modules/cjs/loader.js:961:19)
    at require (internal/modules/cjs/helpers.js:92:18)
    at exports.loadModule (D:\My\micro-main\node_modules\.pnpm\@vue+cli-shared-utils@5.0.0-beta.6\node_modules\@vue\cli-shared-utils\lib\module.js:86:14)
    at loadFileConfig (D:\My\micro-main\node_modules\.pnpm\@vue+cli-service@5.0.0-beta.6_63236f192bf91a0f67fdebc0d8d51b25\node_modules\@vue\cli-service\lib\util\loadFileConfig.js:30:20)
    at Service.loadUserOptions (D:\My\micro-main\node_modules\.pnpm\@vue+cli-service@5.0.0-beta.6_63236f192bf91a0f67fdebc0d8d51b25\node_modules\@vue\cli-service\lib\Service.js:323:44)

v0.1.0: image

v0.1.3: image

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:6

github_iconTop GitHub Comments

6reactions
apelingcommented, Oct 20, 2021

how did you solve it i am facing the same issue too

You need to add the .default. In version 0.1.0: require('unplugin-element-plus/webpack')({//options}) In versions 0.1.1 and up: require('unplugin-element-plus/webpack').default({//options})

0reactions
bossikillcommented, Jan 6, 2022

被坑+1

Read more comments on GitHub >

github_iconTop Results From Across the Web

NodeJs : TypeError: require(...) is not a function - Stack Overflow
I have read that this usually means that requireJS is not getting loaded properly yet I am not aware why or how to...
Read more >
TypeError: require(...) is not a function in Node.js | bobbyhadz
To solve the "TypeError: require(...) is not a function", make sure to place a semicolon between your require call and an immediately invoked...
Read more >
TypeError: require(...) is not a function · Issue #12990 - GitHub
When i run npm start , its show error like above. var model = require(path.join(__dirname, file))(sequelize, Sequelize.DataTypes); TypeError: ...
Read more >
"TypeError: require(...).listen is not a function" in socket.io
In this video I have shown " TypeError : require (...).listen is not a function "that you might face with connecting to ...
Read more >
TypeError require(…) is not a function || NodeJs - YouTube
In this video We will solve NodeJs TypeError require(…) is not a function Error Please follow the Video for Solving this Error.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found