jsonld.js icon indicating copy to clipboard operation
jsonld.js copied to clipboard

Property name expected type of string but got null

Open MarkLyck opened this issue 4 years ago • 1 comments

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

MarkLyck avatar Feb 25 '20 19:02 MarkLyck

Do you have the line number or the offending code? Hard to guess where the problem might be.

davidlehn avatar Feb 27 '20 02:02 davidlehn