Error: Cannot find module '/code-narrator/src/documentation/plugins/builders/Configuration/ConfigurationBuilder'
Hello,
I am following the setup procedures but when I run npx code-narrator I get this error. The file is there and my editor can follow the definition. Any ideas?
Mac M1 Pro, Node 18.16.
npx code-narrator
Error: Cannot find module '/Users/xxx/Documents/personal/code-narrator/src/documentation/plugins/builders/Configuration/ConfigurationBuilder'
Require stack:
- /Users/xxx/Documents/personal/code-narrator/code-narrator.config.js
- /Users/xxx/Documents/personal/code-narrator/node_modules/code-narrator/dist/src/utils/CliHelper.js
- /Users/xxx/Documents/personal/code-narrator/node_modules/code-narrator/dist/src/cli.js
at Module._resolveFilename (node:internal/modules/cjs/loader:1075:15)
at Module._load (node:internal/modules/cjs/loader:920:27)
at Module.require (node:internal/modules/cjs/loader:1141:19)
at require (node:internal/modules/cjs/helpers:110:18)
at Object.<anonymous> (/Users/xxx/Documents/personal/code-narrator/code-narrator.config.js:1:30)
at Module._compile (node:internal/modules/cjs/loader:1254:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1308:10)
at Module.load (node:internal/modules/cjs/loader:1117:32)
at Module._load (node:internal/modules/cjs/loader:958:12)
at Module.require (node:internal/modules/cjs/loader:1141:19) {
code: 'MODULE_NOT_FOUND',
requireStack: [
'/Users/xxx/Documents/personal/code-narrator/code-narrator.config.js',
'/Users/xxx/Documents/personal/code-narrator/node_modules/code-narrator/dist/src/utils/CliHelper.js',
'/Users/xxx/Documents/personal/code-narrator/node_modules/code-narrator/dist/src/cli.js'
]
}
@DaddyWozBucks
Are you running "npx code-narrator" on the code-narrator project?
It won't work on the code-narrator project itself, you can run "npm run start"
I also deployed new version, 1.0.17, that has some fixes.
Please let me know if it works or not, I can then help more or if it works close the issue
Hi, I am having the same issue under Windows Subsytem for Linux npm run start results in
npm run start
npm ERR! code ENOENT
npm ERR! syscall open
npm ERR! path /mnt/c/repos/akuatax/solution/akuataxcli/package.json
npm ERR! errno -2
npm ERR! enoent Could not read package.json: Error: ENOENT: no such file or directory, open '/mnt/c/repos/akuatax/solution/akuataxcli/package.json'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent
npm ERR! A complete log of this run can be found in: /home/pi/.npm/_logs/2024-06-13T07_13_50_757Z-debug-0.log
The folder I am running the command in has code-narrator.config.js in it.
Installed version is [email protected]
Installing with sudo solved the issue
sudo npm i code-narrator -D