草庐IT

cannot-find-symbol

全部标签

javascript - 模块构建失败(来自 ./node_modules/babel-loader/lib/index.js): Error: Cannot find module 'babel-preset-react'

在尝试使用Webpack4和Babel7构建React应用程序时,我遇到了以下错误。ERRORin./src/index.jsModulebuildfailed(from./node_modules/babel-loader/lib/index.js):Error:Cannotfindmodule'babel-preset-react'from'/Users/me/Desktop/reflask'-Ifyouwanttoresolve"react",use"module:react"-Didyoumean"@babel/react"?atFunction.module.exports[

javascript - require.js 未捕获类型错误 : cannot read property '__module_path__; of undefined

所以我刚刚开始尝试掌握require.js,但它似乎不起作用。当我使用标签将其包含在我的html中时:在chrome中加载页面时出现以下错误UncaughtTypeError:Cannotreadproperty'__MODULE_PATH__'ofundefined->require.js:538在firefox中我得到一个稍微不同的错误:TypeError:parentisundefined->require.js:538不知道我怎么会导致这个问题,因为它是require.js的全新安装,我的main.js中还没有代码。提前致谢 最佳答案

javascript - mongoose .find() 方法返回具有不需要属性的对象

因此,我使用mongoose已经有一段时间了,我发现了一些非常奇怪的事情。如果有人能启发我,那就太好了。问题是,当使用Mongoose的.find()方法时,我作为响应获得的对象充满了我不知道它来自哪里的属性(我猜它们是内置属性,但是随便),我只想遍历我.select()的属性。知道了?不?好的...更好地解释:我声明了我的架构和模型:varmySchema=mongoose.Schema({name:String,prop1:String,prop2:String,prop3:String})varmyModel=DB.model('myDataBase',mySchema)然后我想

javascript - 未捕获的类型错误 : cannot read property 'innerHTML' of null

谁能解释一下这个错误是什么?UncaughtTypeError:cannotreadproperty'innerHTML'ofnull这是导致问题的行:varidPost=document.getElementById("status").innerHTML; 最佳答案 varidPost=document.getElementById("status").innerHTML;您的网页中不存在“状态”元素。因此document.getElementById("status")返回null。虽然您不能使用NULL的innerHTML属

javascript - 错误 : Cannot find module 'jade~'

我是Nodejs的新手。我使用CompoundJs创建了一个crud操作。应用程序运行良好,直到我尝试提醒一个值,之后我收到错误500Error:Cannotfindmodule'jade~'atFunction.Module._resolveFilename(module.js:338:15)atFunction.Module._load(module.js:280:25)atModule.require(module.js:362:17)atrequire(module.js:378:17)如何解决这个问题我的索引#tabsullia(href='#tabs-1')NewLeave

javascript - ruby rails : "couldn' t find file 'jquery.ui.datepicker' "

好吧,这让我抓狂。我一直按照说明在此处安装JQuery日期选择器:http://railscasts.com/episodes/213-calendars-revised但我被这个错误挂断了:Sprockets::FileNotFoundinVerifications#newcouldn'tfindfile'jquery.ui.datepicker'(in/app/assets/stylesheets/application.css:11)这是application.js://=requirejquery//=requirejquery.ui.all//=requirejquery_u

javascript - 带有 Lambda 的 Graphql Yaga Playground - "Server cannot be reached"

我正在使用servlerless/lambda设置graphql端点,并且在尝试连接到graphql-yoga附带的graphqlplayground时收到错误。当我去到有Playground(/playground)的路线时,它会启动Playground界面,但它只是说:Servercannotbereached在Playground的右上角。值得注意的是,我正在使用makeRemoteExecutableSchema实用程序来代理到另一个graphql端点(这是我的名为Prismic的CMS)。我不认为这是问题所在,因为在普通的快速服务器上进行测试时,我已经成功地将它连接到Play

javascript - 排除符号链接(symbolic link)的 npm WARN 是什么意思?

npmWARNexcludingsymboliclink是什么意思?我该如何让它消失? 最佳答案 当npm与TAR文件交互时会发出消息。当它检测到正在使用符号链接(symboliclink)时,它会发出警告。例如,您尝试通过npm安装的存档可能包含符号链接(symboliclink)。这些链接不会在您的本地文件系统上创建并被忽略。 关于javascript-排除符号链接(symboliclink)的npmWARN是什么意思?,我们在StackOverflow上找到一个类似的问题:

javascript - 未捕获的类型错误 : Cannot read property 'focus' of undefined

此问题在我的页面加载时发生。使用以下脚本-jquery.simplemodal-1.4.3.js-jqueryv1.7.1下面是一个小代码快照,是发生此错误的simplemodal内的代码。focus:function(pos){vars=this,p=pos&&$.inArray(pos,['first','last'])!==-1?pos:'first';//focusondialogorthefirstvisible/enabledinputelementvarinput=$(':input:enabled:visible:'+p,s.d.wrap);setTimeout(fun

javascript - Typescript "Cannot assign to property, because it is a constant or read-only"即使属性未标记为只读

我有以下代码typeSetupProps={defaults:string;}exportclassSetupextendsReact.Component{constructor(props:any){super(props);this.props.defaults="Whatever";}尝试运行此代码时,TS编译器返回以下错误:Cannotassignto'defaults'becauseitisaconstantoraread-onlyproperty.deafualts是只读属性,但显然没有这样标记。 最佳答案 您正在扩展R