Error: Cannot read property 'length' of undefined

Example app is giving me this error. Do you have any idea for why this might happen?

My node version is v14.15.5

todo-app-custom-ui> forge deploy --verbose
Deploying your app to the development environment.

Running forge lint...

Error: Cannot read property 'length' of undefined

TypeError: Cannot read property 'length' of undefined
    at Function.glob.hasMagic (C:\Users\Odin\AppData\Roaming\npm\node_modules\@forge\cli\node_modules\glob\glob.js:110:30)
    at FileSystemReader.hasGlobSpecialChars (C:\Users\Odin\AppData\Roaming\npm\node_modules\@forge\cli\node_modules\@forge\cli-shared\out\file-system\file-system-reader.js:56:23)
    at C:\Users\Odin\AppData\Roaming\npm\node_modules\@forge\cli\node_modules\@forge\cli-shared\out\shared\read-app-config-files.js:13:30
    at Array.map (<anonymous>)
    at Object.exports.listGitIgnoreFiles (C:\Users\Odin\AppData\Roaming\npm\node_modules\@forge\cli\node_modules\@forge\cli-shared\out\shared\read-app-config-files.js:12:82)
    at LintService.run (C:\Users\Odin\AppData\Roaming\npm\node_modules\@forge\cli\out\service\lint-service.js:13:49)
    at DeployController.verifyPreDeployment (C:\Users\Odin\AppData\Roaming\npm\node_modules\@forge\cli\out\command-line\controller\deploy-controller.js:29:56)
    at DeployController.run (C:\Users\Odin\AppData\Roaming\npm\node_modules\@forge\cli\out\command-line\controller\deploy-controller.js:52:24)
    at C:\Users\Odin\AppData\Roaming\npm\node_modules\@forge\cli\out\command-line\register-deployment-commands.js:14:50
    at Command.actionProcessor (C:\Users\Odin\AppData\Roaming\npm\node_modules\@forge\cli\out\command-line\command.js:74:38)

Hi @OdinSon,

Have you run forge register?

Also, have you installed dependencies and built the Custom UI resource? You may need to run cd ./static/spa && npm install && npm run build && cd ../.. before deploying again.

1 Like

Hi,

yes I had run “forge register”. That did not solve problem. I am not developing this app anymore. We can close the question.