EIDA / webdc3

WebDC3 is the webinterface for EIDA.
http://geofon.gfz-potsdam.de/software/webdc3/
GNU General Public License v3.0
11 stars 10 forks source link

The same error appear with new version of makefile #25

Closed GarryLai closed 5 years ago

GarryLai commented 5 years ago

The same error appear with new version of makefile. My npm and all packages are the latest version.

root@sc3training:/var/www/webinterface# make mkdir -p js browserify --entry src/main.js --transform [ babelify --presets env --no-comments --minified ] --outfile js/webdc3.min.js Error: .presets must be an array, or undefined while parsing file: /var/www/webinterface/src/main.js at assertArray (/var/www/webinterface/node_modules/@babel/core/lib/config/validation/option-assertions.js:150:11) at assertPluginList (/var/www/webinterface/node_modules/@babel/core/lib/config/validation/option-assertions.js:219:15) at Object.keys.forEach.key (/var/www/webinterface/node_modules/@babel/core/lib/config/validation/options.js:107:5) at Array.forEach () at validateNested (/var/www/webinterface/node_modules/@babel/core/lib/config/validation/options.js:83:21) at validate (/var/www/webinterface/node_modules/@babel/core/lib/config/validation/options.js:74:10) at loadPrivatePartialConfig (/var/www/webinterface/node_modules/@babel/core/lib/config/partial.js:66:50) at Object.loadPartialConfig (/var/www/webinterface/node_modules/@babel/core/lib/config/partial.js:110:18) at transform (/var/www/webinterface/node_modules/babelify/index.js:157:17) at BabelifyStream._flush (/var/www/webinterface/node_modules/babelify/index.js:138:5) Makefile:13: recipe for target 'js/webdc3.min.js' failed make: *** [js/webdc3.min.js] Error 1 root@sc3training:/var/www/webinterface#

andres-h commented 5 years ago

Please remove the node_modules directory and (re-)install the required modules:

$ npm install browserify babelify@8 babel-core babel-preset-env

GarryLai commented 5 years ago

Thanks, it worked!

Ashish-Toppo commented 3 years ago

thanks man it worked for me, also make sure that in your '.babelrc' file the presets are in an array: { 'presets': ['@babel/preset-env'] }