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

Module build failed: TypeError: Cannot read property 'join' of undefined #35

Closed
LinFeng1997 opened this issue Apr 15, 2018 · 15 comments
Closed

Comments

@LinFeng1997
Copy link
Contributor

I install vuepress globally and create README file,then I input vuepress dev,The following thing happened:

image

My OS is Win10~

@LinFeng1997
Copy link
Contributor Author

LinFeng1997 commented Apr 15, 2018

  VuePress dev server listening at http://localhost:8080/

× 「wdm」: Hash: 841239360a93a2459297
Version: webpack 4.5.0
Time: 15381ms
Built at: 2018-4-15 11:10:23
                         Asset       Size  Chunks             Chunk Names
assets/img/search.83621669.svg  216 bytes          [emitted]
              assets/js/app.js   1.75 MiB     app  [emitted]  app
                assets/js/0.js  750 bytes       0  [emitted]
                    index.html  303 bytes          [emitted]
Entrypoint app = assets/js/app.js
[../../../../AppData/Roaming/npm/node_modules/vuepress/lib/app/.temp/polyfill.js] C:/Users/blow/AppData/Roaming/npm/node_modules/vuepress/lib/app/.temp/polyfill.js 86 bytes {app} [built]
[../../../../AppData/Roaming/npm/node_modules/vuepress/lib/app/.temp/routes.js] C:/Users/blow/AppData/Roaming/npm/node_modules/vuepress/lib/app/.temp/routes.js 359 bytes {app} [built]
[../../../../AppData/Roaming/npm/node_modules/vuepress/lib/app/.temp/siteData.js] C:/Users/blow/AppData/Roaming/npm/node_modules/vuepress/lib/app/.temp/siteData.js 146 bytes {app} [built]
[../../../../AppData/Roaming/npm/node_modules/vuepress/lib/app/app.js] C:/Users/blow/AppData/Roaming/npm/node_modules/vuepress/lib/app/app.js 1.68 KiB {app} [built]
[../../../../AppData/Roaming/npm/node_modules/vuepress/lib/app/clientEntry.js] C:/Users/blow/AppData/Roaming/npm/node_modules/vuepress/lib/app/clientEntry.js 1.88 KiB {app} [built]
[../../../../AppData/Roaming/npm/node_modules/vuepress/node_modules/object-assign/index.js] C:/Users/blow/AppData/Roaming/npm/node_modules/vuepress/node_modules/object-assign/index.js 2.06 KiB {app} [built]
[../../../../AppData/Roaming/npm/node_modules/vuepress/node_modules/register-service-worker/index.js] C:/Users/blow/AppData/Roaming/npm/node_modules/vuepress/node_modules/register-service-worker/index.js 3.32 KiB {app} [built]
[../../../../AppData/Roaming/npm/node_modules/vuepress/node_modules/url/url.js] C:/Users/blow/AppData/Roaming/npm/node_modules/vuepress/node_modules/url/url.js 22.8 KiB {app} [built]
[../../../../node_modules/loglevelnext/dist/loglevelnext.js] C:/Users/blow/node_modules/loglevelnext/dist/loglevelnext.js 18.9 KiB {app} [built]
[../../../../node_modules/webpack-hot-client/client/hot.js] C:/Users/blow/node_modules/webpack-hot-client/client/hot.js 4.91 KiB {app} [built]
[../../../../node_modules/webpack-hot-client/client/index.js?8e59b3c5-b07b-4bba-b350-2b456f37072e] C:/Users/blow/node_modules/webpack-hot-client/client?8e59b3c5-b07b-4bba-b350-2b456f37072e 1.86 KiB {app} [built]
[../../../../node_modules/webpack-hot-client/client/log.js] C:/Users/blow/node_modules/webpack-hot-client/client/log.js 2.4 KiB {app} [built]
[../../../../node_modules/webpack-hot-client/client/socket.js] C:/Users/blow/node_modules/webpack-hot-client/client/socket.js 1.39 KiB {app} [built]
   [0] multi C:/Users/blow/AppData/Roaming/npm/node_modules/vuepress/lib/app/clientEntry.js 28 bytes {app} [built]
   [1] multi webpack-hot-client/client?8e59b3c5-b07b-4bba-b350-2b456f37072e C:/Users/blow/AppData/Roaming/npm/node_modules/vuepress/lib/app/clientEntry.js 40 bytes {app} [built]
    + 115 hidden modules

