Skip to content

MODULE_NOT_FOUND #80

Open
Open
@zdarovka

Description

I am having problem running the scanner on my project. Any ideas? :)

npx react-scanner -c /path/to/config/react-scanner.config.js
node:internal/modules/cjs/loader:1147
  throw err;
  ^

Error: Cannot find module '/path/to/project'
Require stack:
- /path/to/project/node_modules/react-scanner/src/index.js
- /path/to/project/node_modules/react-scanner/bin/react-scanner
    at Module._resolveFilename (node:internal/modules/cjs/loader:1144:15)
    at Module._load (node:internal/modules/cjs/loader:985:27)
    at Module.require (node:internal/modules/cjs/loader:1235:19)
    at require (node:internal/modules/helpers:176:18)
    at /path/to/project/node_modules/react-scanner/src/index.js:14:20
    at o.parse (/path/to/project/node_modules/sade/lib/index.js:1:3402)
    at Object.<anonymous> (/path/to/project/node_modules/react-scanner/src/index.js:17:4)
    at Module._compile (node:internal/modules/cjs/loader:1376:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1435:10)
    at Module.load (node:internal/modules/cjs/loader:1207:32) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [
    '/path/to/project/node_modules/react-scanner/src/index.js',
    '/path/to/project/node_modules/react-scanner/bin/react-scanner'
  ]
}

Node.js v20.10.0

This is my tsconfig

{
  "compilerOptions": {
    "target": "ESNext",
    "useDefineForClassFields": true,
    "lib": ["DOM", "DOM.Iterable", "ESNext"],
    "allowJs": false,
    "skipLibCheck": true,
    "strictNullChecks": false,
    "noImplicitReturns": true,
    "noImplicitThis": true,
    "noImplicitAny": false,
    "esModuleInterop": true,
    "allowSyntheticDefaultImports": true,
    "strict": true,
    "forceConsistentCasingInFileNames": true,
    "module": "ESNext",
    "moduleResolution": "Node",
    "resolveJsonModule": true,
    "isolatedModules": true,
    "noEmit": true,
    "jsx": "react",
    "baseUrl": ".",
    "paths": {
      "~": ["./src"],
      "~/*": ["./src/*"]
    }
  },
  "include": ["src"]
}

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions