Nuxt.js: RC4 webpack error

Created on 11 Aug 2017  路  6Comments  路  Source: nuxt/nuxt.js

I am getting the following error when building nuxt.

ERROR in manifest.c2ed139d3924c6a30585.js from UglifyJs TypeError: Cannot read property 'reset' of undefined at /Users/timebro/timeBro/git/azureTest/server/node_modules/uglifyjs-webpack-plugin/dist/index.js:96:21 at Array.forEach (native) at Compilation.<anonymous> (/Users/timebro/timeBro/git/azureTest/server/node_modules/uglifyjs-webpack-plugin/dist/index.js:54:20) at next (/Users/timebro/timeBro/git/azureTest/server/node_modules/tapable/lib/Tapable.js:204:14) at Compilation.compilation.plugin (/Users/timebro/timeBro/git/azureTest/server/node_modules/webpack/lib/ProgressPlugin.js:119:6) at Compilation.applyPluginsAsyncSeries (/Users/timebro/timeBro/git/azureTest/server/node_modules/tapable/lib/Tapable.js:206:13) at self.applyPluginsAsync.err (/Users/timebro/timeBro/git/azureTest/server/node_modules/webpack/lib/Compilation.js:640:10) at next (/Users/timebro/timeBro/git/azureTest/server/node_modules/tapable/lib/Tapable.js:202:11) at Compilation.compilation.plugin.callback (/Users/timebro/timeBro/git/azureTest/server/node_modules/webpack/lib/ProgressPlugin.js:115:6) at Compilation.applyPluginsAsyncSeries (/Users/timebro/timeBro/git/azureTest/server/node_modules/tapable/lib/Tapable.js:206:13) at sealPart2 (/Users/timebro/timeBro/git/azureTest/server/node_modules/webpack/lib/Compilation.js:636:9) at next (/Users/timebro/timeBro/git/azureTest/server/node_modules/tapable/lib/Tapable.js:202:11) at Compilation.compilation.plugin (/Users/timebro/timeBro/git/azureTest/server/node_modules/webpack/lib/ProgressPlugin.js:111:6) at Compilation.applyPluginsAsyncSeries (/Users/timebro/timeBro/git/azureTest/server/node_modules/tapable/lib/Tapable.js:206:13) at Compilation.seal (/Users/timebro/timeBro/git/azureTest/server/node_modules/webpack/lib/Compilation.js:579:8) at applyPluginsParallel.err (/Users/timebro/timeBro/git/azureTest/server/node_modules/webpack/lib/Compiler.js:514:17)

This question is available on Nuxt.js community (#c1191)

Most helpful comment

If you have a package-lock.json file, delete that too and then run npm install again.

All 6 comments

I had this error as well when doing an in-place upgrade from 1.0.0-rc3 to 1.0.0-rc4. Removing the node_modules directory and reinstalling corrected the problem.

I tried. I delted .nuxt and node_modules. Now i am stuck with this

Error: Cannot find module 'webpack/lib/node/NodeTemplatePlugin' at Function.Module._resolveFilename (module.js:485:15) at Function.Module._load (module.js:437:25) at Module.require (module.js:513:17) at require (internal/module.js:11:18) at Object.<anonymous> (/Users/timebro/timeBro/git/azureTest/server/node_modules/html-webpack-plugin/lib/compiler.js:11:26) at Module._compile (module.js:569:30) at Object.Module._extensions..js (module.js:580:10) at Module.load (module.js:503:32) at tryModuleLoad (module.js:466:12) at Function.Module._load (module.js:458:3) at Module.require (module.js:513:17) at require (internal/module.js:11:18) at Object.<anonymous> (/Users/timebro/timeBro/git/azureTest/server/node_modules/html-webpack-plugin/index.js:7:21) at Module._compile (module.js:569:30) at Object.Module._extensions..js (module.js:580:10) at Module.load (module.js:503:32)

If you have a package-lock.json file, delete that too and then run npm install again.

I is working so far but now i have to update my code. The problem that i have is that i cannot load nuxt with require. But using import wont work either. Because he does not recognize import. I am coming from alpha5, so i would need to know what i have to change to make it work

/Users/timebro/timeBro/git/azureTest/server/app.js:45 const nuxt = new Nuxt(config); ^ TypeError: Nuxt is not a constructor at Object.<anonymous> (/Users/timebro/timeBro/git/azureTest/server/app.js:45:14) at Module._compile (module.js:569:30) at Object.Module._extensions..js (module.js:580:10) at Module.load (module.js:503:32) at tryModuleLoad (module.js:466:12) at Function.Module._load (module.js:458:3) at Function.Module.runMain (module.js:605:10) at startup (bootstrap_node.js:158:16) at bootstrap_node.js:575:3

solved it

using const { Nuxt, Builder } = require('nuxt'); made it work

really appreciate your help thank you! Looking forward to version 1.0 :)

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

danieloprado picture danieloprado  路  3Comments

bimohxh picture bimohxh  路  3Comments

surmon-china picture surmon-china  路  3Comments

mattdharmon picture mattdharmon  路  3Comments

jaredreich picture jaredreich  路  3Comments