Nuxt.js: meta is not defined

Created on 4 Apr 2019  Â·  12Comments  Â·  Source: nuxt/nuxt.js

Version

v2.6.0

Reproduction link

https://github.com/nuxt/nuxt.js

Steps to reproduce

Run the dev server npm run dev

What is expected ?

Not this error 🤔

What is actually happening?

FATAL  meta is not defined                                                                                                                                                                                                                          

  ReferenceError: meta is not defined
  at ModuleContainer.addModule (node_modules/@nuxt/core/dist/core.js:173:24)
  at promise.then (node_modules/@nuxt/utils/dist/utils.js:1760:43)

Additional comments?

I am using Adonuxt but I don't think that's the problem

Thanks!

This bug report is available on Nuxt community (#c8996)
bug-report

All 12 comments

Hi. This issue originates from an incompatible module. Please provide a list of the modules that you are currently using.

Temporary solution:

Please only do this if you have an incompatible module and also report us about modules that causing this problem.

- yarn install [email protected]
- npm install [email protected]

hotfix released as 2.6.1 until esm resolves the problem.

Fixed, thanks! 😊

Do you still want me to publish a list of the modules?

@HapLifeMan Yes please share modules that you are currently using :) It may be useful to fix them as well.

Here it is! Enjoy ✨

{
  "dependencies": {
    "@adonisjs/ace": "^4.0.7",
    "@adonisjs/ally": "github:Pickaw/adonis-ally",
    "@adonisjs/antl": "^2.0.7",
    "@adonisjs/auth": "^3.0.6",
    "@adonisjs/bodyparser": "^2.0.9",
    "@adonisjs/cors": "^1.0.2",
    "@adonisjs/fold": "^4.0.5",
    "@adonisjs/framework": "^4.0.27",
    "@adonisjs/ignitor": "^2.0.7",
    "@adonisjs/lucid": "^4.0.22",
    "@adonisjs/mail": "^3.0.9",
    "@adonisjs/redis": "^2.0.7",
    "@adonisjs/session": "^1.0.19",
    "@adonisjs/shield": "^1.0.4",
    "@adonisjs/validator": "^5.0.4",
    "@babel/register": "^7.0.0",
    "@fortawesome/free-brands-svg-icons": "^5.3.1",
    "@fortawesome/pro-light-svg-icons": "^5.3.1",
    "@nuxtjs/axios": "^5.3.1",
    "@nuxtjs/moment": "Pickaw/moment-module",
    "@pm2/io": "^4.1.3",
    "@slack/client": "^4.9.0",
    "adonis-sentry": "^1.0.3",
    "base-62.js": "^0.9.9",
    "big-integer": "^1.6.36",
    "bigi": "^1.4.2",
    "camelcase": "^5.0.0",
    "crc": "^3.8.0",
    "cross-env": "^3.1.4",
    "dotenv": "^6.2.0",
    "filepond": "^4.3.3",
    "filepond-plugin-file-encode": "^2.1.0",
    "filepond-plugin-file-validate-type": "^1.2.1",
    "filepond-plugin-image-crop": "^2.0.0",
    "filepond-plugin-image-exif-orientation": "^1.0.3",
    "filepond-plugin-image-preview": "^4.0.4",
    "filepond-plugin-image-resize": "^2.0.1",
    "filepond-plugin-image-transform": "^3.2.0",
    "glob-all": "^3.1.0",
    "googleapis": "^34.0.0",
    "image-size": "^0.7.1",
    "imagemin": "^6.1.0",
    "imagemin-jpeg-recompress": "^6.0.0",
    "imagemin-jpegtran": "^6.0.0",
    "imagemin-pngquant": "^7.0.0",
    "influx": "^5.0.7",
    "lodash": "^4.17.11",
    "lru-cache": "^4.1.3",
    "lucid-mongo": "Pickaw/lucid-mongo",
    "mjml": "^4.4.0-beta.1",
    "nodemailer": "^5.1.1",
    "nuxt": "^2.6.1",
    "nuxt-fontawesome": "^0.3.0",
    "nuxt-i18n": "Pickaw/nuxt-i18n",
    "nuxt-user-agent": "^1.0.2",
    "path": "^0.12.7",
    "pm2": "^3.2.2",
    "postcss-import": "^12.0.0",
    "puppeteer": "^1.11.0",
    "purgecss-webpack-plugin": "^1.3.0",
    "random-org": "Pickaw/node-random-org",
    "raven-js": "^3.27.0",
    "sales-tax": "^2.0.7",
    "seedrandom": "^2.4.4",
    "sharp": "^0.21.3",
    "socket.io": "^2.1.1",
    "socket.io-client": "^2.1.1",
    "stripe": "^6.25.1",
    "tailwindcss": "^1.0.0-beta.3",
    "twit": "^2.2.11",
    "v-click-outside-x": "^3.7.1",
    "vee-validate": "^2.1.7",
    "vue-clipboard2": "^0.2.1",
    "vue-filepond": "^5.0.0",
    "vue-multiselect": "^2.1.0",
    "vue-script2": "^2.0.3",
    "vue-stripe-elements-plus": "^0.2.9",
    "vue2-datepicker": "^2.10.3",
    "youch": "^2.0.4"
  },
  "devDependencies": {
    "@babel/core": "^7.3.3",
    "@babel/plugin-proposal-optional-chaining": "^7.2.0",
    "@babel/preset-env": "^7.3.1",
    "@babel/preset-stage-0": "^7.0.0",
    "babel-eslint": "^11.0.0-beta.0",
    "babel-jest": "^23.6.0",
    "babel-plugin-dynamic-import-node": "^2.0.0",
    "eslint": "^5.14.0",
    "eslint-config-standard": "^12.0.0",
    "eslint-plugin-html": "^5.0.0",
    "eslint-plugin-import": "^2.14.0",
    "eslint-plugin-node": "^8.0.1",
    "eslint-plugin-promise": "^4.0.1",
    "eslint-plugin-standard": "^4.0.0",
    "eslint-plugin-vue": "^5.2.2",
    "neo-blessed": "^0.2.0",
    "nodemon": "^1.18.7",
    "standard": "^12.0.1"
  }
}

