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

🐛Cannot find module react-scanner.config.js #5492

Closed
2 tasks done
sschwenker opened this issue May 3, 2024 · 8 comments
Closed
2 tasks done

🐛Cannot find module react-scanner.config.js #5492

sschwenker opened this issue May 3, 2024 · 8 comments
Labels

Comments

@sschwenker
Copy link

📜 Description

When I run the pnpm run setup:project command to setup the project, I get the following error.

✔️ styled-system/jsx: styled jsx elements for react
│ > @novu/[email protected] prepare:audit C:\Development\git\novu\libs\design-system
│ > pnpm audit-components
│ > @novu/[email protected] audit-components C:\Development\git\novu\libs\design-system
│ > pnpm react-scanner -c './react-scanner.config.js'
│ node:internal/modules/cjs/loader:1147
│ throw err;
│ ^
│ Error: Cannot find module 'C:\Development\git\novu\libs\design-system'.\react-scanner.config.js''
│ Require stack:
│ - C:\Development\git\novu\node_modules.pnpm\[email protected]\node_modules\react-scanner\src\index.js
│ - C:\Development\git\novu\node_modules.pnpm\[email protected]\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 C:\Development\git\novu\node_modules.pnpm\[email protected]\node_modules\react-scanner\src\index.js:14:20
│ at o.parse (C:\Development\git\novu\node_modules.pnpm\[email protected]\node_modules\sade\lib\index.js:1:3402)
│ at Object. (C:\Development\git\novu\node_modules.pnpm\[email protected]\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: [
│ 'C:\Development\git\novu\node_modules\.pnpm\[email protected]\node_modules\react-scanner\src\index.js',
│ 'C:\Development\git\novu\node_modules\.pnpm\[email protected]\node_modules\react-scanner\bin\react-scanner'
│ ]
│ }
│ Node.js v20.11.1
│  ELIFECYCLE  Command failed with exit code 1.
│  ELIFECYCLE  Command failed with exit code 1.
└─ Failed in 8.9s at C:\Development\git\novu\libs\design-system
 ELIFECYCLE  Command failed with exit code 1.

👟 Reproduction steps

Check out the codebase and run pnpm run setup:project

👍 Expected behavior

It should install the projects required dependencies.

👎 Actual Behavior with Screenshots

It's throwing the error above.

Novu version

the current next branch

npm version

No response

node version

No response

📃 Provide any additional context for the Bug.

No response

👀 Have you spent some time to check if this bug has been raised before?

  • I checked and didn't find a similar issue

🏢 Have you read the Contributing Guidelines?

Are you willing to submit PR?

None

Copy link

linear bot commented May 3, 2024

@github-actions github-actions bot added the triage label May 3, 2024
@itsmemittal
Copy link

I tried clone fresh repo but i am not getting any such error can you try with fresh clone ?

@ayo6706
Copy link

ayo6706 commented May 5, 2024

I had the same issue, and I think it was because my internet went off during the setup, but I am not certain about it, and I was also using Windows. I then decided to use Ubuntu WSL with Windows, and it works now.

@chaunm182
Copy link

chaunm182 commented May 8, 2024

Use linux environment to resolve problem
If using Windows, you can remove the parentheses for react-scanner.config.js in libs\design-system\package.json
"audit-components": "pnpm react-scanner -c ./react-scanner.config.js"

@ayo6706
Copy link

ayo6706 commented May 8, 2024

Use linux environment to resolve problem If using Windows, you can remove the parentheses for react-scanner.config.js in libs\design-system\package.json "audit-components": "pnpm react-scanner -c ./react-scanner.config.js"

I will just advise to switch to a Linux environment or better still make use of Ubuntu WSL on your windows machine because when I faced this issues I had to clone this repo afresh three times and it was resolved when I used a Linux environment.

@sschwenker
Copy link
Author

Hey. I re-checked out the code and opened the project using wsl and things got much better, but it still has errors. I'm now seeing this.

`> @novu/[email protected] build /mnt/c/Development/git/novu/enterprise/packages/libs/dal

node ./check-ee.mjs

node:internal/modules/run_main:129
triggerUncaughtException(
^

@novu/[email protected] build:esm /mnt/c/Development/git/novu/enterprise/packages/libs/dal
cross-env node_modules/.bin/tsc -p tsconfig.build.json
error TS18003: No inputs were found in config file '/mnt/c/Development/git/novu/enterprise/packages/libs/dal/tsconfig.build.json'. Specified 'include' paths were '["src/**/*"]' and 'exclude' paths were '["./dist"]'.
 ELIFECYCLE  Command failed with exit code 2.
(Use node --trace-uncaught ... to show where the exception was thrown)

Node.js v20.13.0
 ELIFECYCLE  Command failed with exit code 1`

@ayo6706
Copy link

ayo6706 commented May 9, 2024

from what i can see here, firstly, you're not using the required node version, v20.8.1, as stated in https://docs.novu.co/community/run-in-local-machine?utm_campaign=github-contrib . Also, make sure you cloned the repo in the WSL environment, which you can also use vscode with the WSL extension to do that easily.

@sschwenker
Copy link
Author

I re-cloned the repo into a folder in my home directory in my wsl instance and that worked. Thank you.

@linear linear bot closed this as not planned Won't fix, can't repro, duplicate, stale Oct 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants