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

0.14.8: vuepress build just failed #1255

Closed
1 task done
daggerok opened this issue Feb 2, 2019 · 12 comments
Closed
1 task done

0.14.8: vuepress build just failed #1255

daggerok opened this issue Feb 2, 2019 · 12 comments

Comments

@daggerok
Copy link

daggerok commented Feb 2, 2019

  • I confirm that this is a issue rather than a question.

Bug report

Version

0.14.8

Steps to reproduce

I'm following getting started steps from official home page guide

also I have tried use npm way:

$ npm rm -g vuepress
$ npm i -g vuepress
$ vuepress -V
0.14.8
$ mkdir npm-vuepress-app
$ cd npm-vuepress-app/
$ echo '# test' > README.md
$ vuepress build

What is actually happening?

vuepress build command is failing

vuepress build

 WAIT  Extracting site metadata...
[8:32:30 PM] Compiling Client
[8:32:30 PM] Compiling Server
[8:32:33 PM] Compiled Server in 3s
[8:32:33 PM] Compiled Client in 3s
(undefined) assets/js/styles.348a8abd.js from Terser
TypeError: Cannot read property 'minify' of undefined
    at minify (/Users/mak/.nvm/versions/node/v10.15.1/lib/node_modules/vuepress/node_modules/terser-webpack-plugin/dist/minify.js:175:23)
    at module.exports (/Users/mak/.nvm/versions/node/v10.15.1/lib/node_modules/vuepress/node_modules/terser-webpack-plugin/dist/worker.js:13:40)
    at handle (/Users/mak/.nvm/versions/node/v10.15.1/lib/node_modules/vuepress/node_modules/worker-farm/lib/child/index.js:44:8)
    at process.<anonymous> (/Users/mak/.nvm/versions/node/v10.15.1/lib/node_modules/vuepress/node_modules/worker-farm/lib/child/index.js:51:3)
    at process.emit (events.js:189:13)
    at emit (internal/child_process.js:820:12)
    at process._tickCallback (internal/process/next_tick.js:63:19)
(undefined) assets/js/app.7b8bf325.js from Terser
TypeError: Cannot read property 'minify' of undefined
    at minify (/Users/mak/.nvm/versions/node/v10.15.1/lib/node_modules/vuepress/node_modules/terser-webpack-plugin/dist/minify.js:175:23)
    at module.exports (/Users/mak/.nvm/versions/node/v10.15.1/lib/node_modules/vuepress/node_modules/terser-webpack-plugin/dist/worker.js:13:40)
    at handle (/Users/mak/.nvm/versions/node/v10.15.1/lib/node_modules/vuepress/node_modules/worker-farm/lib/child/index.js:44:8)
    at process.<anonymous> (/Users/mak/.nvm/versions/node/v10.15.1/lib/node_modules/vuepress/node_modules/worker-farm/lib/child/index.js:51:3)
    at process.emit (events.js:189:13)
    at emit (internal/child_process.js:820:12)
    at process._tickCallback (internal/process/next_tick.js:63:19)
(undefined) assets/js/2.c715a618.js from Terser
TypeError: Cannot read property 'minify' of undefined
    at minify (/Users/mak/.nvm/versions/node/v10.15.1/lib/node_modules/vuepress/node_modules/terser-webpack-plugin/dist/minify.js:175:23)
    at module.exports (/Users/mak/.nvm/versions/node/v10.15.1/lib/node_modules/vuepress/node_modules/terser-webpack-plugin/dist/worker.js:13:40)
    at handle (/Users/mak/.nvm/versions/node/v10.15.1/lib/node_modules/vuepress/node_modules/worker-farm/lib/child/index.js:44:8)
    at process.<anonymous> (/Users/mak/.nvm/versions/node/v10.15.1/lib/node_modules/vuepress/node_modules/worker-farm/lib/child/index.js:51:3)
    at process.emit (events.js:189:13)
    at emit (internal/child_process.js:820:12)
    at process._tickCallback (internal/process/next_tick.js:63:19)
(undefined) assets/js/3.f4e2b70b.js from Terser
TypeError: Cannot read property 'minify' of undefined
    at minify (/Users/mak/.nvm/versions/node/v10.15.1/lib/node_modules/vuepress/node_modules/terser-webpack-plugin/dist/minify.js:175:23)
    at module.exports (/Users/mak/.nvm/versions/node/v10.15.1/lib/node_modules/vuepress/node_modules/terser-webpack-plugin/dist/worker.js:13:40)
    at handle (/Users/mak/.nvm/versions/node/v10.15.1/lib/node_modules/vuepress/node_modules/worker-farm/lib/child/index.js:44:8)
    at process.<anonymous> (/Users/mak/.nvm/versions/node/v10.15.1/lib/node_modules/vuepress/node_modules/worker-farm/lib/child/index.js:51:3)
    at process.emit (events.js:189:13)
    at emit (internal/child_process.js:820:12)
    at process._tickCallback (internal/process/next_tick.js:63:19)
(undefined) assets/js/4.8140a824.js from Terser
TypeError: Cannot read property 'minify' of undefined
    at minify (/Users/mak/.nvm/versions/node/v10.15.1/lib/node_modules/vuepress/node_modules/terser-webpack-plugin/dist/minify.js:175:23)
    at module.exports (/Users/mak/.nvm/versions/node/v10.15.1/lib/node_modules/vuepress/node_modules/terser-webpack-plugin/dist/worker.js:13:40)
    at handle (/Users/mak/.nvm/versions/node/v10.15.1/lib/node_modules/vuepress/node_modules/worker-farm/lib/child/index.js:44:8)
    at process.<anonymous> (/Users/mak/.nvm/versions/node/v10.15.1/lib/node_modules/vuepress/node_modules/worker-farm/lib/child/index.js:51:3)
    at process.emit (events.js:189:13)
    at emit (internal/child_process.js:820:12)
    at process._tickCallback (internal/process/next_tick.js:63:19)
Error: Failed to compile with errors.
    at webpack (/Users/mak/.nvm/versions/node/v10.15.1/lib/node_modules/vuepress/lib/build.js:113:18)
    at finalCallback (/Users/mak/.nvm/versions/node/v10.15.1/lib/node_modules/vuepress/node_modules/webpack/lib/MultiCompiler.js:247:12)
    at runWithDependencies.err (/Users/mak/.nvm/versions/node/v10.15.1/lib/node_modules/vuepress/node_modules/webpack/lib/MultiCompiler.js:270:6)
    at done (/Users/mak/.nvm/versions/node/v10.15.1/lib/node_modules/vuepress/node_modules/neo-async/async.js:2928:13)
    at runCompilers (/Users/mak/.nvm/versions/node/v10.15.1/lib/node_modules/vuepress/node_modules/webpack/lib/MultiCompiler.js:174:48)
    at err (/Users/mak/.nvm/versions/node/v10.15.1/lib/node_modules/vuepress/node_modules/webpack/lib/MultiCompiler.js:181:7)
    at compiler.run (/Users/mak/.nvm/versions/node/v10.15.1/lib/node_modules/vuepress/node_modules/webpack/lib/MultiCompiler.js:263:7)
    at finalCallback (/Users/mak/.nvm/versions/node/v10.15.1/lib/node_modules/vuepress/node_modules/webpack/lib/Compiler.js:220:39)
    at hooks.done.callAsync.err (/Users/mak/.nvm/versions/node/v10.15.1/lib/node_modules/vuepress/node_modules/webpack/lib/Compiler.js:236:13)
    at AsyncSeriesHook.eval [as callAsync] (eval at create (/Users/mak/.nvm/versions/node/v10.15.1/lib/node_modules/vuepress/node_modules/tapable/lib/HookCodeFactory.js:32:10), <anonymous>:33:1)
    at AsyncSeriesHook.lazyCompileHook (/Users/mak/.nvm/versions/node/v10.15.1/lib/node_modules/vuepress/node_modules/tapable/lib/Hook.js:154:20)
    at onCompiled (/Users/mak/.nvm/versions/node/v10.15.1/lib/node_modules/vuepress/node_modules/webpack/lib/Compiler.js:234:21)
    at hooks.afterCompile.callAsync.err (/Users/mak/.nvm/versions/node/v10.15.1/lib/node_modules/vuepress/node_modules/webpack/lib/Compiler.js:630:14)
    at AsyncSeriesHook.eval [as callAsync] (eval at create (/Users/mak/.nvm/versions/node/v10.15.1/lib/node_modules/vuepress/node_modules/tapable/lib/HookCodeFactory.js:32:10), <anonymous>:6:1)
    at AsyncSeriesHook.lazyCompileHook (/Users/mak/.nvm/versions/node/v10.15.1/lib/node_modules/vuepress/node_modules/tapable/lib/Hook.js:154:20)
    at compilation.seal.err (/Users/mak/.nvm/versions/node/v10.15.1/lib/node_modules/vuepress/node_modules/webpack/lib/Compiler.js:627:30)

