<h3 dir="auto">Version</h3>
<p dir="auto">2.5.13</p>
<h3 dir="auto">Reproduction link</h3>
<p dir="auto"><a href="https://codesandbox.io/s/4895o6nm24" rel="nofollow">https://codesandbox.io/s/4895o6nm24</a></p>
<h3 dir="auto">Steps to reproduce</h3>
<p dir="auto">Using Typescript 2.7.1, importing Vue 2.5.13 results in <code class="notranslate">undefined</code>.</p>
<p dir="auto">To reproduce, create a blank .ts file:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="import Vue from &quot;vue&quot;;
console.log(Vue); // &lt;-- will be `undefined` (or `null` in Code Sandbox)"><pre class="notranslate"><code class="notranslate">import Vue from "vue";
console.log(Vue); // &lt;-- will be `undefined` (or `null` in Code Sandbox)
</code></pre></div>
<p dir="auto">This can be fixed by importing like:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="import * as Vue from &quot;vue&quot;;"><pre class="notranslate"><code class="notranslate">import * as Vue from "vue";
</code></pre></div>
<p dir="auto">... but then <code class="notranslate">new Vue()</code> returns the TS error:</p>
<blockquote>
<p dir="auto">test.ts (3,1): Cannot use 'new' with an expression whose type lacks a call or construct signature. (2351)</p>
</blockquote>
<p dir="auto">Changing this to <code class="notranslate">new Vue.default();</code> resolves the TS error, but then results in a Node error:</p>
<blockquote>
<p dir="auto">TypeError: Vue.default is not a constructor</p>
</blockquote>
<h3 dir="auto">What is expected?</h3>
<p dir="auto">No errors</p>
<h3 dir="auto">What is actually happening?</h3>
<p dir="auto">See above</p>
<p dir="auto"><strong>Note: I'm not using Webpack in this example.</strong> What I assume is happening (referencing the recommended <code class="notranslate">tsconfig.json</code> config) is that <code class="notranslate">import</code> statements are being as-is by Typescript, for Webpack to pick up and use properly.</p>
<p dir="auto">However, I think that this should be improved to work with Typescript <em>directly</em>, without requiring Webpack to enter the mix. This would benefit server-only environments where code transpilation isn't necessarily required.</p>
<h3 dir="auto">Version</h3>
<p dir="auto">2.5.13</p>
<h3 dir="auto">Reproduction link</h3>
<p dir="auto"><a href="https://github.com/marpstar/vue-typescript-import-problems">https://github.com/marpstar/vue-typescript-import-problems</a></p>
<h3 dir="auto">Steps to reproduce</h3>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="# Clone this repo
git clone https://github.com/marpstar/vue-typescript-import-problems.git

# Install dependencies
npm install

# Compile TS
tsc

# Launch app. You'll see an error &quot;vue_1.default is not a constructor&quot;
node build/main.js
"><pre class="notranslate"><code class="notranslate"># Clone this repo
git clone https://github.com/marpstar/vue-typescript-import-problems.git

# Install dependencies
npm install

# Compile TS
tsc

# Launch app. You'll see an error "vue_1.default is not a constructor"
node build/main.js

</code></pre></div>
<h3 dir="auto">What is expected?</h3>
<p dir="auto">I can create a new Vue instance using the constructor.</p>
<h3 dir="auto">What is actually happening?</h3>
<p dir="auto">I get an error "TypeError: vue_1.default is not a constructor"</p>
<hr>
<p dir="auto">I believe this is related to the issue <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="285641977" data-permission-text="Title is private" data-url="https://github.com/vuejs/vue/issues/7374" data-hovercard-type="issue" data-hovercard-url="/vuejs/vue/issues/7374/hovercard" href="https://github.com/vuejs/vue/issues/7374">#7374</a>, which I've included my comments below:</p>
<p dir="auto">I'm using <code class="notranslate">commonjs</code> output from TypeScript (no webpack). One similarity between OP and I is that we're both using the TypeScript <code class="notranslate">baseUrl</code> option. Something is definitely wrong with the standard import in TypeScript.</p>
<p dir="auto">I too am using Vue 2.5.13. I'm setting up SSR on Node 8.9.3 and TypeScript 2.6.  My <code class="notranslate">tsconfig.json</code> looks like this:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="{
  &quot;compilerOptions&quot;: {
    &quot;outDir&quot;: &quot;build&quot;,
    &quot;target&quot;: &quot;es6&quot;,
    &quot;module&quot;: &quot;commonjs&quot;,
    &quot;moduleResolution&quot;: &quot;node&quot;,
    &quot;sourceMap&quot;: true,
    &quot;emitDecoratorMetadata&quot;: true,
    &quot;experimentalDecorators&quot;: true,
    &quot;rootDir&quot;: &quot;./src&quot;,
    &quot;baseUrl&quot;: &quot;./src&quot;,
    &quot;noUnusedLocals&quot;: true
  },
  &quot;exclude&quot;: [
    &quot;node_modules&quot;,
    &quot;typings&quot;
  ]
}"><pre class="notranslate"><code class="notranslate">{
  "compilerOptions": {
    "outDir": "build",
    "target": "es6",
    "module": "commonjs",
    "moduleResolution": "node",
    "sourceMap": true,
    "emitDecoratorMetadata": true,
    "experimentalDecorators": true,
    "rootDir": "./src",
    "baseUrl": "./src",
    "noUnusedLocals": true
  },
  "exclude": [
    "node_modules",
    "typings"
  ]
}
</code></pre></div>
<p dir="auto">I tried a number of other workaround, including trying to load the vue.esm.js file via the <code class="notranslate">compilerOptions.paths</code> property, without success. I was getting the exact same <code class="notranslate">vue_1.default is not a constructor</code> error as OP.</p>