enjin / erc-1155

ERC-1155: Smart Contract Sample Implementation
Apache License 2.0
417 stars 209 forks source link

Could not find suitable configuration file. #19

Open StevenTCramer opened 5 years ago

StevenTCramer commented 5 years ago

git clone https://github.com/enjin/erc-1155.git cd .\erc-1155\ npm install

λ  truffle test
Could not find suitable configuration file.
Truffle v5.0.30 (core: 5.0.30)
Node v10.16.0

Are you missing the the truffle-config.js file?

mjtpena commented 4 years ago

Current workaround is to do a: truffle init

and make sure you don't overwrite the contract and test folders.

puaka17 commented 4 years ago

GOoGLE AKAUN

puaka17 commented 4 years ago
gruvin commented 4 years ago

It would appear that /truffle-config.js is did not make it to the repo Workaround:

mkdir tmp && cd tmp && truffle init

Use the resulting truffle-cofig.js example file as a starting point for your specific needs.

Example ...

const HDWalletProvider = require('@truffle/hdwallet-provider');
const fs = require('fs');
const mnemonic = fs.readFileSync(".secret").toString().trim();

module.exports = {
    networks: {
        ropsten: {
            provider: () => new HDWalletProvider(mnemonic, `https://ropsten.infura.io/v3/YOUR-PROJECT-ID`),
            network_id: 3,       // Ropsten's id
            gas: 5500000,        // Ropsten has a lower block limit than mainnet
            confirmations: 2,    // # of confs to wait between deployments. (default: 0)
            timeoutBlocks: 200,  // # of blocks before a deployment times out  (minimum/default: 50)
            skipDryRun: true     // Skip dry run before migrations? (default: false for public nets )
        },
    },

    // Set default mocha options here, use special reporters etc.
    mocha: {
        // timeout: 100000
    },

    // Configure your compilers
    compilers: {
        solc: {
            version: "0.5.8",    // Fetch exact version from solc-bin (default: truffle's version)
            settings: {          // See the solidity docs for advice about optimization and evmVersion
                optimizer: {
                    enabled: false,
                    runs: 200
                }
            }
        }
    }
}

... replacing YOUR-PROJECT-ID with your Infura (in this example) project ID

Then ...

cd erc-1155
# nvm use 12 # we need NodeJS >= 12 for ES module support
npm install
npm install @truffle/hdwallet-provider
echo 'grunt venture follow rhythm gun myth topple man hollow armed clap shoved' > .secret
truffle migrate --network ropsten
truffle test --ropsten

... replacing grunt venture follow... with the test word mnemonic for your test Ropsten testnet wallet, having sufficient funds in account[1] (not #0) for contract deployment. (user1=accounts[1] in ./test/*.js code)

riman002 commented 1 year ago

hey guys recently i have started with truffle framework i was trying the truffle unbox package but when i try to run the develop console in it it throws an error

`Error: The specified module could not be found. Falling back to a NodeJS implementation; performance may be degraded.

Could not find suitable configuration file. Truffle v5.7.2 (core: 5.7.2) Node v16.17.0` a help would have made my day.