Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

加载模块失败 #5

Closed
jianyun8023 opened this issue May 11, 2018 · 11 comments
Closed

加载模块失败 #5

jianyun8023 opened this issue May 11, 2018 · 11 comments
Labels

Comments

@jianyun8023
Copy link

你好,我使用electron-vue脚手架构建项目,添加到package.json后,安装,在vue里面引入你的模块.运行后,提示我Cannot find module 'vue-cron'

@1615450788
Copy link
Owner

请确认是否已引入模块 npm install vue-cron

@jianyun8023
Copy link
Author

确定引入了

@jianyun8023
Copy link
Author

引入了源码,搞定了.
我是勉强能用node的东西,自己私下拿来玩的.我猜测原因可能是引入模块后,webpack再次进行打包,导致找不到模块.
直接引入编译后的js,会报 Cannot assign to read only property 'exports' of object '#<Object>'解决办法
不过不喜欢这种方式,我选择引入你的源码编译.
对功能上提供个建议:希望增加cron反解析到ui和最近几次运行时间显示.

@quixote1304629
Copy link

棒!我可以成功引入了。npm install后我也遇到找不到cron.min.js的问题。然后在报错信息里有一句提醒::npm install -save babel-polyfill(命令可能写错,我勉强记忆的),运行后再次npm install一下,便解决了。

@quixote1304629
Copy link

想问下作者,以后能不能将 ‘周’ 的时间规则单独展示。不过现在这个已经很nice啦

@jianyun8023
Copy link
Author

我的是在浏览器控制台上报 找不到vue-cron模块

@1615450788
Copy link
Owner

@Piedpiperr 之前有考虑过将周单独抽离出来,但是发现周跟天的逻辑是有一定关联性的,而且目前已有的一些在线cron表达式生成器都没有单独出周来配置,所以我也就照旧了!

@1615450788
Copy link
Owner

1615450788 commented May 15, 2018

@yihy 之前是有考虑过源码引入的,但是由于目前大家使用构建工具都是习惯性不编译node_modules的,而且社区中的同类型大型开源项目都未使用源码依赖如ElementUI,所以我使用了预发布压缩包的方式提供默认依赖,当然,如果你想实时修改或者调试完全可以依赖源码,至于你说的cron.min.js引入会报错的问题我会去检查一下

@1615450788
Copy link
Owner

@yihy 还有,你说的表达式的解析及反解析的问题,是我下个版本的计划,当然,如果可以的话也欢迎你的贡献:blush:

@jianyun8023
Copy link
Author

@1615450788 我简单看过源码.有空的时候,我去尝试修改修改.

@1615450788
Copy link
Owner

1615450788 commented May 15, 2018

已于v1.0.7版本中修复 @yihy @Piedpiperr

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants