灿烂每一天 2023-05-13 23:30 采纳率: 33.3%
浏览 15

simple-coder快捷创建模块出错



```DOS命令
D:\LenovoSoftstore\Install\Java\CompanyPro>simple-coder admin-module Model
Input pramas: [ 'Model' ]
moduleName: Model
target Name: all
config path---> D:\LenovoSoftstore\Install\Java\CompanyPro\.templates\config.js
current target root Path-----> D:\LenovoSoftstore\Install\Java\CompanyPro
create all
create module[ model ]...
C:\Users\28929\AppData\Roaming\npm\node_modules\simple-coder\lib\code-tools.js:275
        for (let i=0; i<fields.length; i++){
                               ^

TypeError: Cannot read properties of null (reading 'length')
    at Object.loadES6ModuleObject (C:\Users\28929\AppData\Roaming\npm\node_modules\simple-coder\lib\code-tools.js:275:32)
    at createModuleFiles (C:\Users\28929\AppData\Roaming\npm\node_modules\simple-coder\lib\generators\admin-module-creator.js:167:32)
    at module.exports (C:\Users\28929\AppData\Roaming\npm\node_modules\simple-coder\lib\generators\admin-module-creator.js:275:22)
    at Command.<anonymous> (C:\Users\28929\AppData\Roaming\npm\node_modules\simple-coder\cli.js:92:85)
    at Command.listener [as _actionHandler] (C:\Users\28929\AppData\Roaming\npm\node_modules\simple-coder\node_modules\commander\lib\command.js:488:17)
    at C:\Users\28929\AppData\Roaming\npm\node_modules\simple-coder\node_modules\commander\lib\command.js:1227:65
    at Command._chainOrCall (C:\Users\28929\AppData\Roaming\npm\node_modules\simple-coder\node_modules\commander\lib\command.js:1144:12)
    at Command._parseCommand (C:\Users\28929\AppData\Roaming\npm\node_modules\simple-coder\node_modules\commander\lib\command.js:1227:27)
    at Command._dispatchSubcommand (C:\Users\28929\AppData\Roaming\npm\node_modules\simple-coder\node_modules\commander\lib\command.js:1050:25)
    at Command._parseCommand (C:\Users\28929\AppData\Roaming\npm\node_modules\simple-coder\node_modules\commander\lib\command.js:1193:19)

Node.js v18.16.0

五,命令行快捷代码工具
1.Simple-coder创建项目:
1.安装此工具

npm install -g simple-coder

2.创建项目代码:

simple-coder create project-name

3 根据提示选择项目类型。比如java-service/web/mini小程序 
1.  Simple-coder创建模块:
1.  创建新增web-admin模块(根据提示选择不同类型的模块):

cd project-name
simple-coder admin-module module-name
创建模块的时候报错是啥原因哇
  • 写回答

1条回答 默认 最新

  • 张启文 2023-05-16 17:16
    关注

    这个错误是由于simple-coder模块在执行时,读取了一个null值的属性,导致无法继续执行。具体来说,在代码中的某个地方,读取了一个变量,但该变量的值为null,然后尝试对该变量的属性进行操作,导致了TypeError异常。需要检查代码中的变量是否被正确初始化或赋值,以及是否存在null值的情况。如果无法解决,可以考虑更新simple-coder模块或者联系模块作者进行修复。

    评论

报告相同问题?

问题事件

  • 创建了问题 5月13日

悬赏问题

  • ¥15 rt-thread线程切换的问题
  • ¥20 python忆阻器数字识别
  • ¥15 无法输出helloworld
  • ¥15 高通uboot 打印ubi init err 22
  • ¥20 PDF元数据中的XMP媒体管理属性
  • ¥15 R语言中lasso回归报错
  • ¥15 网站突然不能访问了,上午还好好的
  • ¥15 有没有dl可以帮弄”我去图书馆”秒选道具和积分
  • ¥15 semrush,SEO,内嵌网站,api
  • ¥15 Stata:为什么reghdfe后的因变量没有被发现识别啊