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] Unable to initiate a project #2375

Closed
afkcodes opened this issue Jul 11, 2023 · 5 comments · Fixed by tsedio/tsed-cli#336
Closed

[BUG] Unable to initiate a project #2375

afkcodes opened this issue Jul 11, 2023 · 5 comments · Fixed by tsedio/tsed-cli#336
Assignees
Labels

Comments

@afkcodes
Copy link

I tried tsed init . and every time i did it failed while running barrels.

Log

/Users/ashishkumar/n/lib/node_modules/@tsed/cli/node_modules/execa/lib/error.js:60
		error = new Error(message);
		        ^

Error: Command failed with exit code 1: yarn run barrels
warning package.json: No license field
node:fs:1452
  handleErrorFromBinding(ctx);
  ^

Error: ENOENT: no such file or directory, scandir '/Users/ashishkumar/backend/tsed_check/src/pages'
    at Object.readdirSync (node:fs:1452:3)
    at buildTree (/Users/ashishkumar/backend/tsed_check/node_modules/barrelsby/bin/fileTree.js:13:32)
    at /Users/ashishkumar/backend/tsed_check/node_modules/barrelsby/bin/index.js:46:51
    at Generator.next (<anonymous>)
    at /Users/ashishkumar/backend/tsed_check/node_modules/barrelsby/bin/index.js:9:71
    at new Promise (<anonymous>)
    at __awaiter (/Users/ashishkumar/backend/tsed_check/node_modules/barrelsby/bin/index.js:5:12)
    at /Users/ashishkumar/backend/tsed_check/node_modules/barrelsby/bin/index.js:43:60
    at Array.forEach (<anonymous>)
    at Barrelsby (/Users/ashishkumar/backend/tsed_check/node_modules/barrelsby/bin/index.js:43:25) {
  errno: -2,
  syscall: 'scandir',
  code: 'ENOENT',
  path: '/Users/ashishkumar/backend/tsed_check/src/pages'
}

Node.js v18.16.1
error Command failed with exit code 1.
yarn run v1.22.19
$ barrelsby --config .barrelsby.json
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
    at makeError (/Users/ashishkumar/n/lib/node_modules/@tsed/cli/node_modules/execa/lib/error.js:60:11)
    at handlePromise (/Users/ashishkumar/n/lib/node_modules/@tsed/cli/node_modules/execa/index.js:118:26)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {
  shortMessage: 'Command failed with exit code 1: yarn run barrels',
  command: 'yarn run barrels',
  escapedCommand: 'yarn run barrels',
  exitCode: 1,
  signal: undefined,
  signalDescription: undefined,
  stdout: 'yarn run v1.22.19\n' +
    '$ barrelsby --config .barrelsby.json\n' +
    'info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.',
  stderr: 'warning package.json: No license field\n' +
    'node:fs:1452\n' +
    '  handleErrorFromBinding(ctx);\n' +
    '  ^\n' +
    '\n' +
    "Error: ENOENT: no such file or directory, scandir '/Users/ashishkumar/backend/tsed_check/src/pages'\n" +
    '    at Object.readdirSync (node:fs:1452:3)\n' +
    '    at buildTree (/Users/ashishkumar/backend/tsed_check/node_modules/barrelsby/bin/fileTree.js:13:32)\n' +
    '    at /Users/ashishkumar/backend/tsed_check/node_modules/barrelsby/bin/index.js:46:51\n' +
    '    at Generator.next (<anonymous>)\n' +
    '    at /Users/ashishkumar/backend/tsed_check/node_modules/barrelsby/bin/index.js:9:71\n' +
    '    at new Promise (<anonymous>)\n' +
    '    at __awaiter (/Users/ashishkumar/backend/tsed_check/node_modules/barrelsby/bin/index.js:5:12)\n' +
    '    at /Users/ashishkumar/backend/tsed_check/node_modules/barrelsby/bin/index.js:43:60\n' +
    '    at Array.forEach (<anonymous>)\n' +
    '    at Barrelsby (/Users/ashishkumar/backend/tsed_check/node_modules/barrelsby/bin/index.js:43:25) {\n' +
    '  errno: -2,\n' +
    "  syscall: 'scandir',\n" +
    "  code: 'ENOENT',\n" +
    "  path: '/Users/ashishkumar/backend/tsed_check/src/pages'\n" +
    '}\n' +
    '\n' +
    'Node.js v18.16.1\n' +
    'error Command failed with exit code 1.',
  failed: true,
  timedOut: false,
  isCanceled: false,
  killed: false
}
@Romakita
Copy link
Collaborator

Hello @afkcodes
Can you give me the selected options please.

To solve issue you can edit the barrels.json and find tha glob pattern that cause the issue!

See you
Romain

@afkcodes
Copy link
Author

sure :
Screenshot 2023-07-12 at 12 49 45 AM

@Romakita
Copy link
Collaborator

Ok the project seems to be generated. The typo is on barrelsby.json ^^
I'll try to fix it
See you

@github-actions
Copy link

🎉 Are you happy?

If you appreciated the support, know that it is free and is carried out on personal time ;)

A support, even a little bit makes a difference for me and continues to bring you answers!

github opencollective

@Romakita
Copy link
Collaborator

Fixed :D

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

Successfully merging a pull request may close this issue.

2 participants