jsonresume / resume-cli

CLI tool to easily setup a new resume 📑
https://jsonresume.org
MIT License
4.55k stars 383 forks source link

Getting " is undefined , expected undefined" #254

Closed arashout closed 3 years ago

arashout commented 7 years ago

When I run resume publish I get this error. I kept all the fields from the JSON schema untouched but I did add some of my own fields. Could that be reason for the error?

arashout commented 7 years ago

Removed my custom fields, here's what my resume.json looks like:

{
    "basics": {
        "name": "Arash Outadi",
        "label": "Engineering Student",
        "picture": "",
        "email": "arash.out@gmail.com",
        "phone": "111-111-1111",
        "website": "http://arashout.site",
        "summary": "I am a fourth year mechanical engineering student at UBC with a passion for programming. I've leveraged my programming skill at my past internships to build database applications, automate repetitive tasks, streamline processes and visualize data. I'm currently looking for a software engineering internship or a mechanical engineering internship that involves heavy programming.",
        "location": {
            "address": "redacted",
            "postalCode": "X1X 2X3",
            "city": "redacted",
            "countryCode": "CA",
            "region": "British Columbia",
        },
        "profiles": [
            {
                "network": "Github",
                "username": "arashout",
                "url": "https://github.com/arashout"
            }
        ]
    },
    "work": [
        {
            "company": "Andritz Ltd.",
            "position": "Engineering Co-op Student",
            "website": "",
            "startDate": "2016-08-22",
            "endDate": "2016-12-20",
            "summary": "The Delta Service Center is dedicated to supporting new construction and rebuilds of pulp and paper equipment such as continuous digesters, M&D digesters, vacuum washers, twin roll presses, Compaction Baffle FiltersTM, thick stock pumps, and recausticizing filters.",
            "highlights": [
                "Created Excel utilities with VBA that massively stream-lined SAP processes, saving Project Managers 10 hours every week",
                " Developed Python GUI database app with SQLite to reduce time searching for SAP materials by 50%"
            ]
        },
        {
            "company": "Canadian Logistics",
            "position": "Data Analyst Intern",
            "website": "",
            "startDate": "2015-12-27",
            "endDate": "2016-04-20",
            "summary": "",
            "highlights": [
                "Replaced manual processes with Python to efficiently consolidate all data saving 2 hours per day",
                "Improved hiring practices by analyzing compiled data to demonstrate the low retention rates associated with hiring through labor agencies",
                "Utilized Excel pivot tables to summarize, categorize, and present data allowing the owner to make informed decisions about company operations"
            ]
        }
    ],
    "projects": [
        {
            "name": "Strength Journal",
            "website": "https://play.google.com/store/apps/details?id=site.arashout.workoutnotebook",
            "summary": "An Android workout tracker that let’s you jump straight into recording your exercises",
            "technologies": [
                "Kotlin",
                "Java",
                "XML",
                "SQLite"
            ]
        },
        {
            "name": "Element Eraser",
            "website": "https://chrome.google.com/webstore/detail/element-eraser/cflkmoejpjmceaiahbjdkmehceccknce?hl=en",
            "summary": "A chrome extension that automatically removes any content that the user does not want to see. Furthermore users can save multiple profiles for any website",
            "technologies": [
                "JavaScript",
                "Chrome API",
                "HTML",
                "CSS"
            ]
        }
    ],
    "education": [
        {
            "institution": "University of British Columbia",
            "area": "Mechanical Engineering",
            "location": {
                "address": "",
                "postalCode": "",
                "city": "Vancouver",
                "countryCode": "CA",
                "region": "British Columbia",
            },
            "studyType": "Bachelor",
            "startDate": "2013-10-07",
            "endDate": "2018-04-21",
            "gpa": "3.6/4.33",
            "courses": []
        }
    ],
    "awards": [],
    "publications": [],
    "skills": [
        {
            "name": "General Programming",
            "level": "",
            "keywords": [
                "Python",
                "C++",
                "Java",
                "Kotlin",
                "C",
                "MATLAB",
                "VBA"
            ]
        },
        {
            "name": "Web Development",
            "level": "",
            "keywords": [
                "Flask",
                "Django",
                "Selenium",
                "Javascript",
                "HTML",
                "CSS"
            ]
        },
        {
            "name": "IDEs",
            "level": "",
            "keywords": [
                "Visual Studio",
                "Android Studio",
                "QtCreator",
                "PyCharm",
                "IntelliJ"
            ]
        }
    ],
    "languages": [
        {
            "language": "English",
            "fluency": "Native speaker"
        }
    ],
    "interests": [
        {
            "name": "",
            "keywords": ["Python","Machine Learning","Natural Language Process","Machine Learning"]
        }
    ],
    "references": []
}
maartenpaauw commented 7 years ago

I'm having the same issue.

daveaditya commented 7 years ago

https://github.com/jsonresume/resume-schema/blob/v1.0.0/examples/invalid/basics-wrong-type.json

According to the above mentioned link, I think empty JSON array and objects are not valid according to the validator. May be that's the reason you might be getting errors. Give it a try and let me know if it solves your problem.

arashout commented 7 years ago

Tested my json resume on this: https://jsonlint.com/ and I get the green light. In the test you linked I believe the reason those are invalid is because "basics" should be a object {} and "profiles" should be an array [].

Wenzel commented 7 years ago

Hi, I had the same issue, and removed the projects field. Now it works.

ghost commented 6 years ago

Does the cli not support projects?

Wenzel commented 6 years ago

Is anyone maintaining resume-cli anymore ? The last commit are from almost a year ago now .. :/

chrisdotcode commented 6 years ago

Hey, @Wenzel, to the best of my knowledge, all of the currently on-going effort is on the resume-schema project.

The ideology is to first get the schema right, and then the tooling. Please feel free to help us over there :slightly_smiling_face:

johnrocamora commented 6 years ago

@Wenzel Removing projects worked for me, thanks!

alisen commented 5 years ago

Same error with custom solution - https://github.com/jsonresume/resume-cli/issues/252#issuecomment-337712810

6bangs commented 5 years ago

Workaround: use the -F flag to bypass schema validation. I think this is caused because resume-cli hasn't been updated with the latest resume-schema.

thomasdavis commented 3 years ago

Yep, -F, until v1.0.0 is all up to date.