简体   繁体   English

诊断未捕获的TypeError:__webpack_require __(…).createServer不是函数?

[英]Diagnosing Uncaught TypeError: __webpack_require__(…).createServer is not a function?

I have a vue project utilizing Stripe, however, just recently when I loaded up my workspace this error has been happening and I am pretty lost on how I can diagnose it. 我有一个使用Stripe的vue项目,但是,就在最近,当我加载工作区时,此错误一直在发生,我对如何诊断它非常迷惑。

Interestingly enough, my live version is working with no errors and they are the same exact version. 有趣的是,我的实时版本没有任何错误,并且它们是完全相同的版本。

I searched around for the last couple hours to see if I could find a fix and I updated all of my projects plugins with no luck. 我搜索了过去几个小时,看看是否可以找到修复程序,并且我运气不错地更新了所有项目插件。 I am not sure what step to take now. 我不确定现在要采取什么步骤。

Uncaught TypeError: __webpack_require__(...).createServer is not a function
    at Object.eval (webpack-internal:///./node_modules/stripe/lib/stripe.js:9)
    at eval (webpack-internal:///./node_modules/stripe/lib/stripe.js:354)
    at Object../node_modules/stripe/lib/stripe.js (app.js:7341)
    at __webpack_require__ (app.js:1427)
    at fn (app.js:801)
    at eval (webpack-internal:///./src/main.js:24)
    at Module../src/main.js (app.js:8065)
    at __webpack_require__ (app.js:1427)
    at fn (app.js:801)
    at Object.1 (app.js:8572)

here is the error 这是错误

The error indicates you're likely using stripe (intended to run server-side in Node) in the browser. 该错误表明您可能在浏览器中使用了stripe (打算在Node中运行服务器端)。 You should switch to stripe-client or import the stripe.js from CDN . 您应该切换到stripe-client从CDN导入stripe.js

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 未捕获的类型错误:__webpack_require__(...).context 不是 function - Uncaught TypeError: __webpack_require__(...).context is not a function 未捕获的类型错误:无法读取 __webpack_require__ 处未定义的属性“调用” - Uncaught TypeError: Cannot read property 'call' of undefined at __webpack_require__ TypeError: __webpack_require__(...).context 不是 function - 硬编码但不带参数 - TypeError: __webpack_require__(…).context is not a function - Works hardcoded but not with parameter __webpack_require__(...).context 不是 function - __webpack_require__(...).context is not a function React - ssh2 模块错误:未捕获的类型错误:__webpack_require__(...).constants 未定义 - React - ssh2 module Error: Uncaught TypeError: __webpack_require__(…).constants is undefined 未捕获的类型错误:__webpack_require__.r 不是函数 - Uncaught TypeError: __webpack_require__.r is not a function 未捕获的类型错误:__webpack_require__.e 不是 function - Uncaught TypeError: __webpack_require__.e is not a function 为什么webpack向'__webpack_require__'函数添加属性? - Why webpack add properties to '__webpack_require__' function? 在 __webpack_require__ 中的 NextJS 中构建错误 - Build errors in NextJS in __webpack_require__ 未在反射元数据上定义需求-__webpack_require__问题 - Require is not defined on reflect-metadata - __webpack_require__ issue
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM