在小程序中引入第三方库segment,js page函数中添加 如下代码,编译通过,但是运行时报错:“VM153 WAService.js:2 Error: module "miniprogram_npm/segment/fs.js" is not defined,为什么又冒出个fs.js?小白求指点 谢谢
at h (VM153 WAService.js:2)”
Page({
.....
const Segment=require("../../miniprogram_npm/segment/index")
var segment=new Segment
segment.useDefault()
console.log(segment.doSegment(query))
}
e.error Error: module "miniprogram_npm/moment/locale/zh-cn.js" is not defined
at h (VM1736 WAService.js:2)
at r (VM1736 WAService.js:2)
at __REQUIRE__ (index.js:5)
at moment.js:5671
at loadLocale (moment.js:2094)
at getLocale (moment.js:2248)
at Function.getSetGlobalLocale [as locale] (moment.js:2114)
at Vi.onLoad (index.js:27)
at Vi.<anonymous> (VM1736 WAService.js:2)
at Vi.s.__callPageLifeTime__ (VM1736 WAService.js:2)
出现同样问题 有修复吗
你好,我也遇到了同样的问题,请问你解决了嘛QAQ