Other relevant information

  • Your OS: MacOS 10.14.3
  • Node.js version: v10.15.1
  • Is this a global or local install? failed for both cases: globally and locally
  • Which package manager did you use for the install? failed for npm and for yarn
@daggerok
Copy link
Author

daggerok commented Feb 2, 2019

Hi again,

I also switched on latest Node (v11.9.0) and 8 nvm use 8 --lts each time reinstalled vuepress too, but vuepres build command still failing similary like with Node LTS (v10.15.1).


Regards,
Maksim

@sjbat
Copy link

sjbat commented Feb 2, 2019

I confirm the same error.
Interestingly, it appeared after today's fresh npm install.
Yesterday the project was being built correctly

@sjbat
Copy link

sjbat commented Feb 2, 2019

As a workarround, I temporarily changed dependency on webpack from ""^4.8.1" to ""4.8.1" and build run properly

@daggerok
Copy link
Author

daggerok commented Feb 2, 2019

Hello @sjbat,

As a workarround, I temporarily changed dependency on webpack from ""^4.8.1" to ""4.8.1" and build run properly

Can you be more specific?
Do you mean directly somewhere in node_modules/ folder?

Interestingly, it appeared after today's fresh npm install.

Well, that is way I'm always freezing exact dependencies version in all my projects..

@sjbat
Copy link

sjbat commented Feb 2, 2019

In my project package.json I added strict webpack dependency on specific version "4.8.1"

"devDependencies": {
    "vuepress": "0.14.5",
    "webpack": "4.8.1"
  },

@lluislr
Copy link

lluislr commented Feb 2, 2019

Same problem here with a clean installation from today.

As a workaround, I was able to patch the global installation of vuepress with the change suggested by @sjbat (thanks!) by changing "webpack": "^4.8.1", to "webpack": "4.8.1", in /usr/local/lib/node_modules/vuepress/package.json ("dependencies" section) and running npm install in that directory (/usr/local/lib/node_modules/vuepress/).

After this patch I am able build my vuepress site without any problems.

@daggerok
Copy link
Author

daggerok commented Feb 2, 2019

I have investigated little bit and found, that last worked webpack dependency in that case is
"webpack": "4.25.1", everything after (since 4.26.0+) doesn't work.
Seems like root cause in some transitive dependency...

@ulivz
Copy link
Member

ulivz commented Feb 3, 2019

A bug in terser 3.16 which was released hours ago.

For npm users run:
npm i [email protected] -g

For yarn users: add the following field to package.json and then rerun yarn:

"resolutions": {
  "terser": "3.14.1"
}

Refs:

@venelinn
Copy link

venelinn commented Feb 4, 2019

UPDATE: It builds now!

Still the same thing here :(

(undefined) assets/js/styles.7ddf6dbb.js from Terser
 TypeError: Cannot read property 'minify' of undefined
    at minify (/usr/local/lib/node_modules/vuepress/node_modules/terser-webpack-plugin/dist/minify.js:175:23)
    at module.exports (/usr/local/lib/node_modules/vuepress/node_modules/terser-webpack-plugin/dist/worker.js:13:40)

I'm using yarn and here is my package.json

{
  "devDependencies": {
    "node-sass": "^4.11.0",
    "sass-loader": "^7.1.0"
  },
  "resolutions": {
	  "terser": "3.14.1"
	}
}

@wemod123
Copy link

wemod123 commented Feb 9, 2019

@ulivz 👍

A general question, when do you think the current vuepress will goes to Beta Release?
Or, how much confidence do we have to put current latest version into large scale production?

@ansidev
Copy link

ansidev commented Feb 9, 2019

@ulivz: Please leave the comment when this problem was solved, so we can remove workaround code. Thanks!

@ulivz
Copy link
Member

ulivz commented Feb 9, 2019

We can close this issue for now, and all the users met this error should re-install your deps:

  • For npm users, exec npm update
  • For yarn users, exec yarn upgrade

@ulivz ulivz closed this as completed Feb 9, 2019
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

7 participants