-
Notifications
You must be signed in to change notification settings - Fork 61
TypeError: Nuxt is not a constructor #57
Comments
Hi, have the same error. Node version - 8.1.2 |
What Nuxt version? |
Hi... The problem is version 1.0.0-rc3 (package.json "nuxt": "^ 1.0.0-rc3"). |
.then((nuxt) => { If you remove those lines from the NuxtController hopefully it should help, I had a similar issue. At least I think what I changed was the right thing to do :) I started a new project without any changes on Tuesday night and it had a similar issue and found removing those lines to correct the issue. my nuxt controller looks like constructor () {
|
If I remove
If I leave this code removed and then install [email protected], the app builds. I do get another error instead now but it's related to the logo.png file. ` ERROR Failed to compile with 1 errors 10:47:22 AM error in ./resources/assets/img/logo.png Module parse failed: /Users/Dan/Projects/adonuxttest/resources/assets/img/logo.png Unexpected character '�' (1:0) @ ./ Edit: Just realised this error is already reported (#45) |
In the config nuxt file just add the loader if it is missing. build: { |
I have same errors. |
Refer to the pull request here #59 |
Hi Thanh,
I can't find your comment in Github. Did you remove it?
…On Fri, Aug 4, 2017 at 9:09 AM, Thanh Minh ***@***.***> wrote:
@wongni <https://github.com/wongni> Thanks you, but i have new errors:
Error: Cannot find module 'es6-promise\auto' from 'C:\OpenServer\domains\face.io'
at Function.module.exports [as sync] (C:\OpenServer\domains\face.io\node_modules\resolve\lib\sync.js:40:15)
at r (C:\OpenServer\domains\face.io\node_modules\vue-server-renderer\build.js:7741:44)
at Object.<anonymous> (webpack:/external "es6-promise/auto":1:0)
at __webpack_require__ (webpack:/webpack/bootstrap b723638754f17ec59ca0:25:0)
at Object.<anonymous> (server-bundle.js:1358:75)
at __webpack_require__ (webpack:/webpack/bootstrap b723638754f17ec59ca0:25:0)
at Object.<anonymous> (server-bundle.js:996:65)
at __webpack_require__ (webpack:/webpack/bootstrap b723638754f17ec59ca0:25:0)
at server-bundle.js:92:18
at Object.<anonymous> (server-bundle.js:95:10)
at evaluateModule (C:\OpenServer\domains\face.io\node_modules\vue-server-renderer\build.js:7747:21)
at C:\OpenServer\domains\face.io\node_modules\vue-server-renderer\build.js:7805:18
at Promise (<anonymous>)
at C:\OpenServer\domains\face.io\node_modules\vue-server-renderer\build.js:7797:14
at Object.renderToString (C:\OpenServer\domains\face.io\node_modules\vue-server-renderer\build.js:7951:9)
at P (C:\OpenServer\domains\face.io\node_modules\nuxt\node_modules\pify\index.js:49:6)
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#57 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AK_oVXJJzUw0hSsvVhyZzh2H4-9zOvEZks5sUxgfgaJpZM4OnFsA>
.
|
#57: Fix 'Nuxt is not a constructor' error
Hi,
I am getting the error 'TypeError: Nuxt is not a constructor' on a fresh install when running 'npm run serve:dev'. Here are the steps I took:
Install Adonis - npm i -g adonis-cli
Create new install - adonis new --blueprint nuxt-community/adonuxt-template adonuxttest
cd adonuxttest
npm install
npm run serve:dev
This is the complete terminal output:
`> [email protected] serve:dev /Users/Dan/Projects/adonuxttest
[nodemon] 1.11.0
[nodemon] to restart at any time, enter
rs
[nodemon] watching: /Users/Dan/Projects/adonuxttest/app//* /Users/Dan/Projects/adonuxttest/bootstrap//* /Users/Dan/Projects/adonuxttest/config/**/* .env
[nodemon] starting
node server.js
info adonis:framework +0ms serving app on localhost:3000
TypeError: Nuxt is not a constructor
at new NuxtController (/Users/Dan/Projects/adonuxttest/app/Http/Controllers/NuxtController.js:12:17)
at Object. (/Users/Dan/Projects/adonuxttest/app/Http/Controllers/NuxtController.js:26:18)
at Module._compile (module.js:570:32)
at Object.Module._extensions..js (module.js:579:10)
at Module.load (module.js:487:32)
at tryModuleLoad (module.js:446:12)
at Function.Module._load (module.js:438:3)
at Module.require (module.js:497:17)
at require (internal/module.js:20:19)
at requireStack (/Users/Dan/Projects/adonuxttest/node_modules/require-stack/src/index.js:44:12)
at Object.Ioc._autoLoad (/Users/Dan/Projects/adonuxttest/node_modules/adonis-fold/src/Ioc/index.js:178:18)
at Ioc.use (/Users/Dan/Projects/adonuxttest/node_modules/adonis-fold/src/Ioc/index.js:378:18)
at /Users/Dan/Projects/adonuxttest/server.js:19:3
at fold.Registrar.register.then (/Users/Dan/Projects/adonuxttest/bootstrap/http.js:105:9)
at process._tickCallback (internal/process/next_tick.js:109:7)
at Module.runMain (module.js:606:11)`
Node version - 6.11.0
Adonis version - 2.1.9
The text was updated successfully, but these errors were encountered: