Nuxt is not a constructor

hskww
0
hskww
commented a year ago

Nuxt is not a constructor
server.js

0
alterhu2020
33
alterhu2020
commented a year ago

any update for this issue ,i meet the same error as @hskww mentioned above.
what I had done is just run the command npm run dev after run the npm install
the output from command is as following:

D:\todomvc-master>npm run dev

> [email protected]1.0.0 dev D:\todomvc-master
> node server.js

D:\todomvc-master\server.js:26
const nuxt = new Nuxt(config)
             ^
TypeError: Nuxt is not a constructor
    at Object.<anonymous> (D:\todomvc-master\server.js:26: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
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected]1.0.0 dev: `node server.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected]1.0.0 dev script.
npm ERR! This is probably not a problem with npm. There is likely additional log
ging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     F:\node_caches\_logs\2017-08-03T14_29_55_869Z-debug.log

D:\todomvc-master>
0
fengjiel
25
fengjiel
commented a year ago
0
alterhu2020
33
alterhu2020
commented a year ago

thanks @fengjiel , I had also found caused by the version after upgrading to the latest version.

0
meizijiu
0
meizijiu
commented a year ago

可以说明一下具体原因么,您提供的链接失效了@fengjiel

0
fengjiel
25
fengjiel
commented a year ago

建议把server.js 和vuex内的关键代码拷贝下放到最新的项目里 nuxtjs版本更新后一些方法不适用了 @meizijiu

0
meizijiu
0
meizijiu
commented a year ago

是的, nuxt的issue里也有类似的提问, https://github.com/nuxt/nuxt.js/issues/1219

0
valeriosillari
11
valeriosillari
commented 6 months ago

I try to check the repo and I got this issue. any updates? :)

0
Informations
QuestionUnresolved
#c9 - Created a year ago