trufflesuite / truffle

:warning: The Truffle Suite is being sunset. For information on ongoing support, migration options and FAQs, visit the Consensys blog. Thank you for all the support over the years.
https://consensys.io/blog/consensys-announces-the-sunset-of-truffle-and-ganache-and-new-hardhat?utm_source=github&utm_medium=referral&utm_campaign=2023_Sep_truffle-sunset-2023_announcement_
MIT License
14.02k stars 2.31k forks source link

Passing options to a custom build #105

Closed MrChico closed 8 years ago

MrChico commented 8 years ago

When one has a custom building process in truffle such as

    "build": "browserify -t reactify app/javascript/init.jsx -o environments/development/build/app.js",

in truffle.json, truffle doesn't know how to interpret it:

$ truffle build
Running `browserify -t reactify app/javascript/init.jsx -o environments/development/build/app.js`...
/home/martin/.npm-packages/lib/node_modules/truffle/node_modules/solc/bin/soljson-latest.js:1
(function (exports, require, module, __filename, __dirname) { var Module;if(!Module)Module=(typeof Module!=="undefined"?Module:null)||{};var moduleOverrides={};for(var key in Module){if(Module.hasOwnProperty(key)){moduleOverrides[key]=Module[key]}}var ENVIRONMENT_IS_WEB=typeof window==="object";var ENVIRONMENT_IS_WORKER=typeof importScripts==="function";var ENVIRONMENT_IS_NODE=typeof process==="object"&&typeof require==="function"&&!ENVIRONMENT_IS_WEB&&!ENVIRONMENT_IS_WORKER;var ENVIRONMENT_IS_SHELL=!ENVIRONMENT_IS_WEB&&!ENVIRONMENT_IS_NODE&&!ENVIRONMENT_IS_WORKER;if(ENVIRONMENT_IS_NODE){if(!Module["print"])Module["print"]=function print(x){process["stdout"].write(x+"\n")};if(!Module["printErr"])Module["printErr"]=function printErr(x){process["stderr"].write(x+"\n")};var nodeFS=require("fs");var nodePath=require("path");Module["read"]=function read(filename,binary){filename=nodePath["normalize"](filename);var ret=n

Error: spawn browserify -t reactify app/javascript/init.jsx -o environments/development/build/app.js ENOENT
  at exports._errnoException (util.js:837:11)
  at Process.ChildProcess._handle.onexit (internal/child_process.js:178:32)
  at onErrorNT (internal/child_process.js:344:16)
  at doNTCallback2 (node.js:429:9)
  at process._tickDomainCallback (node.js:384:17)
  at Function.module.exports.loopWhile (/home/martin/.npm-packages/lib/node_modules/truffle/node_modules/deasync/index.js:64:21)
...
tcoulter commented 8 years ago

@MrChico Thanks for the ticket. This should now be fixed on master. Can you give it shot and let me know if it work for you? Closing this ticket. Please reopen if you still have issues.