Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Unhandled rejection Error When Building Vue.js Project

Tags:

vue.js

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?

like image 457
sim1138 Avatar asked Jun 29 '19 20:06

sim1138


2 Answers

Install for your project and run build again

npm i [email protected]
npm run build
like image 139
Сергей Зеленчук Avatar answered Nov 06 '22 19:11

Сергей Зеленчук


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
like image 4
todun Avatar answered Nov 06 '22 18:11

todun