Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Running production and creating distribution files fails #3

Open
vboctor opened this issue Nov 30, 2017 · 3 comments
Open

Running production and creating distribution files fails #3

vboctor opened this issue Nov 30, 2017 · 3 comments

Comments

@vboctor
Copy link
Contributor

vboctor commented Nov 30, 2017

Just cloned the repository and got the app running in debug mode, but production mode and creation of distribution files are failing.

 electron-react git:(master) ✗ npm run dist

> [email protected] dist /Users/vboctor/js/electron-react
> npm run prod && electron-builder


> [email protected] prod /Users/vboctor/js/electron-react
> cross-env NODE_ENV=production webpack --progress --color --config webpack/prod.config.js

 92% chunk asset optimization/Users/vboctor/js/electron-react/node_modules/webpack-sources/node_modules/source-map/lib/source-map-generator.js:276
        throw new Error(
        ^

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] (/Users/vboctor/js/electron-react/node_modules/webpack-sources/node_modules/source-map/lib/source-map-generator.js:276:15)
    at SourceMapGenerator_addMapping [as addMapping] (/Users/vboctor/js/electron-react/node_modules/webpack-sources/node_modules/source-map/lib/source-map-generator.js:110:12)
    at /Users/vboctor/js/electron-react/node_modules/webpack-sources/node_modules/source-map/lib/source-map-generator.js:72:17
    at Array.forEach (native)
    at SourceMapConsumer_eachMapping [as eachMapping] (/Users/vboctor/js/electron-react/node_modules/webpack-sources/node_modules/source-map/lib/source-map-consumer.js:157:14)
    at Function.SourceMapGenerator_fromSourceMap [as fromSourceMap] (/Users/vboctor/js/electron-react/node_modules/webpack-sources/node_modules/source-map/lib/source-map-generator.js:48:24)
    at SourceMapSource.node (/Users/vboctor/js/electron-react/node_modules/webpack-sources/lib/SourceMapSource.js:32:35)
    at SourceMapSource.proto.sourceAndMap (/Users/vboctor/js/electron-react/node_modules/webpack-sources/lib/SourceAndMapMixin.js:30:18)
    at getTaskForFile (/Users/vboctor/js/electron-react/node_modules/webpack/lib/SourceMapDevToolPlugin.js:33:30)
    at chunk.files.forEach.file (/Users/vboctor/js/electron-react/node_modules/webpack/lib/SourceMapDevToolPlugin.js:91:21)
    at Array.forEach (native)
    at /Users/vboctor/js/electron-react/node_modules/webpack/lib/SourceMapDevToolPlugin.js:89:18
    at Array.forEach (native)
    at Compilation.<anonymous> (/Users/vboctor/js/electron-react/node_modules/webpack/lib/SourceMapDevToolPlugin.js:88:12)
    at Compilation.applyPlugins1 (/Users/vboctor/js/electron-react/node_modules/tapable/lib/Tapable.js:75:14)
    at self.applyPluginsAsync.err (/Users/vboctor/js/electron-react/node_modules/webpack/lib/Compilation.js:670:11)
    at next (/Users/vboctor/js/electron-react/node_modules/tapable/lib/Tapable.js:202:11)
    at Compilation.compilation.plugin (/Users/vboctor/js/electron-react/node_modules/webpack/lib/ProgressPlugin.js:119:6)
    at next (/Users/vboctor/js/electron-react/node_modules/tapable/lib/Tapable.js:204:14)
    at Compilation.<anonymous> (/Users/vboctor/js/electron-react/node_modules/babel-minify-webpack-plugin/dist/index.js:119:11)
    at Compilation.applyPluginsAsyncSeries (/Users/vboctor/js/electron-react/node_modules/tapable/lib/Tapable.js:206:13)
    at self.applyPluginsAsync.err (/Users/vboctor/js/electron-react/node_modules/webpack/lib/Compilation.js:666:10)
    at next (/Users/vboctor/js/electron-react/node_modules/tapable/lib/Tapable.js:202:11)
    at Compilation.compilation.plugin.callback (/Users/vboctor/js/electron-react/node_modules/webpack/lib/ProgressPlugin.js:115:6)
    at next (/Users/vboctor/js/electron-react/node_modules/tapable/lib/Tapable.js:204:14)
    at Compilation.<anonymous> (/Users/vboctor/js/electron-react/node_modules/extract-text-webpack-plugin/dist/index.js:275:11)
    at Compilation.applyPluginsAsyncSeries (/Users/vboctor/js/electron-react/node_modules/tapable/lib/Tapable.js:206:13)
    at sealPart2 (/Users/vboctor/js/electron-react/node_modules/webpack/lib/Compilation.js:662:9)
    at next (/Users/vboctor/js/electron-react/node_modules/tapable/lib/Tapable.js:202:11)
    at Compilation.compilation.plugin (/Users/vboctor/js/electron-react/node_modules/webpack/lib/ProgressPlugin.js:111:6)

npm ERR! Darwin 17.2.0
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "run" "prod"
npm ERR! node v6.9.1
npm ERR! npm  v3.10.8
npm ERR! code ELIFECYCLE
npm ERR! [email protected] prod: `cross-env NODE_ENV=production webpack --progress --color --config webpack/prod.config.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] prod script 'cross-env NODE_ENV=production webpack --progress --color --config webpack/prod.config.js'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the electron-react-test package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     cross-env NODE_ENV=production webpack --progress --color --config webpack/prod.config.js
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs electron-react-test
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls electron-react-test
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /Users/vboctor/js/electron-react/npm-debug.log

npm ERR! Darwin 17.2.0
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "run" "dist"
npm ERR! node v6.9.1
npm ERR! npm  v3.10.8
npm ERR! code ELIFECYCLE
npm ERR! [email protected] dist: `npm run prod && electron-builder`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] dist script 'npm run prod && electron-builder'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the electron-react-test package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     npm run prod && electron-builder
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs electron-react-test
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls electron-react-test
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /Users/vboctor/js/electron-react/npm-debug.log
@tahnik
Copy link
Owner

tahnik commented Nov 30, 2017

I just cloned it and it's building the prod correctly. From a quick google search, looks like you just need to remove your build files and run the command again.

@hemantasapkota
Copy link

@tahnik i'm getting the same error @vboctor got. What version of node are you using ?

@tahnik
Copy link
Owner

tahnik commented May 2, 2018

@hemantasapkota version 9.5.0

Did you try removing package-lock.json?

EDIT: I just fixed an error related to extract-css-webpack-plugin. Pull the latest and see if it fixes your issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants