PacktPublishing / Blockchain-Development-for-Finance-Projects

Blockchain Development for Finance Projects, published by Packt
MIT License
84 stars 49 forks source link

Condos.sol - TypeError: Cannot read properties of null (reading '0') #114

Open i2thesecond opened 2 years ago

i2thesecond commented 2 years ago

I am having trouble compiling the Condos.sol contract.

The terminal output is below:

truffle(development)> compile

Compiling your contracts...
===========================
> Compiling ./contracts/Condos.sol
TypeError: Cannot read properties of null (reading '0')
    at detectErrors (/usr/lib/node_modules/truffle/build/webpack:/packages/compile-solidity/dist/run.js:230:65)
    at /usr/lib/node_modules/truffle/build/webpack:/packages/compile-solidity/dist/run.js:49:42
    at Generator.next (<anonymous>)
    at fulfilled (/usr/lib/node_modules/truffle/build/webpack:/packages/compile-solidity/dist/run.js:4:42)

I have tried copying/pasting the supplied Condos.sol code but the error remains. Please help.

saurabhk710 commented 2 years ago

Hi @i2thesecond !

It looks like an environment setup issue. Can you check whether you have installed truffle correctly and followed the steps as is?

danfer commented 2 years ago

Same issue, on Mac, unable to install truffle using sudo npm install -g, had to use yarn, nevertheless, still getting error. May be book needs updated version as seems many of them have changed at different libraries.

JUGERNAUTUS commented 2 years ago

Hi Danfer.

Truffle and npm are dependent softwares for the applications in the book to run.

Reach out to the respective project teams fo any issues you might be facing.

https://phoenixnap.com/kb/install-node-js-npm-on-windows

https://trufflesuite.com/

Thanks Ishan

On Mon, 31 Jan, 2022, 8:05 am Danfer Habed, @.***> wrote:

Same issue, on Mac, unable to install truffle using sudo npm install -g, had to use yarn, nevertheless, still getting error. May be book needs updated version as seems many of them have changed at different libraries.

— Reply to this email directly, view it on GitHub https://github.com/PacktPublishing/Blockchain-Development-for-Finance-Projects/issues/114#issuecomment-1025325103, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABU3FG3BS3Q37CFUNE7BYY3UYXYQ7ANCNFSM5JVBSGOQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

You are receiving this because you are subscribed to this thread.Message ID: <PacktPublishing/Blockchain-Development-for-Finance-Projects/issues/114/1025325103 @github.com>