Incompatible module was nuxt-user-agent. I already opened PR over there. Thanks :)

@pi0 I started getting this error when I moved repos. I'm also using nuxt-user-agent, and when I copy/install the whole project to a new folder it returns this error. I found out if I copy the package-lock file it runs fine, but if I delete it and install from scratch the problem appears, probably related to some version bump of dependencies.

when I update to nuxt 2.6.2 the error goes away but the project stop running on AWS Lambas. It works fine locally but after the new installation the lambdas stop working. I'm able to diff the package-lock files and do see the esm as well a few other modules that were bumped up, but not sure how I would be able to lock esm back to a previous version for all the dependencies.

I still haven't dived into what exactly in this nuxt project failing at the lambdas, I've already disabled nuxt-user-agent but it's not coming back, kind of a bummer since I had just gotten it working for committing into the main repo. but I think it has something to do with

module.exports = { getAllFilms, read, checkMeta, upload }

on a helper library for getting S3 files

left works, right does not (not the only difference, but seems relevant here)
image

Please upgrade nuxt-user-agent to the latest. It has a fix.

I did upgrade, using

"nuxt": "2.6.2",

that diff was from the original error, but the fix actually broke the entire project on lambda

@dseeker As reported in standard-things/esm#776 the breaking change happened in [email protected]+. I suggest doing another clean install. If the problem persists maybe pinning ESM to 3.2.20 can help by adding to package.json

I only get
Cannot GET /
responses now, and the lambda logs show no error

Maybe related: https://github.com/nuxt/nuxt.js/issues/5408#issuecomment-482488393

If it didn't help please open a new issue with code of custom server or reproduction

thanks @pi0 that was indeed the issue.. so it was a cascade effects from late updates

Was this page helpful?
0 / 5 - 0 ratings

Related issues

maicong picture maicong  Â·  3Comments

pehbehbeh picture pehbehbeh  Â·  3Comments

vadimsg picture vadimsg  Â·  3Comments

mikekidder picture mikekidder  Â·  3Comments

jaredreich picture jaredreich  Â·  3Comments