-
-
Notifications
You must be signed in to change notification settings - Fork 6.3k
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
SyntaxError: Unexpected token import on fresh project #1475
Comments
So I suppose the initial issue will be gone once we add |
Can't reproduce. Please provide an actual reproduction: a repository that we can look into. |
Sure: https://github.com/matrunchyk/vue-cli-1475 Thanks for so fast feedback! |
Oh actually, you are not supposed to run |
@yyx990803 it is still the same. |
Unfortunately I can't reproduce this using your exact repo. |
6.1.0
v8.11.1 |
I did try with the exact same Node and npm versions with your repo and cannot reproduce it. |
Yeah, it was something to do with my cache. Now it's gone. Sorry for taking your time. |
Ok, so I'm having a similar issue @matrunchyk ... what cache are you referring to? NPM? |
Yes, it's under |
Hi @matrunchyk , I'm getting the same error, what did you do to clean the cache? |
@beeva-nurialopez |
I'm still getting the same error
[image: image.png]
Any idea, why it might be?
El mar., 2 oct. 2018 a las 9:48, Serhii Matrunchyk (<
[email protected]>) escribió:
… @beeva-nurialopez <https://github.com/beeva-nurialopez> rm -rf ~/.npm
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#1475 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AclnxlGe6qQLfpKl8eXk5ZMLHL-sMM56ks5ugxpCgaJpZM4Ua4ZI>
.
--
Un saludo,
Nuria López González
|
See #1584 discussion |
Typescript does not know how to handle vue files, therefore you need to place the following code in your index.d.ts fiile |
Version
3.0.0-beta.15
Reproduction link
http://take.ms/A60B9
Steps to reproduce
What is expected?
The test case is executed with no errors
What is actually happening?
Test suite failed to run
Adding the following block to
babel.config.js
fixes this particular errorbut it raises another error:
http://take.ms/jlxuP
And this happens because
import
doesn't work for some reason.When I change
import HelloWorld from '@/components/HelloWorld.vue';
to
const HelloWorld = require('../../src/components/HelloWorld.vue').default;
it works fine: http://take.ms/ILHes
P.S. Unaliased import doesn't work as well:
The text was updated successfully, but these errors were encountered: