Skip to content
This repository has been archived by the owner on Jun 13, 2022. It is now read-only.

TypeError: Cannot read property 'systems' of undefined #61

Closed
phoenixx opened this issue Nov 16, 2018 · 3 comments
Closed

TypeError: Cannot read property 'systems' of undefined #61

phoenixx opened this issue Nov 16, 2018 · 3 comments
Labels
bug Something isn't working

Comments

@phoenixx
Copy link

  • [x ] I confirm that this is a issue rather than a question.

Bug report

When attempting to run yarn run new-incident I receive an error Cannot read property 'systems' of undefined.

I believe I have tracked this down to the node_modules\@statusfy\core\lib\new-incident.js file which loads the config.

At line 22 the config is loaded with const config = loadConfig(sourceDir). When config is used at line 52 we are trying to access the content.systems property which actually exists at config.config.content.systems rather than config.content.systems. The config file used is copied below.

When I update the new-incident.js file to use config.config... this error no longer persists, but I now receive an error at line 9 of new-incident.js that suggests that frontMatter is undefined

Version

Steps to reproduce

  1. Create a new empty directory
  2. Run statusfy init
  3. Fill in values for title/description etc
  4. Run yarn (to install dependencies)
  5. Run yarn run new-incident
  6. Fill in incident details
  7. Receive error TypeError: Cannot read property 'systems' of undefined

image

What is expected?

Expected: A new indicident markdown file will be generated

What is actually happening?

No markdown file is generated

Other relevant information

In order to get statusfy to work on my system I first have to run statusfy init then receive the error (node:32356) UnhandledPromiseRejectionWarning: Error: ENOENT: no such file or directory, stat 'C:/Users/{username}/AppData/Roaming/npm/node_modules/statusfy/node_modules/@statusfy/core/lib/init/.gitignore'. To resolve this I then have to run yarn (to install dependencies). I am then successfully able to run yarn dev and browse to the example site.

  • Your OS: Windows 10 (10.0.17758.0)
  • Node.js version: v10.13.0
  • Browser version: Chrome 64 bit (70.0.3538.102)
  • Is this a global or local install? Both - tried global and local
  • Which package manager did you use for the install? Yarn
@welcome
Copy link

welcome bot commented Nov 16, 2018

Thanks for opening this issue, a maintainer will get back to you shortly! Be sure to follow the issue template! 🤓

@giovagnoli giovagnoli added the bug Something isn't working label Nov 16, 2018
dz0ny added a commit to dz0ny/statusfy that referenced this issue Nov 16, 2018
@dz0ny dz0ny mentioned this issue Nov 16, 2018
18 tasks
@juliomrqz
Copy link
Owner

Hello, @phoenixx. This bug is now fixed in the version v0.1.1.

@juliomrqz juliomrqz reopened this Nov 17, 2018
@phoenixx
Copy link
Author

Excellent. Thanks @juliomrqz

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants