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

[Bug]: Error when running the scaffolding: Failed to read tuono.config.ts #506

Closed
sooboy opened this issue Feb 5, 2025 · 11 comments
Closed
Assignees
Labels
bug Something isn't working

Comments

@sooboy
Copy link

sooboy commented Feb 5, 2025

Description

Error when running the scaffolding: Failed to read tuono.config.ts

Expected behaviour

I ran the npm install command, and it seemed to complete successfully:

mac@macdeMac-Pro rust % tuono new tuono-with-tailwind
mac@macdeMac-Pro tuono-with-tailwind % npm install

added 92 packages in 26s

13 packages are looking for funding
  run `npm fund` for details

However, when I tried to run the development server using the tuono dev command or build the project using the tuono build command, I got the same error message every time:

mac@macdeMac-Pro tuono-with-tailwind % tuono dev
[CLI] Failed to read tuono.config.ts
mac@macdeMac-Pro tuono-with-tailwind % tuono dev
[CLI] Failed to read tuono.config.ts
mac@macdeMac-Pro tuono-with-tailwind % tuono build
[CLI] Failed to read tuono.config.ts

How to reproduce

mac@macdeMac-Pro rust % tuono new tuono-with-tailwind
mac@macdeMac-Pro tuono-with-tailwind % npm install
mac@macdeMac-Pro tuono-with-tailwind % tuono dev
[CLI] Failed to read tuono.config.ts
mac@macdeMac-Pro tuono-with-tailwind % tuono dev
[CLI] Failed to read tuono.config.ts
mac@macdeMac-Pro tuono-with-tailwind % tuono build
[CLI] Failed to read tuono.config.ts

Screenshots

Image

Image

System Info

System:
    OS: macOS 12.7.6
    CPU: (24) x64 Intel(R) Xeon(R) CPU E5-2697 v2 @ 2.70GHz
    Memory: 22.67 GB / 64.00 GB
    Shell: 5.8.1 - /bin/zsh
  Binaries:
    Node: 20.17.0 - ~/.local/share/mise/installs/node/20/bin/node
    npm: 10.8.2 - ~/.local/share/mise/installs/node/20/bin/npm
    pnpm: 9.14.2 - ~/.local/share/mise/installs/pnpm/latest/bin/pnpm
    bun: 1.1.20 - ~/.local/share/mise/installs/bun/1.1.20/bin/bun
  Browsers:
    Chrome: 132.0.6834.160
    Safari: 17.6
  npmPackages:
    tuono: 0.17.6 => 0.17.6

System info (Rust)

rustc 1.84.0 (9fc6b4312 2025-01-07)
cargo 1.84.0 (66221abde 2024-11-19)
tuono 0.17.6

Additional context

No response

@sooboy sooboy added the bug Something isn't working label Feb 5, 2025
@Valerioageno
Copy link
Member

Thanks for sharing. Could you please run the following command after tuono dev

ls .tuono/config

@sooboy
Copy link
Author

sooboy commented Feb 5, 2025

mac@macdeMac-Pro tuono-with-tailwind % ls .tuono/config
ls: .tuono/config: No such file or directory

@sooboy
Copy link
Author

sooboy commented Feb 5, 2025

Image

@Valerioageno
Copy link
Member

Could you please run ls node_modules/.bin?

@Valerioageno Valerioageno self-assigned this Feb 5, 2025
@getong
Copy link

getong commented Feb 5, 2025

$ ls node_modules/.bin 
browserslist           prettier               tuono-build-prod
esbuild                rollup                 tuono-dev-ssr
jsesc                  semver                 tuono-dev-watch
json5                  tsc                    update-browserslist-db
nanoid                 tsserver               vite
parser                 tuono-build-config

@getong
Copy link

getong commented Feb 5, 2025

$ ls .tuono 
client-main.tsx config          main.rs         server-main.tsx

$ ls .tuono/config 
config.mjs

$ cat .tuono/config/config.mjs 
const config = {};
export {
  config as default
};

tuono 0.17.6

@getong
Copy link

getong commented Feb 5, 2025

I have the same issue, I solve it by update package:

ncu -u 

 @types/react      19.0.2  →  19.0.8
 @types/react-dom  19.0.2  →  19.0.3
 tuono             0.17.0  →  0.17.6
 typescript         5.6.3  →   5.7.3

then install the packages:

pnpm i
tuono dev

and it will be ok now.

Besides, My tuono cli is 0.17.6

@Valerioageno
Copy link
Member

I think it is a wrong dependency installation. Let's wait @sooboy command to see his situation! Thanks for sharing @getong

@sooboy
Copy link
Author

sooboy commented Feb 5, 2025

Sorry I kept you hanging!

mac@macdeMac-Pro tuono-with-tailwind % ls node_modules/.bin
browserslist		jsesc			prettier		tsserver		tuono-dev-watch
detect-libc		json5			rollup			tuono-build-config	update-browserslist-db
esbuild			nanoid			semver			tuono-build-prod	vite
jiti			parser			tsc			tuono-dev-ssr
mac@macdeMac-Pro tuono-with-tailwind % npm list
[email protected] /Users/regan/work/rust/tuono-with-tailwind
├── @tailwindcss/[email protected]
├── @types/[email protected]
├── @types/[email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
└── [email protected]

@sooboy
Copy link
Author

sooboy commented Feb 6, 2025

I have resolved the issue by following these steps:

‌Removing Dependencies‌:

I deleted the node_modules directory in my project to remove all installed dependencies.
‌Reinstalling Dependencies‌:

I executed the pnpm install command in the project directory to reinstall all dependencies.
‌Running the Project‌:

After the installation was complete, I tried running the project again using the tuono dev or tuono build command.
The project is now running successfully, and the Failed to read tuono.config.ts error message no longer appears.

@Valerioageno
Copy link
Member

Thanks for checking. It was indeed a broken dependencies installation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants