You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I run this command: solcjs --bin --include-path node_modules/ --base-path . LookupContract.sol
And get this result:
Warning: Visibility for constructor is ignored. If you want the contract to be non-deployable, making it "abstract" is sufficient.
--> LookupContract.sol:9:1:
|
9 | constructor (string memory _name, uint _mobileNumber) public {
| ^ (Relevant source part starts here and spans across multiple lines).
fs.js:885
return binding.mkdir(pathModule._makeLong(path),
^
Error: EEXIST: file already exists, mkdir '.'
at Object.fs.mkdirSync (fs.js:885:18)
at Object.<anonymous> (/usr/local/lib/node_modules/solc/solc.js:232:4)
at Module._compile (module.js:653:30)
at Object.Module._extensions..js (module.js:664:10)
at Module.load (module.js:566:32)
at tryModuleLoad (module.js:506:12)
at Function.Module._load (module.js:498:3)
at Function.Module.runMain (module.js:694:10)
at startup (bootstrap_node.js:204:16)
at bootstrap_node.js:625:3
Here is the content of LookupContract.sol:
// SPDX-License-Identifier: GPL-3.0
pragma solidity >=0.7.0 <0.9.0;
contract LookupContract {
mapping (string => uint) public myDirectory;
constructor (string memory _name, uint _mobileNumber) public {
myDirectory[_name] = _mobileNumber;
}
function setMobileNumber(string memory _name, uint _mobileNumber) public {
myDirectory[_name] = _mobileNumber;
}
function getMobileNumber(string memory _name) public view returns (uint) {
return myDirectory[_name];
}
}
It errors out because the directory exists but this is not supposed to happen because we use the recursive option. It could be a bug in node.js or the fs module - maybe there's something unusual on your filesystem (permissions?) - but whatever it is, the function is supposed to handle that.
Hi:
I run this command:
solcjs --bin --include-path node_modules/ --base-path . LookupContract.sol
And get this result:
Here is the content of
LookupContract.sol
:Here is my package.json
Help? I am jammed up.
Triple thanks in advance!
The text was updated successfully, but these errors were encountered: