GithubHelp home page GithubHelp logo

Unexpected token: < about vue-jest HOT 4 CLOSED

CraigHarley avatar CraigHarley commented on August 22, 2024 2
Unexpected token: <

from vue-jest.

Comments (4)

kenhan168 avatar kenhan168 commented on August 22, 2024 1

I have just started learning Vue recently by following this post: https://medium.com/cleversonder/from-zero-to-hero-with-vue-advanced-components-parcel-dev-tools-fab980a62259

I have encountered the similar issue. As parcel complaints the tag is not valid in the vue file.

The completed source code for the tutorial by https://medium.com/@wesharehoodies is working from:
https://github.com/wesharehoodies/zero-to-hero-with-vue/tree/advanced-components-computed-props-watchers

However, if I delete the package-lock.json, delete the "node_modules" folder, and reinstall all packages again from package.json via "npm install", then the error occurs.

Therefore, it seems some of the dependent packages have broken the build process.

from vue-jest.

eddyerburgh avatar eddyerburgh commented on August 22, 2024

@CraigHarley Are you able to post a repo with a reproduction?

from vue-jest.

lben avatar lben commented on August 22, 2024

I have a similar problem. I don't know which of the several moving parts is creating this problem so I opened an issue here: vuejs-templates/webpack#1335

As I said, I don't know if this is a webpack issue, vue-jest issue, jest issue, vue-test-utils issue, babel issue, etc... issue but any help would be really appreciated. Thanks

from vue-jest.

eddyerburgh avatar eddyerburgh commented on August 22, 2024

The issue is that Jest is not using vue-jest to transform the SFC. If you're seeing this issue, it's likely that your configuration is incorrect. For example, it could be caused by the regex you're using in transform.

from vue-jest.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.