Syntax error when angular-cli.json has a $schema


#1

{
"$schema": “./node_modules/@angular/cli/lib/config/schema.json”,
“project”: {…}
}

When angular-cli.json has $schema a syntax error is generated during yarn test:

/home/ubuntu/hordeflow-angular/node_modules/@angular/cli/models/config/config.js:17
constructor(_configPath, schema, configJson, fallbacks = []) {
                                                       ^

SyntaxError: Unexpected token =
    at exports.runInThisContext (vm.js:53:16)
    at Module._compile (module.js:374:25)
    at Object.Module._extensions..js (module.js:417:10)
    at Module.load (module.js:344:32)
    at Function.Module._load (module.js:301:12)
    at Module.require (module.js:354:17)
    at require (internal/module.js:12:17)
    at Object.<anonymous> (/home/ubuntu/hordeflow-angular/node_modules/@angular/cli/models/config.js:3:18)
    at Module._compile (module.js:410:26)
    at Object.Module._extensions..js (module.js:417:10)
npm ERR! Test failed.  See above for more details.

npm test returned exit code 1

#2

This topic was automatically closed 41 days after the last reply. New replies are no longer allowed.