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

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

Closed
5 tasks done
spradlin-dev opened this issue Oct 24, 2019 · 8 comments · Fixed by #2303
Closed
5 tasks done

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

spradlin-dev opened this issue Oct 24, 2019 · 8 comments · Fixed by #2303

Comments

@spradlin-dev
Copy link

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"
  ]
}
@ruslan287
Copy link

Same issue

@kamilogorek
Copy link
Contributor

What Typescript compiler version are both of you using?

@ruslan287
Copy link

ruslan287 commented Oct 28, 2019

What Typescript compiler version are both of you using?

I have 2.4.2 version of typescript

@ruslan287
Copy link

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

@kingsley1996
Copy link

same issue :((
Package + Version: @sentry/browser (5.7.1)
Typescsript version: 2.3.2
Error:
[at-loader] ./node_modules/@sentry/utils/dist/is.d.ts:1:1 TS1084: Invalid 'reference' directive syntax.[at-loader] ./node_modules/@sentry/utils/dist/misc.d.ts:1:1 TS1084: Invalid 'reference' directive syntax.[at-loader] ./node_modules/@sentry/types/dist/severity.d.ts:4:13 TS1066: In ambient enum declarations member initializer must be constant expression.[at-loader] ./node_modules/@sentry/types/dist/severity.d.ts:6:13 TS1066: In ambient enum declarations member initializer must be constant expression.[at-loader] ./node_modules/@sentry/types/dist/severity.d.ts:8:15 TS1066: In ambient enum declarations member initializer must be constant expression.[at-loader] ./node_modules/@sentry/types/dist/severity.d.ts:10:11 TS1066: In ambient enum declarations member initializer must be constant expression.[at-loader] ./node_modules/@sentry/types/dist/severity.d.ts:12:12 TS1066: In ambient enum declarations member initializer must be constant expression.[at-loader] ./node_modules/@sentry/types/dist/severity.d.ts:14:13 TS1066: In ambient enum declarations member initializer must be constant expression.[at-loader] ./node_modules/@sentry/types/dist/severity.d.ts:16:16 TS1066: In ambient enum declarations member initializer must be constant expression.[at-loader] ./node_modules/@sentry/types/dist/status.d.ts:4:15 TS1066: In ambient enum declarations member initializer must be constant expression.[at-loader] ./node_modules/@sentry/types/dist/status.d.ts:6:15 TS1066: In ambient enum declarations member initializer must be constant expression.[at-loader] ./node_modules/@sentry/types/dist/status.d.ts:8:15 TS1066: In ambient enum declarations member initializer must be constant expression.[at-loader] ./node_modules/@sentry/types/dist/status.d.ts:10:17 TS1066: In ambient enum declarations member initializer must be constant expression.[at-loader] ./node_modules/@sentry/types/dist/status.d.ts:12:15 TS1066: In ambient enum declarations member initializer must be constant expression.[at-loader] ./node_modules/@sentry/types/dist/status.d.ts:14:14 TS1066: In ambient enum declarations member initializer must be constant expression.

tsconfig setup:

  "compileOnSave": true,
  "compilerOptions": {
    "baseUrl": ".",
    "module": "es2015",
    "moduleResolution": "node",
    "target": "es5",
    "lib": [
      "es6",
      "dom"
    ],
    "jsx": "react",
    "sourceMap": true,
    "skipDefaultLibCheck": true,
    "strict": false,
    "types": [
      "webpack-env"
    ],
    "removeComments": true,
    "experimentalDecorators": true
  },
  "exclude": [
    "bin",
    "node_modules"
  ]
}

@spradlin-dev
Copy link
Author

What Typescript compiler version are both of you using?

$ tsc --version
Version 2.9.2

@gyohza
Copy link

gyohza commented 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.

@kamilogorek
Copy link
Contributor

Fixed and merged into master. 5.8.0 will be released on Monday morning. #nodeployfridays

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants