jsonld.js
jsonld.js copied to clipboard
Property name expected type of string but got null
Description
Trying to build a React App using jsonld in a sub node_module causes the following error.
/Users/xxxxxx/node_modules/jsonld/lib/jsonld.js: /Users/xxxxxx/node_modules/jsonld/lib/jsonld.js: Property name expected type of string but got null
There's only one instance of jsonld. v1.8.1
@xxx/[email protected] /Users/xxxxxx
└─┬ @api-platform/[email protected]
├─┬ @api-platform/[email protected]
│ └── [email protected] deduped
└── [email protected]
Builder Parcel.
.babelrc
presets: ["@babel/preset-react"],
plugins: [
"styled-components",
[
"module-resolver",
{
root: ["."],
alias: {
common: "./src/common",
components: "./src/components",
tests: "./tests"
}
}
]
]
};
.tsconfig
"compilerOptions": {
"outDir": "./dist/",
"module": "esNext",
"strictNullChecks": true,
"moduleResolution": "node",
"esModuleInterop": true,
"experimentalDecorators": true,
"jsx": "react",
"noUnusedParameters": true,
"noUnusedLocals": true,
"noImplicitAny": true,
"noImplicitThis": true,
"declaration": true,
"allowSyntheticDefaultImports": true,
"emitDecoratorMetadata": true,
"target": "es2019",
"lib": ["es5", "es6", "es7", "es2017", "dom"],
"sourceMap": true,
"types": ["react", "jest", "node"],
"baseUrl": "src",
"paths": {
"common/*": ["src/common/*"],
"components/*": ["src/components/*"],
"tests/*": ["tests/*"]
}
},
"include": ["src/**/*", "src/typings.d.ts"],
"exclude": ["./node_modules", "dist"]
}
I believe this might be caused by. the destructured require imports in the jsonld.js file
Do you have the line number or the offending code? Hard to guess where the problem might be.