I followed tutorial and add result this tutorial on git

When I trying deploy my contract via command: truffle migrate --network ropsten

I have error: enter image description here

How fix this gub?

  • Did you npm install the required dependencies? From your stack trace it seems the dependency scrypt.js is missing. Some dependencies need a c++ compiler for that you may need this npmjs.com/package/windows-build-tools. Also try upgrading your node version, I'm using v8.6 without issues on Windows 7. – Ismael Oct 27 '17 at 4:14

You can deploy this contract in enother way:

function sendRaw(rawTx) {
    var privateKey = new Buffer(key, 'hex');
    var transaction = new tx(rawTx);
    var serializedTx = transaction.serialize().toString('hex');
    '0x' + serializedTx, function(err, result) {
        if(err) {
        } else {

var rawTx = {
    nonce: web3.toHex(web3.eth.getTransactionCount(address)),
    gasLimit: web3.toHex(1500000),
    gasPrice: web3.toHex(80000000),
    data: bytecode 
| improve this answer | |

Thanks I runed command npm init, add dependencies of project:

  "name": "package",
  "version": "1.0.0",
  "description": "Deploy smart-contract via truffle",
  "main": "truffle.js",
  "directories": {
    "test": "test"
  "dependencies": {
    "bip39": "^2.4.0",
    "ethereumjs-wallet": "^0.6.0",
    "web3-provider-engine": "^13.3.3",
    "hdkey": "latest",
    "web3": "latest" 
  "devDependencies": {},
  "scripts": {
    "test": "echo \"Error: no test specified\" && exit 1",
    "start" : "node truffle.js"
  "repository": {
    "type": "git",
    "url": "git+https://github.com/poperechnyi1/TruffleDeploy.git"
  "author": "",
  "license": "ISC",
  "bugs": {
    "url": "https://github.com/poperechnyi1/TruffleDeploy/issues"
  "homepage": "https://github.com/poperechnyi1/TruffleDeploy#readme"

Then I runed coomand npm install and npm start. And I have error: enter image description here

I use npm version 3.10.10 and nove version v6.11.5.

| improve this answer | |

Run npm install scrypt.js --save
This is not a truffle error, you need to install all the modules being used in the project. Let me know if it worked. Thanks !

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.