solidity-stringutils icon indicating copy to clipboard operation
solidity-stringutils copied to clipboard

Unable to import "undefined": Not Found

Open maroodb opened this issue 6 years ago • 5 comments

when I compile the smart contract it throws this error : Unable to import "undefined": Not Found*

this is my smart contract:

pragma solidity ^0.4.0;
import "github.com/Arachnid/solidity-stringutils/strings.sol";
contract Ballot {

       using strings for *;
       
       
       function splitString (string result) public constant returns (string){
           var s = "www.google.com".toSlice();
           var delim = ".".toSlice();
           var parts = new string[](s.count(delim) + 1);
           for(uint i = 0; i < parts.length; i++) {
              parts[i] = s.split(delim).toString();
            }
            
            return parts[0];

       }
}

maroodb avatar Jun 01 '18 08:06 maroodb

Hello, all. Same for me...

SelimTavukcuoglu avatar Jun 05 '18 14:06 SelimTavukcuoglu

the solution is to replace import "github.com/Arachnid/solidity-stringutils/strings.sol"; by "import "github.com/Arachnid/solidity-stringutils/src/strings.sol";

maroodb avatar Jun 06 '18 08:06 maroodb

Still not working...

SelimTavukcuoglu avatar Jun 06 '18 14:06 SelimTavukcuoglu

Working in Remix for me now screen shot 2018-06-06 at 11 30 31 am

xeroblood-io avatar Jun 06 '18 15:06 xeroblood-io

if running this locally does this have to use externals? and is this published on npm?

maikelmclauflin avatar May 28 '20 02:05 maikelmclauflin