title: TypeError: Cannot read properties of undefined (reading 'path')
body: <p>I'm attempting to generate NFTs using this code but keep getting cannot read properties of undefined reading path, if anyone knows of a fix please write back. I am very new to this whole process and do not know what i should be looking at, i've been following the steps exactly as stated in the youtube video i was watching and this problem was not happening with the person in the video.</p>
  <pre><code>const path = require(&quot;path&quot;);
  const isLocal = typeof process.pkg === &quot;undefined&quot;;
  const basePath = isLocal ? process.cwd() : path.dirname(process.execPath);
  const { MODE } = require(path.join(basePath, &quot;constants/blend_mode.js&quot;));
  const { NETWORK } = require(path.join(basePath, &quot;constants/network.js&quot;));
  
  const network = NETWORK.sol;
  
  // General metadata for Ethereum
  const namePrefix = &quot;CHUMPSNFT&quot;;
  const description = &quot;2,222 Chumps storming Solana Beaches&quot;;
  const baseUri = &quot;ipfs://NewUriToReplace&quot;;
  
  const solanaMetadata = {
    symbol: &quot;CHUMP&quot;,
    seller_fee_basis_points: 700, // Define how much % you want from secondary market sales 1000 = 10%
    external_url: &quot;https://www.loosebucks.net&quot;,
    creators: [
      {
        address: &quot;HXzaa6foNqG3w7XaVykaH6jWAFpNkCfJeDyhXsih2U93&quot;,
        share: 100,
      },
    ],
  };
  
  // If you have selected Solana then the collection starts from 0 automatically
  const layerConfigurations = [
    {
      growEditionSizeTo: 163,
      layersOrder: [
        { name: &quot;Background&quot; },
        { name: &quot;Body Color&quot; },
        { name: &quot;Top&quot; },
        { name: &quot;Accessories&quot; },
        { name: &quot;Face&quot; },
        { name: &quot;Head&quot; },
        { name: &quot;Eyes&quot; },
      ],
    },
    {
      growEditionSizeTo: 326,
      layersOrder: [
        { name: &quot;Background&quot; },
        { name: &quot;Body Color&quot; },
        { name: &quot;Face&quot; },
        { name: &quot;Head&quot; },
        { name: &quot;Eyes&quot; },
      ],
    },
    {
      growEditionSizeTo: 489,
      layersOrder: [
        { name: &quot;Background&quot; },
        { name: &quot;Body Color&quot; },
        { name: &quot;Top&quot; },
        { name: &quot;Accessories&quot; },
        { name: &quot;Eyes&quot; },
      ],
    },
    {
      growEditionSizeTo: 652,
      layersOrder: [
        { name: &quot;Background&quot; },
        { name: &quot;Body Color&quot; },
        { name: &quot;Accessories&quot; },
        { name: &quot;Face&quot; },
        { name: &quot;Head&quot; },
        { name: &quot;Eyes&quot; },
      ],
    },
    {
      growEditionSizeTo: 815,
      layersOrder: [
        { name: &quot;Background&quot; },
        { name: &quot;Body Color&quot; },
        { name: &quot;Accessories&quot; },
        { name: &quot;Head&quot; },
        { name: &quot;Eyes&quot; },
      ],
    },
    {
      growEditionSizeTo: 978,
      layersOrder: [
        { name: &quot;Background1&quot; },
        { name: &quot;Body Color1&quot; },
        { name: &quot;Top1&quot; },
        { name: &quot;Accessories1&quot; },
        { name: &quot;Face1&quot; },
        { name: &quot;Head1&quot; },
        { name: &quot;Eyes1&quot; },
      ],
    },
    {
      growEditionSizeTo: 1141,
      layersOrder: [
        { name: &quot;Background&quot; },
        { name: &quot;Body Color&quot; },
        { name: &quot;Top&quot; },
        { name: &quot;Eyes&quot; },
      ],
    },
    {
      growEditionSizeTo: 1304,
      layersOrder: [
        { name: &quot;Background&quot; },
        { name: &quot;Body Color&quot; },
        { name: &quot;Accessories&quot; },
        { name: &quot;Face&quot; },
        { name: &quot;Eyes&quot; },
      ],
    },
    {
      growEditionSizeTo: 1467,
      layersOrder: [
        { name: &quot;Background&quot; },
        { name: &quot;Body Color&quot; },
        { name: &quot;Eyes&quot; },
      ],
    },
    {
      growEditionSizeTo: 1630,
      layersOrder: [
        { name: &quot;Background&quot; },
        { name: &quot;Body Color&quot; },
        { name: &quot;Face&quot; },
        { name: &quot;Eyes&quot; },
      ],
    },
    {
      growEditionSizeTo: 1793,
      layersOrder: [
        { name: &quot;Background&quot; },
        { name: &quot;Body Color&quot; },
        { name: &quot;Top&quot; },
        { name: &quot;Head&quot; },
        { name: &quot;Eyes&quot; },
      ],
    },
    {
      growEditionSizeTo: 1956,
      layersOrder: [
        { name: &quot;Background&quot; },
        { name: &quot;Body Color&quot; },
        { name: &quot;Accessories&quot; },
        { name: &quot;Eyes&quot; },
      ],
    },
    {
      growEditionSizeTo: 2119,
      layersOrder: [
        { name: &quot;Background1&quot; },
        { name: &quot;Body Color1&quot; },
        { name: &quot;Accessories1&quot; },
        { name: &quot;Eyes1&quot; },
      ],
    },
    {
      growEditionSizeTo: 2282,
      layersOrder: [
        { name: &quot;Background1&quot; },
        { name: &quot;Body Color1&quot; },
        { name: &quot;Top1&quot; },
        { name: &quot;Accessories1&quot; },
        { name: &quot;Face1&quot; },
        { name: &quot;Eyes1&quot; },
      ],
    },
  ];
  
  const shuffleLayerConfigurations = false;
  
  const debugLogs = false;
  
  const format = {
    width: 512,
    height: 512,
  };
  
  const text = {
    only: false,
    color: &quot;#ffffff&quot;,
    size: 20,
    xGap: 40,
    yGap: 40,
    align: &quot;left&quot;,
    baseline: &quot;top&quot;,
    weight: &quot;regular&quot;,
    family: &quot;Courier&quot;,
    spacer: &quot; =&gt; &quot;,
  };
  
  const pixelFormat = {
    ratio: 2 / 128,
  };
  
  const background = {
    generate: true,
    brightness: &quot;80%&quot;,
    static: false,
    default: &quot;#000000&quot;,
  };
  
  const extraMetadata = {};
  
  const rarityDelimiter = &quot;#&quot;;
  
  const uniqueDnaTorrance = 10000;
  
  const preview = {
    thumbPerRow: 5,
    thumbWidth: 50,
    imageRatio: format.width / format.height,
    imageName: &quot;preview.png&quot;,
  };
  
  module.exports = {
    format,
    baseUri,
    description,
    background,
    uniqueDnaTorrance,
    layerConfigurations,
    rarityDelimiter,
    preview,
    shuffleLayerConfigurations,
    debugLogs,
    extraMetadata,
    pixelFormat,
    text,
    namePrefix,
    network,
    solanaMetadata,
  }; ```
  </code></pre>