sim1138
sim1138

Reputation: 81

Unhandled rejection Error When Building Vue.js Project

When running npm run build on my Vue project, I receive the following error:

Unhandled rejection Error: original.line and original.column are not numbers -- you probably meant to omit the original mapping entirely and only map the generated position. If so, pass null for the original mapping instead of an object with empty or null values.

Has anyone else experienced this issue?

Upvotes: 8

Views: 2344

Answers (2)

todun
todun

Reputation: 165

If you have vue.config.js, setting productionSourceMap: false resolves the issue when running npm run build on a vuejs project.

https://cli.vuejs.org/config/#productionsourcemap

module.exports = {
    // other config
    productionSourceMap: false
}

If using webpack(not tested), then sourceMap: null

https://github.com/webpack/webpack-sources/issues/28#issuecomment-342066023

Then re-run build (might need to also delete package-lock.json or node_modules)

npm run build

Upvotes: 4

Serhii Zelenchuk
Serhii Zelenchuk

Reputation: 345

Install for your project and run build again

npm i [email protected]
npm run build

Upvotes: 5

Related Questions