Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

opts is undefined #47

Open
mattiaskagstrom opened this issue Dec 13, 2021 · 0 comments · May be fixed by #48
Open

opts is undefined #47

mattiaskagstrom opened this issue Dec 13, 2021 · 0 comments · May be fixed by #48

Comments

@mattiaskagstrom
Copy link

mattiaskagstrom commented Dec 13, 2021

ajv.opts.code.formats ??= _`require("ajv-formats/dist/formats").${exportName}`

[error] TypeError: Cannot read properties of undefined (reading 'code')
at addFormats (D:\repos\GPD Analys\GPDAnalys\Presentation\GPD.Web.UI.V2\node_modules\ajv-formats\dist\index.js:30:26)
at formatsPlugin (D:\repos\GPD Analys\GPDAnalys\Presentation\GPD.Web.UI.V2\node_modules\ajv-formats\dist\index.js:15:5)
at new CoreSchemaRegistry (D:\repos\GPD Analys\GPDAnalys\Presentation\GPD.Web.UI.V2\node_modules@angular-devkit\core\src\json\schema\registry.js:92:35)
at runCommand (D:\repos\GPD Analys\GPDAnalys\Presentation\GPD.Web.UI.V2\node_modules@angular\cli\models\command-runner.js:114:22)
at default_1 (D:\repos\GPD Analys\GPDAnalys\Presentation\GPD.Web.UI.V2\node_modules@angular\cli\lib\cli\index.js:70:69)

Project builds when adding a ?.

ajv.opts?.code.formats ??= _require("ajv-formats/dist/formats").${exportName}

"resolutions": { "path-parse": "1.0.7", "ws": "7.5.6", "ajv": "6.12.6", "ajv-keywords": "3.5.2" }, "private": true, "dependencies": { "@angular/animations": "~13.1.0", "@angular/cdk": "^13.1.0", "@angular/common": "~13.1.0", "@angular/compiler": "~13.1.0", "@angular/core": "~13.1.0", "@angular/flex-layout": "13.0.0-beta.36", "@angular/forms": "~13.1.0", "@angular/localize": "^13.1.0", "@angular/platform-browser": "~13.1.0", "@angular/platform-browser-dynamic": "~13.1.0", "@angular/router": "~13.1.0", "@fortawesome/angular-fontawesome": "^0.10.1", "@fortawesome/fontawesome-svg-core": "^1.2.36", "@fortawesome/free-regular-svg-icons": "^5.15.4", "@fortawesome/free-solid-svg-icons": "^5.15.4", "@ng-bootstrap/ng-bootstrap": "^10.0.0", "bootstrap": "^4.6.0", "dayjs": "^1.10.4", "details-polyfill": "^1.2.0", "font-awesome": "^4.7.0", "geojson": "^0.5.0", "moment": "^2.29.1", "ng2-date-picker": "^11.0.0", "ngx-moment": "^5.0.0", "ol": "6.5.0", "proj4": "^2.7.2", "rxjs": "~7.4.0", "tslib": "^2.2.0", "zone.js": "~0.11.4" }, "devDependencies": { "@angular-devkit/build-angular": "~13.1.0", "@angular/cli": "13.1", "@angular/compiler-cli": "^13.1.0", "@angular/language-service": "^13.1.0", "@istanbuljs/nyc-config-typescript": "^1.0.1", "@types/jasmine": "~3.7.4", "@types/jasminewd2": "^2.0.9", "@types/node": "~15.6.0", "ajv": "^8.8.2", "ajv-formats": "^2.1.1", "ajv-keywords": "^5.1.0", "codelyzer": "^6.0.2", "jasmine-core": "~3.7.1", "jasmine-spec-reporter": "~7.0.0", "karma": "~6.3.2", "karma-chrome-launcher": "~3.1.0", "karma-coverage-istanbul-reporter": "~3.0.3", "karma-jasmine": "~4.0.1", "karma-jasmine-html-reporter": "^1.6.0", "nyc": "^15.1.0", "postcss": "8.2.15", "source-map-support": "^0.5.19", "ts-node": "~10.0.0", "tslint": "^6.1.3", "typescript": "4.4.4" },

mattiaskagstrom added a commit to mattiaskagstrom/ajv-formats that referenced this issue Dec 13, 2021
@mattiaskagstrom mattiaskagstrom linked a pull request Dec 13, 2021 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging a pull request may close this issue.

1 participant