简体   繁体   English

我不断收到以下错误:“错误:找不到模块'./framer'”

[英]I keep getting the following error: “Error: Cannot find module './framer'”

I keep encountering the same problem.我一直遇到同样的问题。 I'm making a website for a barbershop and I am trying to use google api to add events into a google calendar.我正在为理发店制作一个网站,我正在尝试使用 google api 将事件添加到 google 日历中。 I installed googleapis and framer, but it keeps saying that it can't find the framer module.我安装了googleapis和framer,但是一直说找不到framer模块。 I even uninstalled framer and reinstalled it, and it is still not working.I get the error when I use the following code:我什至卸载了framer并重新安装了它,它仍然无法正常工作。当我使用以下代码时出现错误:

const {google} = require('googleapis');

Error message:错误信息:

Uncaught Error: Cannot find module './framer'
    at webpackEmptyContext (protocol sync:2)
    at Array.map (<anonymous>)
    at Object../node_modules/http2/lib/protocol/index.js (index.js:46)
    at __webpack_require__ (bootstrap:856)
    at fn (bootstrap:150)
    at Object.<anonymous> (http.js:136)
    at Object../node_modules/http2/lib/http.js (http.js:1262)
    at __webpack_require__ (bootstrap:856)
    at fn (bootstrap:150)
    at Object../node_modules/http2/lib/index.js (index.js:18)
    at __webpack_require__ (bootstrap:856)
    at fn (bootstrap:150)
    at Object.<anonymous> (http2.js:16)
    at Object../node_modules/googleapis-common/build/src/http2.js (http2.js:249)
    at __webpack_require__ (bootstrap:856)
    at fn (bootstrap:150)
    at Object.<anonymous> (apirequest.js:23)
    at Object../node_modules/googleapis-common/build/src/apirequest.js (apirequest.js:304)
    at __webpack_require__ (bootstrap:856)
    at fn (bootstrap:150)
    at Object../node_modules/googleapis-common/build/src/index.js (index.js:24)
    at __webpack_require__ (bootstrap:856)
    at fn (bootstrap:150)
    at Object../node_modules/googleapis/build/src/apis/abusiveexperiencereport/index.js (index.js:17)
    at __webpack_require__ (bootstrap:856)
    at fn (bootstrap:150)
    at Object../node_modules/googleapis/build/src/apis/index.js (index.js:17)
    at __webpack_require__ (bootstrap:856)
    at fn (bootstrap:150)
    at Object../node_modules/googleapis/build/src/googleapis.js (googleapis.js:16)
    at __webpack_require__ (bootstrap:856)
    at fn (bootstrap:150)
    at Object../node_modules/googleapis/build/src/index.js (index.js:17)
    at __webpack_require__ (bootstrap:856)
    at fn (bootstrap:150)
    at Module.<anonymous> (timePicker.js:3)
    at Module../src/components/calendar/timePicker.js (timePicker.js:158)
    at __webpack_require__ (bootstrap:856)
    at fn (bootstrap:150)
    at Module.<anonymous> (Navbar.js:68)
    at Module../src/components/Appointment.js (Appointment.js:120)
    at __webpack_require__ (bootstrap:856)
    at fn (bootstrap:150)
    at Module.<anonymous> (protocol sync:9)
    at Module../src/App.js (App.js:42)
    at __webpack_require__ (bootstrap:856)
    at fn (bootstrap:150)
    at Module.<anonymous> (index.css?bb0a:82)
    at Module../src/index.js (index.js:18)
    at __webpack_require__ (bootstrap:856)

Bro first of all to use googleapis you will need a separate backend this is because the framer library uses the file system module which comes with nodejs but not available with react. Bro首先要使用googleapis,您将需要一个单独的后端,这是因为framer库使用nodejs附带的文件系统模块,但react不可用。 After all, it is a front-end library.毕竟是前端库。 A workaround is to use the REST API一种解决方法是使用 REST API

暂无
暂无

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

相关问题 我不断收到错误:找不到模块'./config.json/' - I keep getting Error: Cannot find module './config.json/' 收到以下错误:compare.js:1 未捕获的错误:找不到模块“ember” - Getting this following error: compare.js:1 Uncaught Error: Cannot find module 'ember' 获取节点模块错误(找不到模块) - Getting Node Module Error (Cannot find module) 为什么我总是抛出这个错误? 节点:内部 /modules /cjs/ loader 944 Throw Err ^(找不到模块) - Why do I keep getting throwing this error? node : internal /modules /cjs/ loader 944 Throw Err ^ (Cannot find module) 为什么我会收到“找不到模块 &#39;jsonLogic&#39;”错误? - Why am I getting a "Cannot find module 'jsonLogic'" error? 我仅在Chrome中不断收到以下错误:未捕获的TypeError:无法读取null的属性“值” - I keep getting the following error in Chrome only: Uncaught TypeError: Cannot read property 'value' of null 我在以下代码中不断收到错误“canvasContext.fillRect” - I keep getting the error "canvasContext.fillRect" in this following code 错误:当我运行gulp命令时,找不到模块“扳手”,出现此错误 - Error: Cannot find module 'wrench', I'm getting this error, when i run gulp command 我不断收到错误:$ injector:modulerr AngularJS模块错误。 - I keep getting Error: $injector:modulerr Module Error with AngularJS. 即使我添加了请求模块,也会收到“错误:找不到模块‘请求’” - Getting "Error: Cannot find module 'request'" even though I have added request module
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM