Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MODULE_NOT_FOUND #80

Open
zdarovka opened this issue Dec 9, 2024 · 0 comments
Open

MODULE_NOT_FOUND #80

zdarovka opened this issue Dec 9, 2024 · 0 comments

Comments

@zdarovka
Copy link

zdarovka commented Dec 9, 2024

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"]
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant