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

No parser and no filepath given, using 'babel' the parser now but this will throw an error in the future. #3356

Closed
zjun2 opened this issue Jan 23, 2019 · 9 comments
Labels
needs team repro We acknowledged your report and will soon try to reproduce it

Comments

@zjun2
Copy link

zjun2 commented Jan 23, 2019

Version

3.3.0

Reproduction link

https://github.com/410919244/mp-web.git

Environment info

Environment Info:

  System:
    OS: Windows 10
    CPU: (8) x64 Intel(R) Core(TM) i7-7700 CPU @ 3.60GHz
  Binaries:
    Node: 11.7.0 - C:\Program Files\nodejs\node.EXE
    Yarn: 1.13.0 - C:\word\yarn\bin\yarn.CMD
    npm: 6.5.0 - C:\Program Files\nodejs\npm.CMD
  Browsers:
    Edge: 38.14393.2068.0
  npmPackages:
    vue: ^2.5.2 => 2.5.16
    vue-hot-reload-api: ^2.2.4 => 2.3.0
    vue-html-loader: ^1.2.3 => 1.2.4
    vue-loader: ^13.5.0 => 13.7.1
    vue-router: ^3.0.1 => 3.0.1
    vue-style-loader: ^3.0.3 => 3.1.2
    vue-template-compiler: ^2.2.1 => 2.5.16
    vue-template-es2015-compiler:  1.6.0
    vuex: ^2.2.1 => 2.5.0
  npmGlobalPackages:
    @vue/cli: Not Found

Steps to reproduce

yarn install
yarn run serve

What is expected?

100%

What is actually happening?

No parser and no filepath given, using 'babel' the parser now but this will throw an error in the future. Please specify a parser or a filepath so one can be inferred. 65% building 866/940 modules 74 active ...les\vux\src\components\sticky\index.vue
No parser and no filepath given, using 'babel' the parser now but this will throw an error in the future. Please specify a parser or a filepath so one can be inferred. 65% building 869/940 modules 71 active ...les\vux\src\components\sticky\index.vue


The error message should be that there is a problem in the configuration. There is no solution on the internet. My technical ability can not solve this problem.

@LinusBorg LinusBorg added the needs team repro We acknowledged your report and will soon try to reproduce it label Jan 23, 2019
@haoqunjiang
Copy link
Member

Remove this line in your package.json

"vue-loader": "14.2.2",

@zjun2
Copy link
Author

zjun2 commented Jan 24, 2019

删除这一行会报其他错误。
https://segmentfault.com/a/1190000014586699
原因是因为使用了vux

@haoqunjiang
Copy link
Member

那就是 vux 的问题,请给他们报 bug

@luojinghui
Copy link

如果使用了prettier组件,请尝试:
yarn add prettier@1.12.1 --save-dev

@JohnZengshi
Copy link

如果使用了prettier组件,请尝试:
yarn add prettier@1.12.1 --save-dev

这个可以解决

@snakeUni
Copy link

如果使用了prettier组件,请尝试:
yarn add prettier@1.12.1 --save-dev

@sebsastianek
Copy link

please english guys :)

@DStar2013
Copy link

prettier need specify a parser.

prettier.format(jsxCode, {
    ...prettierConfig,
    parser: 'babel',
})

@Kreeg
Copy link

Kreeg commented May 18, 2022

add
parser: 'babel'
to .prettierrc file

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs team repro We acknowledged your report and will soon try to reproduce it
Projects
None yet
Development

No branches or pull requests

9 participants