Closed seawatts closed 2 years ago
Hello @seawatts
I did install from npm in a fresh repository
npm i @openzeppelin/contracts
and I do have the JSON files under
ls -alh node_modules/@openzeppelin/contracts/build/contracts/
Hey @Amxx, thanks for the prompt response. You are correct! 🎉 I was looking in the wrong directory. My bad... 🤦
Closing issue.
I am trying to import the contract abi JSON files into my node project. e.x.
However, the json files do not seem to be included in the npm package even though in the
package.json
it says they should be included.💻 Environment Node.js Mac OSX Typescript
"@openzeplin/contracts": "4.5.0"
Node.js 16.x
Typescript: 4.6.2
📝 Details I downloaded the source and tried running
npm pack
locally to see the output contents. Here is the output:Notice only the
.sol
files seem to be included even though it says it should be including/build/contracts/*.json
defined inpackage.json
here: https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/package.json#L7When I compile and run
npm run prepack
it builds and puts the.json
files in the correctbuild/contracts
folder. However, when packing, they seem to get removed and then not included in the npm tar.Here is the output from
prepack
in the/build/contracts
folderIf not including them is on purpose, then I might open a feature request.