ERROR in ./README.md
Module build failed: TypeError: Cannot read property 'join' of undefined
    at Object.module.exports (C:\Users\blow\AppData\Roaming\npm\node_modules\vuepress\lib\webpack\markdownLoader.js:81:17)
 @ C:/Users/blow/AppData/Roaming/npm/node_modules/vuepress/lib/app/.temp/routes.js 10:8-85
 @ C:/Users/blow/AppData/Roaming/npm/node_modules/vuepress/lib/app/app.js
 @ C:/Users/blow/AppData/Roaming/npm/node_modules/vuepress/lib/app/clientEntry.js
 @ multi C:/Users/blow/AppData/Roaming/npm/node_modules/vuepress/lib/app/clientEntry.js
Child html-webpack-plugin for "index.html":
         Asset      Size  Chunks  Chunk Names
    index.html  1.38 MiB       0
    Entrypoint undefined = index.html
    [../../../../AppData/Roaming/npm/node_modules/vuepress/node_modules/html-webpack-plugin/lib/loader.js!../../../../AppData/Roaming/npm/node_modules/vuepress/lib/app/index.dev.html] C:/Users/blow/AppData/Roaming/npm/node_modules/vuepress/node_modules/html-webpack-plugin/lib/loader.js!C:/Users/blow/AppData/Roaming/npm/node_modules/vuepress/lib/app/index.dev.html 447 bytes {0} [built]
    [../../../../AppData/Roaming/npm/node_modules/vuepress/node_modules/lodash/lodash.js] C:/Users/blow/AppData/Roaming/npm/node_modules/vuepress/node_modules/lodash/lodash.js 527 KiB {0} [built]
    [../../../../AppData/Roaming/npm/node_modules/vuepress/node_modules/webpack/buildin/module.js] (webpack)/buildin/module.js 519 bytes {0} [built]

@ulivz
Copy link
Member

ulivz commented Apr 15, 2018

Would you please provide us with the source markdown file?

@LinFeng1997
Copy link
Contributor Author

The source markdwon file is created by echo "# Hello VuePress" > README.md on Win10 Powershell

@ulivz
Copy link
Member

ulivz commented Apr 15, 2018

Can you provide the node version?

@LinFeng1997
Copy link
Contributor Author

8.9.3

@mapl
Copy link

mapl commented Apr 15, 2018

please try to the remove the double quotes in the README.md file

@cosimochellini
Copy link

removing double quotes work!

@dexygen
Copy link

dexygen commented Apr 15, 2018

I was having this problem too, and there were never any double quotes in the README.md file. Like the OP I created the file using Windows Power Shell and the echo command provided at https://vuepress.vuejs.org/guide/getting-started.html What I did to get things to work is not rely on the echo command, and instead create the file directly inside Visual Studio Code, and copy/paste (or type) # Hello VuePress!" into it.

@Myu1533
Copy link

Myu1533 commented Apr 15, 2018

same problem in win10!there are no any bouble quotes in md file.But on Mac, it works well.

@duzeng
Copy link

duzeng commented Apr 15, 2018

Do not use echo command on win10, create the mardown file directly.

@iqfi
Copy link

iqfi commented Apr 15, 2018

image
change the markdown file encoding to utf-8

@yyx990803
Copy link
Member

Looks like echo on Windows creates the file in non utf-8 encoding 🤔

@mapl
Copy link

mapl commented Apr 15, 2018

it seems that the echo command doesn't need double quotes at all

echo # Hello VuePress > README.md

@andreasvirkus
Copy link

Same error for already existing markdown file, but they're already in UTF-8 format (reworking a Metalsmith site) 🤔

@mapl
Copy link

mapl commented Apr 15, 2018

just noticed something strange when having a very simple file with just one line:

does not work = ####### Hello
does work again = ###### Hello

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

10 participants