You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jun 15, 2023. It is now read-only.
I am very new to npm and brunch so please bare with me..
What i need is simply to compress my js file.. that is having (=>) and (let) that are consider es5 or es6 im not sure .. and this is because i am working with the phoenix.js library for websockets that uses this syntax..
how ever for production i would need to compress these file
and each time i run ( npm start ) i get the following errors:
npm ERR! Linux 4.4.0-101-generic
npm ERR! argv "/usr/bin/node" "/usr/bin/npm" "start"
npm ERR! node v6.12.0
npm ERR! npm v3.10.10
npm ERR! code ELIFECYCLE
npm ERR! nameProject@version start: babel src -d dist
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the nameProject@version start script 'babel src -d dist'.
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 nameProject package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! babel src -d dist
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs nameProject
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls nameProject
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! {path}/nameProject/npm-debug.log
This discussion was converted from issue #1772 on August 07, 2021 20:29.
Heading
Bold
Italic
Quote
Code
Link
Numbered list
Unordered list
Task list
Attach files
Mention
Reference
Menu
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Description
I am very new to npm and brunch so please bare with me..
What i need is simply to compress my js file.. that is having (=>) and (let) that are consider es5 or es6 im not sure .. and this is because i am working with the phoenix.js library for websockets that uses this syntax..
how ever for production i would need to compress these file
Expected behavior
This is what is expected to happen
Example1:
https://babeljs.io/repl/#?babili=true&browsers=&build=&builtIns=false&code_lz=G4QwTgBAJgpsMBsD2AHAtjAdgFwLJNgGVtUB1EAS2wswHMAFMJAYxgGc2IBeCABgG4AUAhjYIzABYhMmRNwhsWAa1EA6SdNkIAFACIAHroCUQjTMSqkmPbIDuAfTRtaugDQQntbgD4IVgHIwtrjO2p5GJoJmWpbWuswArmwkGGBuHs4-ELSiAMJJKTBgADI0SmHOEfxAA&debug=false&circleciRepo=&evaluate=false&lineWrap=true&presets=es2015%2Creact%2Cstage-3%2Cbabili&prettier=false&targets=&version=6.26.0
Example 2:
change this code:
to this:
"use strict";var developmentModeStopWaitingProcess=0,channel=socket.channel("x");channel.on("new_msg",function(a){return onNewMsg(a)}),channel.on("customer",function(a){return getCustomerLink(a)});
Actual behavior
what happens is that after
brunch build -d
the generated file has extra code and functions that i dont need
and wraps my code into a
require.register("js/test.js", function(exports, require, module) {
// my code that doesnt work when its here
});
And uglifies it afterwards ..
i dont need all of that extra code i just want to minify it and thts all
I simply need it to work as what this website does:
https://babeljs.io/repl/#?babili=true&browsers=&build=&builtIns=false&code_lz=ARA&debug=false&circleciRepo=&evaluate=false&lineWrap=true&presets=es2015%2Creact%2Cstage-3%2Cbabili&prettier=false&targets=&version=6.26.0
how can i achieve this..
Environment
package.json
contentsbrunch config contents
Logs
each time i build ( brunch build -d ) i get the following:
and each time i run ( npm start ) i get the following errors:
Beta Was this translation helpful? Give feedback.
All reactions