gpt4 book ai didi

javascript - 阿多尼斯 5.0 TypeError : Cannot read property 'length' of undefined

转载 作者:行者123 更新时间:2023-12-04 17:19:13 24 4
gpt4 key购买 nike

我正在尝试在安装后使用 node ace invoke @adonisjs/lucid 在 adonis 5.0 上设置 lucid

操作系统:Windows 10 Node 版本:14.6.1npx版本:6.14.12

预期结果

--设置lucid

实际结果

TypeError: Cannot read property 'length' of undefined

1 列

C:\Users\user\Documents\Code\testapp\node_modules\@adonisjs\ace\node_modules\leven\index.js:14

2 匿名

C:\Users\user\Documents\Code\testapp\node_modules\@adonisjs\ace\build\src\Kernel\index.js:298

3 Kernel.getSuggestions

C:\Users\user\Documents\Code\testapp\node_modules\@adonisjs\ace\build\src\Kernel\index.js:297

4 内核.execMain

C:\Users\user\Documents\Code\testapp\node_modules\@adonisjs\ace\build\src\Kernel\index.js:169

5 内核句柄

C:\Users\user\Documents\Code\testapp\node_modules\@adonisjs\ace\build\src\Kernel\index.js:477

6 应用程序句柄

C:\Users\user\Documents\Code\testapp\node_modules\@adonisjs\core\build\src\Ignitor\Ace\App\index.js:286

7 Ace.handle

C:\Users\user\Documents\Code\testapp\node_modules\@adonisjs\core\build\src\Ignitor\Ace\index.js:33

更新

这是评论部分要求的我的 package.json 文件中的代码。

{
"name": "testapp",
"version": "1.0.0",
"private": true,
"scripts": {
"build": "node ace build --production",
"start": "node server.js",
"dev": "node ace serve --watch",
"lint": "eslint . --ext=.ts",
"format": "prettier --write ."
},
"devDependencies": {
"@adonisjs/assembler": "^5.0.1",
"adonis-preset-ts": "^2.1.0",
"eslint": "^7.25.0",
"eslint-config-prettier": "^8.3.0",
"eslint-plugin-adonis": "^1.3.0",
"eslint-plugin-prettier": "^3.4.0",
"pino-pretty": "^4.7.1",
"prettier": "^2.2.1",
"typescript": "^4.1.5",
"youch": "^2.2.1",
"youch-terminal": "^1.1.0"
},
"dependencies": {
"@adonisjs/core": "^5.0.4-preview-rc-2.1",
"@adonisjs/lucid": "^10.0.0",
"@adonisjs/repl": "^1.1.6",
"@adonisjs/session": "^4.0.6",
"@adonisjs/view": "^3.1.0",
"proxy-addr": "^2.0.6",
"reflect-metadata": "^0.1.13",
"source-map-support": "^0.5.19"
}
}

最佳答案

我遇到了类似的问题。这似乎是在我更新汇编程序时发生的。

我更新了以下软件包并为我修复了它:

npm i @adonisjs/assembler@latest --save-dev
npm i @adonisjs/core@latest --save

如果您注意到您的 package.json,您可以看到您正在预览核心包 "@adonisjs/core": "^5.0.4-preview-rc -2.1"

希望这对您有所帮助。

关于javascript - 阿多尼斯 5.0 TypeError : Cannot read property 'length' of undefined,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/67245738/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com