question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Fresh default project fails to build

See original GitHub issue

Version

3.8.4

Environment info

  System:
    OS: Linux 5.1 Arch Linux undefined
    CPU: (8) x64 Intel(R) Core(TM) i7-4771 CPU @ 3.50GHz
  Binaries:
    Node: 11.15.0 - /usr/bin/node
    Yarn: 1.16.0 - /usr/bin/yarn
    npm: 6.9.2 - /usr/bin/npm
  Browsers:
    Chrome: Not Found
    Firefox: 67.0.4
  npmPackages:
    @vue/babel-helper-vue-jsx-merge-props:  1.0.0 
    @vue/babel-plugin-transform-vue-jsx:  1.0.0 
    @vue/babel-preset-app:  3.8.0 
    @vue/babel-preset-jsx:  1.0.0 
    @vue/babel-sugar-functional-vue:  1.0.0 
    @vue/babel-sugar-inject-h:  1.0.0 
    @vue/babel-sugar-v-model:  1.0.0 
    @vue/babel-sugar-v-on:  1.0.0 
    @vue/cli-overlay:  3.8.0 
    @vue/cli-plugin-babel: ^3.8.0 => 3.8.0 
    @vue/cli-plugin-eslint: ^3.8.0 => 3.8.0 
    @vue/cli-service: ^3.8.0 => 3.8.4 
    @vue/cli-shared-utils:  3.8.0 
    @vue/component-compiler-utils:  2.6.0 
    @vue/preload-webpack-plugin:  1.1.0 
    @vue/web-component-wrapper:  1.2.0 
    eslint-plugin-vue: ^5.0.0 => 5.2.3 (4.7.1)
    vue: ^2.6.10 => 2.6.10 
    vue-eslint-parser:  2.0.3 (5.0.0)
    vue-hot-reload-api:  2.3.3 
    vue-loader:  15.7.0 
    vue-style-loader:  4.1.2 
    vue-template-compiler: ^2.6.10 => 2.6.10 
    vue-template-es2015-compiler:  1.9.1 
  npmGlobalPackages:
    @vue/cli: 3.8.4

Steps to reproduce

  • vue create foo (use default options)
  • cd foo
  • npm run build

What is expected?

Successful build.

What is actually happening?

SourceMap error, build hangs.


Dropping in a package-lock.json from yesterday fixed it.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:14
  • Comments:9 (2 by maintainers)

github_iconTop GitHub Comments

27reactions
sodateacommented, Jun 30, 2019

A bug in terser 4.0.1 which was released hours ago. For npm users: run npm i terser@4.0.0 For yarn users: add the following field to package.json and then rerun yarn:

"resolutions": {
  "terser": "4.0.0"
}
8reactions
garotosopacommented, Jun 29, 2019

I’m experiencing the same problem:

$ npm run build

> foo@0.1.0 build /tmp/foo
> vue-cli-service build

⠙  Building for production...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.
    at SourceMapGenerator_validateMapping [as _validateMapping] (/tmp/foo/node_modules/webpack-sources/node_modules/source-map/lib/source-map-generator.js:276:15)
    at SourceMapGenerator_addMapping [as addMapping] (/tmp/foo/node_modules/webpack-sources/node_modules/source-map/lib/source-map-generator.js:110:12)
    at /tmp/foo/node_modules/webpack-sources/node_modules/source-map/lib/source-map-generator.js:72:17
    at Array.forEach (<anonymous>)
    at BasicSourceMapConsumer.SourceMapConsumer_eachMapping [as eachMapping] (/tmp/foo/node_modules/webpack-sources/node_modules/source-map/lib/source-map-consumer.js:157:14)
    at Function.SourceMapGenerator_fromSourceMap [as fromSourceMap] (/tmp/foo/node_modules/webpack-sources/node_modules/source-map/lib/source-map-generator.js:48:24)
    at SourceMapSource.node (/tmp/foo/node_modules/webpack-sources/lib/SourceMapSource.js:32:35)
    at SourceMapSource.proto.sourceAndMap (/tmp/foo/node_modules/webpack-sources/lib/SourceAndMapMixin.js:30:18)
    at getTaskForFile (/tmp/foo/node_modules/webpack/lib/SourceMapDevToolPlugin.js:37:30)
    at files.forEach (/tmp/foo/node_modules/webpack/lib/SourceMapDevToolPlugin.js:136:20)
    at Array.forEach (<anonymous>)
    at compilation.hooks.afterOptimizeChunkAssets.tap (/tmp/foo/node_modules/webpack/lib/SourceMapDevToolPlugin.js:130:12)
    at SyncHook.eval [as call] (eval at create (/tmp/foo/node_modules/tapable/lib/HookCodeFactory.js:19:10), <anonymous>:7:1)
    at SyncHook.lazyCompileHook (/tmp/foo/node_modules/tapable/lib/Hook.js:154:20)
    at hooks.optimizeChunkAssets.callAsync.err (/tmp/foo/node_modules/webpack/lib/Compilation.js:1313:42)
    at _err0 (eval at create (/tmp/foo/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:11:1)

⠇  Building for production...^C
$ node --version
v10.16.0
$ npm --version
6.9.2

For the time being, I disabled source maps as a workaround to get the project built:

vue.config.js

module.exports = {
    productionSourceMap: false
};
Read more comments on GitHub >

github_iconTop Results From Across the Web

BUILD FAILED in a fresh project · Issue #33130 - GitHub
Description. error Failed to build iOS project. We ran "xcodebuild" command but it exited with error code 65. To debug build logs further, ......
Read more >
Qt Creator shows errors in fresh project, but code compiles fine
When I create a new project in QT creator I am greeted with many error messages. For example, here are the errors for...
Read more >
redefinition of module error since Xcode 8.3 - Apple Developer
I recreated the whole project from scratch in xcode 8.3.2, reimporting the source code manually and using fresh default settings. Interestingly the new...
Read more >
Troubleshooting GitLab Runner
Job failed (system failure): preparing environment: ... This error is often due to your shell loading your profile, and one of the scripts...
Read more >
Visual Studio not able to compile a simple Hello World
Open your project in explorer. Navigate to your build directory. Delete everything in it if you can. If you can't, delete anything that's...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found