question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[5.7.1] Typescript build failure: TS1084: Invalid 'reference' directive syntax

See original GitHub issue

Package + Version

  • @sentry/browser

Version:

5.7.1

Description

Upon updating @sentry/browser to latest (from 5.6.3 to 5.7.1) all builds are failing in typescript build:

ERROR in /var/jenkins/workspace/NavisphereCarrier.Website.Beta.PR/node_modules/@sentry/utils/dist/is.d.ts
[tsl] ERROR in /var/jenkins/workspace/NavisphereCarrier.Website.Beta.PR/node_modules/@sentry/utils/dist/is.d.ts(1,1)
      TS1084: Invalid 'reference' directive syntax.

ERROR in /var/jenkins/workspace/NavisphereCarrier.Website.Beta.PR/node_modules/@sentry/utils/dist/misc.d.ts
[tsl] ERROR in /var/jenkins/workspace/NavisphereCarrier.Website.Beta.PR/node_modules/@sentry/utils/dist/misc.d.ts(1,1)
      TS1084: Invalid 'reference' directive syntax.

tsconfig setup:

{
  "extends": "./tsconfig.json",
  "compilerOptions": {
    "module": "esnext" // this is required for code splitting
  },
  "exclude": [
    "node_modules",
    "**/*.spec.ts",
    "**/*.spec.tsx",
    "**/*.mock.ts",
    "dist",
    "test"
  ]
}
{
  "compileOnSave": false,
  "compilerOptions": {
    "jsx": "react",
    "sourceMap": true,
    "outDir": "./dist/out-tsc",
    "baseUrl": "src",
    "keyofStringsOnly": true,
    "paths": {
      "app/*": ["app/*"],
      "test/*": ["../test/*"]
    },
    "skipLibCheck": true,
    "declaration": false,
    "moduleResolution": "node",
    "emitDecoratorMetadata": true,
    "experimentalDecorators": true,
    "downlevelIteration": true,
    "target": "es5",
    "typeRoots": [
      "node_modules/@types"
    ],
    "lib": [
      "es2017.object",
      "es2016",
      "dom"
    ],
    "noImplicitAny": false,
    "suppressImplicitAnyIndexErrors": true
  },
  "exclude": [
    "node_modules"
  ]
}

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:1
  • Comments:8 (2 by maintainers)

github_iconTop GitHub Comments

5reactions
ruslan287commented, Oct 28, 2019

Upgrading to Typescript to the latest, 3.6.4, solve this specific issue, but I can’t upgrade my project to this new Typescript version because some breaking changes in typescript

1reaction
gyohzacommented, Nov 1, 2019

Same here. Using "typescript": "2.9.2".

Since I cannot upgrade TypeScript, I downgraded Sentry to 5.6.3, same working version reported by @spradlin-dev and it seems to be working just fine.

Read more comments on GitHub >

github_iconTop Results From Across the Web

node_modules/@types/node/index.d.ts(20,1): error TS1084
Has anybody else received this error? node_modules/@types/node/index.d.ts(20,1): error TS1084: Invalid 'reference' directive syntax.
Read more >
Microsoft/TypeScript - Gitter
When creating a typescript package, does the d.ts file in typings key of ... compiler it complains: error TS1084: Invalid 'reference' directive syntax....
Read more >
Tiledesk Dashboard: Error while building and ng serve on ...
ERROR in The Angular Compiler requires TypeScript >=2.7.2 and <2.10.0 but 3.9.10 was found instead. ... error TS1084: Invalid 'reference' directive syntax.
Read more >
node_modules/@types/node/index.d.ts(20,1): error TS1084
ts(20,1): error TS1084: Invalid 'reference' directive syntax. compilationnode.jstsconfigtypescript. I have a problem with typescript compilation.
Read more >
Problems to compile on new installation - Ionic Framework
d.ts, line: 10 Invalid 'reference' directive syntax. [12:08:44] typescript: node_modules/@types/node/base.d ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found