title: anchor test command error - Error: Cannot find module '[@project-serum/anchor] ' Please verify that the package.json has a valid "main" entry
body: <p>I was following an introduction tutorial using anchor (solana framework), it is based in the official github.
  In the testing part, I used <code>anchor test</code> command and I got this error:</p>
  <pre><code>BPF SDK: /home/sebastian/.local/share/solana/install/releases/1.9.12/solana-release/bin/sdk/bpf
  cargo-build-bpf child: rustup toolchain list -v
  cargo-build-bpf child: cargo +bpf build --target bpfel-unknown-unknown --release
      Finished release [optimized] target(s) in 3.86s
  cargo-build-bpf child: /home/sebastian/.local/share/solana/install/releases/1.9.12/solana-release/bin/sdk/bpf/dependencies/bpf-tools/llvm/bin/llvm-readelf --dyn-symbols /home/sebastian/Documentos/solana-project/anchor/examples/tutorial/basic-1/target/deploy/basic_1.so
  
  To deploy this program:
    $ solana program deploy /home/sebastian/Documentos/solana-project/anchor/examples/tutorial/basic-1/target/deploy/basic_1.so
  The program address will default to this keypair (override with --program-id):
    /home/sebastian/Documentos/solana-project/anchor/examples/tutorial/basic-1/target/deploy/basic_1-keypair.json
  yarn run v1.22.17
  $ /home/sebastian/Documentos/solana-project/anchor/examples/tutorial/node_modules/.bin/mocha -t 1000000 tests/
  
  Error: Cannot find module '/home/sebastian/Documentos/solana-project/anchor/examples/tutorial/node_modules/@project-serum/anchor/dist/cjs/index.js'. Please verify that the package.json has a valid &quot;main&quot; entry
      at tryPackage (node:internal/modules/cjs/loader:353:19)
      at Function.Module._findPath (node:internal/modules/cjs/loader:566:18)
      at Function.Module._resolveFilename (node:internal/modules/cjs/loader:919:27)
      at Function.Module._load (node:internal/modules/cjs/loader:778:27)
      at Module.require (node:internal/modules/cjs/loader:999:19)
      at require (node:internal/modules/cjs/helpers:102:18)
      at Object.&lt;anonymous&gt; (/home/sebastian/Documentos/solana-project/anchor/examples/tutorial/basic-1/tests/basic-1.js:2:16)
      at Module._compile (node:internal/modules/cjs/loader:1099:14)
      at Object.Module._extensions..js (node:internal/modules/cjs/loader:1153:10)
      at Module.load (node:internal/modules/cjs/loader:975:32)
      at Function.Module._load (node:internal/modules/cjs/loader:822:12)
      at ModuleWrap.&lt;anonymous&gt; (node:internal/modules/esm/translators:170:29)
      at ModuleJob.run (node:internal/modules/esm/module_job:198:25)
      at async Promise.all (index 0)
      at async ESMLoader.import (node:internal/modules/esm/loader:385:24)
      at async importModuleDynamicallyWrapper (node:internal/vm/module:437:15)
      at async formattedImport (/home/sebastian/Documentos/solana-project/anchor/examples/tutorial/node_modules/mocha/lib/nodejs/esm-utils.js:7:14)
      at async Object.exports.requireOrImport (/home/sebastian/Documentos/solana-project/anchor/examples/tutorial/node_modules/mocha/lib/nodejs/esm-utils.js:48:32)
      at async Object.exports.loadFilesAsync (/home/sebastian/Documentos/solana-project/anchor/examples/tutorial/node_modules/mocha/lib/nodejs/esm-utils.js:88:20)
      at async singleRun (/home/sebastian/Documentos/solana-project/anchor/examples/tutorial/node_modules/mocha/lib/cli/run-helpers.js:125:3)
      at async Object.exports.handler (/home/sebastian/Documentos/solana-project/anchor/examples/tutorial/node_modules/mocha/lib/cli/run.js:374:5)
  error Command failed with exit code 1.
  info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
  </code></pre>
  <p>This is my package.json:</p>
  <pre><code>{
    &quot;name&quot;: &quot;basic-1&quot;,
    &quot;version&quot;: &quot;0.24.2&quot;,
    &quot;license&quot;: &quot;(MIT OR Apache-2.0)&quot;,
    &quot;homepage&quot;: &quot;https://github.com/project-serum/anchor#readme&quot;,
    &quot;bugs&quot;: {
      &quot;url&quot;: &quot;https://github.com/project-serum/anchor/issues&quot;
    },
    &quot;repository&quot;: {
      &quot;type&quot;: &quot;git&quot;,
      &quot;url&quot;: &quot;https://github.com/project-serum/anchor.git&quot;
    },
    &quot;engines&quot;: {
      &quot;node&quot;: &quot;&gt;=11&quot;
    },
    &quot;scripts&quot;: {
      &quot;test&quot;: &quot;anchor test --skip-lint&quot;
    },
    &quot;dependencies&quot;: {
      &quot;@project-serum/anchor&quot;: &quot;^0.24.2&quot;
    }
  }
  
  </code></pre>
  <p>I really appreciate any information about it. I also attach the tutorial and anchor's github link.</p>
  <ul>
  <li><a href="https://github.com/project-serum/anchor" rel="nofollow noreferrer">https://github.com/project-serum/anchor</a></li>
  <li><a href="https://youtu.be/CmG5_sIas1Q" rel="nofollow noreferrer">https://youtu.be/CmG5_sIas1Q</a></li>
  </ul>