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.

error TS1036: Statements are not allowed in ambient contexts.

See original GitHub issue

Versions

  • vee-validate: 2.1.0-beta.1
  • vue: 2.5.16

Describe the bug node_modules/vee-validate/types/vee-validate.d.ts(163,2): error TS1036: Statements are not allowed in ambient contexts. will be printed when executing npx tsc --noEmit --allowSyntheticDefaultImports false

To Reproduce Steps to reproduce the behavior:

  1. Create a new npm project
  2. Add typescript in Version 2.8.4
  3. Add vee-validate in Version 2.1.0-beta.1
  4. Add a tsconfig.json as descripted in Additional context
  5. Execute npx tsc --noEmit --allowSyntheticDefaultImports false

Expected behavior node_modules/vee-validate/types/vee-validate.d.ts(163,2): error TS1036: Statements are not allowed in ambient contexts. will be printed when executing npx tsc --noEmit --allowSyntheticDefaultImports false

Desktop (please complete the following information):

  • OS: Linux (Ubuntu 18.04)
  • Node Version: 10.3.0
  • NPM Version: 6.1.0
  • Typescript Version: 2.8.4

Additional context tsconfig.json

{
  "compilerOptions": {
    "target": "es5",
    "module": "esnext",
    "allowSyntheticDefaultImports": true,
    "moduleResolution": "node",
    "strict": true,
    "lib": [
      "esnext",
      "dom",
      "dom.iterable"
    ],
    "outDir": "built"
  },
  "include": [
    "./src/**/*.ts",
    "./src/**/*.vue"
  ],
  "exclude": [
    "./node_modules",
    "./built"
  ]
}

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:1
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
logaretmcommented, Jun 6, 2018

Unfortunately I Will not be able to publish a release until Sunday. Will check if a team member can.

On Wed, 6 Jun 2018, 15:22 Luca Steeb, notifications@github.com wrote:

Thanks for fixing. Can you please publish on npm?

— You are receiving this because you modified the open/close state.

Reply to this email directly, view it on GitHub https://github.com/baianat/vee-validate/issues/1365#issuecomment-395066292, or mute the thread https://github.com/notifications/unsubscribe-auth/AF-KSibT48KBXXwCkTmBbOJzwjzkBF9Vks5t59eLgaJpZM4UZJoG .

1reaction
steebchencommented, Jun 6, 2018

Thanks for fixing. Can you please publish on npm?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Statements are not allowed in ambient contexts
These two things combined together are the problem: I made a index.d.ts file. I am trying to assign a function to String.prototype.
Read more >
error TS1036: Statements are not allowed in ambient ...
Hi, I'm having an issue when i'm trying to start my nativescript project. It happens every time just after I add firebase plugin...
Read more >
Microsoft/TypeScript
... recieve the error TS1036: Statements are not allowed in ambient contexts . ... is like a header file except it can only...
Read more >
[SOLVED] An Implementation Cannot Be Declared in ...
Ambient declarations only exist in the type system and are erased at runtime, so they are not meant to contain implementations. The car...
Read more >
TypeScript errors and how to fix them
error TS1036: Statements are not allowed in ambient contexts. Broken Code ❌. 1 2 3 4 5
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