Truffle: "TypeError: this is not a typed array" during truffle compile

Created on 4 Jul 2017  路  5Comments  路  Source: trufflesuite/truffle

  • [x] I've asked for help in the Truffle Gitter before filing this issue.

Issue

I tried to compile my own smart contract by truffle compile. But instead of successful compile, a long list of error popped out. Initially I though that there was some mistake in my contract, so I tried compiling the default contracts we get during truffle init. Yet the same error popped up.

Steps to Reproduce

truffle init
truffle compile

Expected Behavior

Successful compilation with nothing in the output

Actual Results

ubuntu@vm1:~/truffleTest$ truffle compile

TypeError: this is not a typed array.
at Function.from (native)
at Object.files (/usr/local/lib/node_modules/truffle/build/cli.bundled.js:155104:23)
at module.exports (/usr/local/lib/node_modules/truffle/build/cli.bundled.js:36696:7)
at getFiles (/usr/local/lib/node_modules/truffle/build/cli.bundled.js:46295:9)
at Object.module.exports.updated (/usr/local/lib/node_modules/truffle/build/cli.bundled.js:46299:5)
at Function.xfs.mkdir.module.exports.compile.necessary (/usr/local/lib/node_modules/truffle/build/cli.bundled.js:83411:12)
at Object.Contracts.compile (/usr/local/lib/node_modules/truffle/build/cli.bundled.js:36773:15)
at Object.xfs.mkdir.module.exports.fs.lstat.fs.readdir.fs.writeFile.fs.exists.fs.link.fs.exists.fs.lstat.fs.exists.fs.rename.fs.link.fs.stat.ins.on.outs.on.methods.forEach.options.lstat.options.chmod.options.rmdir.options.readdir.fs.writeFile.fs.open.fs.futimes.fs.open.module.exports.module.exports.module.exports.module.exports.module.exports.command.run (/usr/local/lib/node_modules/truffle/build/cli.bundled.js:200546:15)
at Command.xfs.mkdir.Command.run (/usr/local/lib/node_modules/truffle/build/cli.bundled.js:60901:20)
at Object. (/usr/local/lib/node_modules/truffle/build/cli.bundled.js:200458:9)

ubuntu@vm1:~/truffleTest$

Environment

  • Operating System: Ubuntu 16.04LTS
  • Truffle version: 3.3.1
  • Ethereum client: geth v1.6.5
  • node version: 4.2.6
  • npm version: 3.5.2
bug needs reproduced

Most helpful comment

Update your node to the newest version.
I just updated to 8.1.3 and it compiles fine!

For macOS just run: brew update && brew upgrade node && npm install -g npm

All 5 comments

I'm having the same error

  • MacOS Sierra version: 10.12.5
  • truffle version: 3.4.3
  • node version: 5.6.0
  • npm version: 5.1.0

I'm experiencing the same issue, with a very similar environment to the original poster:

  • OS: Ubuntu Xenial
  • truffle version: 3.4.3
  • Node version: 4.2.6
  • npm version: 3.5.2
  • solidity: 0.4.11

Update your node to the newest version.
I just updated to 8.1.3 and it compiles fine!

For macOS just run: brew update && brew upgrade node && npm install -g npm

Unfortunately the Xenial repository is pretty old, so that would require compiling and installing node by hand, or finding a more up-to-date repository, and that could take a while.

However, I have a machine running Arch (current node version: 8.1.3) and can confirm that it seems to work OK with that version.

Edit: I found a node8 repository for ubuntu and upgraded.

Works now.

Hi there. This looks to be an isolated issue has been fixed (all the :+1:'s were on July 7th). I'm going to close this one for housekeeping. If you continue to run into this issue please open a new ticket and reference this one.

Here's what I get when running the above commands.

screenshot.73.jpg

Cheers!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

KadenZipfel picture KadenZipfel  路  31Comments

inzmamulhassan picture inzmamulhassan  路  29Comments

akravin picture akravin  路  53Comments

xavierlepretre picture xavierlepretre  路  37Comments

filips123 picture filips123  路  40Comments