I'm using vim with the syntastic plugin.
I'm getting this message:
Source "zeppelin-solidity/contracts/token/StandardToken.sol" not found: File outside of allowed directories. [solidity/solc]
when editing a .sol file in <prj-root>/contracts (as per truffle init)
zeppelin-solidity was installed by yarn add into <prj-root>/node_modules.
I tried creating a symlink in the contracts directory and running vim from the same directory, and still get the same warning.
I also tried running vim inside the node_modules directory so that the path wouldn't involve a symlink:
$ pwd
/home/ravi/repo/erc20/coin/node_modules
$ ls
zeppelin-solidity
$ vim ../contracts/CapitalCoin.sol
How can I silence this error?
node_modulesis inside the directory you're running the compiler from (or your--base-path) it should work without this option. Otherwise add--allow-paths /path/to/your/node_modules/. Be careful with relative paths. Versions prior to 0.8.8 had several bugs related to path normalization, making--allow-pathsnot whitelist the right thing in some cases (#11688). Also note that this must be the actual location of the files, i.e. not containing any symlinks. – cameel Nov 28 '21 at 18:29