0

I am working on Ubuntu 18.04. I have installed Truffle from the following site:

Truffle for Linux

I am trying to execute an application from the following site:

Petshop Tutorial

I am able to create the temporary file:

    @lc2530hz:~/pet-shop-tutorial$ truffle unbox pet-shop You can improve web3's peformance when     running Node.js versions older than 10.5.0 by installing the (deprecated) scrypt package in your project

    Starting unbox...
    =================

    ✔ Preparing to download box ✔ 
      Downloading 
      npm WARN deprecated chokidar@2.1.8: Chokidar 2 will break on node v14+. Upgrade to     chokidar 3 with 15x less dependencies. 
npm WARN deprecated urix@0.1.0: Please see https://github.com/lydell/urix#deprecated 
npm WARN deprecated resolve-url@0.2.1: https://github.com/lydell/resolve-url#deprecated 
npm WARN optional Skipping failed optional dependency /chokidar/fsevents: 
npm WARN notsup Not compatible with your operating system or architecture: fsevents@1.2.13 
npm WARN pet-shop@1.0.0 No description 
npm WARN pet-shop@1.0.0 No repository field. 
✔ cleaning up temporary files 
✔ Setting up box

    Unbox successful, sweet!

    Commands:

      Compile:        truffle compile   
      Migrate:        truffle migrate   
      Test contracts:   truffle test   
      Run dev server: npm run dev

    @lc2530hz:~/pet-shop-tutorial$

However I am getting error in compilation

$ truffle compile
You can improve web3's peformance when running Node.js versions older than 10.5.0 by installing the (deprecated) scrypt package in your project

Compiling your contracts...
===========================
✔ Fetching solc version list from solc-bin. Attempt #1
✔ Downloading compiler. Attempt #1.
Error: Could not find __Truffle__NotFound.sol from any sources; imported from /home/zulfi/pet-shop-tutorial/contracts/adoption.sol
    at Resolver.<anonymous> (/usr/local/lib/node_modules/truffle/build/webpack:/packages/resolver/dist/lib/resolver.js:53:1)
    at Generator.next (<anonymous>)
    at fulfilled (/usr/local/lib/node_modules/truffle/build/webpack:/packages/resolver/dist/lib/resolver.js:5:42)
    at <anonymous>
Truffle v5.1.27 (core: 5.1.27)
Node v8.10.0

@lc2530hz:~/pet-shop-tutorial$

Somebody please guide me.

Have I installed an older version? Please tell me how to install the updated version for Ubuntu 18.04?

Zulfi.

0

I solved the problem.

I got the clue from the following link:

https://github.com/trufflesuite/trufflesuite.com/issues/102

which says that the problem hasbeen solved at:

https://stackoverflow.com/questions/49090043/truffle-compile-failing-parsererror-expected-token-lparen-got-identifier-funct

which says that I was missing a bracket.

After that I was also making mistakes like:

1) wrong spelling for memory data type 2) wrong spelling for require

Zulfi.

| 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.