Skip to content

Module build failed: Error: No parser and no file path given, couldn't infer a parser. #187

@allenhwkim

Description

@allenhwkim

Hi,

I tried the instruction as defined at README.md, but having this error

I would appreciate if you let me know what I am missing.

github$  clear
github$  node --version
v9.4.0
github$  vue init webpack-simple my-webpack-simple

? Project name my-webpack-simple
? Project description A Vue.js project
? Author Allen Kim <[email protected]>
? License MIT
? Use sass? No

   vue-cli · Generated "my-webpack-simple".

   To get started:

     cd my-webpack-simple
     npm install
     npm run dev

github$  cd my-webpack-simple/
my-webpack-simple$  npm install

> [email protected] install /Users/allen.kim/github/my-webpack-simple/node_modules/fsevents
> node install

[fsevents] Success: "/Users/allen.kim/github/my-webpack-simple/node_modules/fsevents/lib/binding/Release/node-v59-darwin-x64/fse.node" is installed via remote

> [email protected] postinstall /Users/allen.kim/github/my-webpack-simple/node_modules/uglifyjs-webpack-plugin
> node lib/post_install.js

npm notice created a lockfile as package-lock.json. You should commit this file.
added 873 packages from 596 contributors in 11.413s
my-webpack-simple$  npm run dev

> [email protected] dev /Users/allen.kim/github/my-webpack-simple
> cross-env NODE_ENV=development webpack-dev-server --open --hot

Project is running at http://localhost:8080/
webpack output is served from /dist/
404s will fallback to /index.html
Hash: 23fb559f4bad161fd293
Version: webpack 3.12.0
Time: 2148ms
   Asset     Size  Chunks                    Chunk Names
build.js  1.79 MB       0  [emitted]  [big]  main
   [1] (webpack)/hot/log.js 1.04 kB {0} [built]
   [4] (webpack)/hot/emitter.js 77 bytes {0} [built]
   [5] ./node_modules/vue/dist/vue.esm.js 292 kB {0} [built]
   [8] multi (webpack)-dev-server/client?http://localhost:8080 webpack/hot/dev-server ./src/main.js 52 bytes {0} [built]
   [9] (webpack)-dev-server/client?http://localhost:8080 7.93 kB {0} [built]
  [10] ./node_modules/url/url.js 23.3 kB {0} [built]
  [17] ./node_modules/strip-ansi/index.js 161 bytes {0} [built]
  [19] ./node_modules/loglevel/lib/loglevel.js 7.86 kB {0} [built]
  [20] (webpack)-dev-server/client/socket.js 1.08 kB {0} [built]
  [22] (webpack)-dev-server/client/overlay.js 3.67 kB {0} [built]
  [27] (webpack)/hot nonrecursive ^\.\/log$ 170 bytes {0} [built]
  [29] (webpack)/hot/dev-server.js 1.61 kB {0} [built]
  [30] (webpack)/hot/log-apply-result.js 1.31 kB {0} [built]
  [31] ./src/main.js 134 bytes {0} [built]
  [34] ./src/App.vue 1.81 kB {0} [built]
    + 27 hidden modules

ERROR in ./node_modules/vue-loader/lib/template-compiler?{"id":"data-v-7ba5bd90","hasScoped":false,"buble":{"transforms":{}}}!./node_modules/vue-loader/lib/selector.js?type=template&index=0!./src/App.vue
Module build failed: Error: No parser and no file path given, couldn't infer a parser.
    at normalize (/Users/allen.kim/github/my-webpack-simple/node_modules/prettier/index.js:7051:13)
    at formatWithCursor (/Users/allen.kim/github/my-webpack-simple/node_modules/prettier/index.js:10370:12)
    at /Users/allen.kim/github/my-webpack-simple/node_modules/prettier/index.js:31115:15
    at Object.format (/Users/allen.kim/github/my-webpack-simple/node_modules/prettier/index.js:31134:12)
    at Object.module.exports (/Users/allen.kim/github/my-webpack-simple/node_modules/vue-loader/lib/template-compiler/index.js:80:23)
 @ ./src/App.vue 11:0-238
 @ ./src/main.js
 @ multi (webpack)-dev-server/client?http://localhost:8080 webpack/hot/dev-server ./src/main.js

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions