yastpack icon indicating copy to clipboard operation
yastpack copied to clipboard

template not build production code

Open mcdba opened this issue 4 years ago • 3 comments

npm run build generate errors

[Routify] Generated routes in 1 ms (node:517594) UnhandledPromiseRejectionWarning: Error: ENOENT: no such file or directory, open '/home/kmb/dev/yastpack/dist/build/bundle.js' at Object.openSync (fs.js:462:3) at Object.readFileSync (fs.js:364:35) at exporter (/home/kmb/dev/yastpack/node_modules/.pnpm/@roxi/[email protected]/node_modules/@roxi/routify/lib/services/exporter.js:13:23) at Command.<anonymous> (/home/kmb/dev/yastpack/node_modules/.pnpm/@roxi/[email protected]/node_modules/@roxi/routify/plugins/cli.js:78:5) at Command.listener [as _actionHandler] (/home/kmb/dev/yastpack/node_modules/.pnpm/[email protected]/node_modules/commander/index.js:907:31) at Command._parseCommand (/home/kmb/dev/yastpack/node_modules/.pnpm/[email protected]/node_modules/commander/index.js:1491:14) at Command._dispatchSubcommand (/home/kmb/dev/yastpack/node_modules/.pnpm/[email protected]/node_modules/commander/index.js:1436:18) at Command._parseCommand (/home/kmb/dev/yastpack/node_modules/.pnpm/[email protected]/node_modules/commander/index.js:1453:12) at Command.parse (/home/kmb/dev/yastpack/node_modules/.pnpm/[email protected]/node_modules/commander/index.js:1283:10) at Object.<anonymous> (/home/kmb/dev/yastpack/node_modules/.pnpm/@roxi/[email protected]/node_modules/@roxi/routify/plugins/cli.js:82:9) (node:517594) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag --unhandled-rejections=strict(see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1) (node:517594) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code. [snowpack] ! building source files...

also test need fix App.test.js find text not present in template

mcdba avatar Feb 11 '21 16:02 mcdba

Although it shows errors, the build works, at least for me. Can you check if your build still works?

Anyway, I'll check what's going on with that...

rodabt avatar Feb 12 '21 01:02 rodabt

node v15.5.0 `npm run build

build routify -b && routify export && snowpack build

[Routify] Generated routes in 0 ms node:fs:495 handleErrorFromBinding(ctx); ^

Error: ENOENT: no such file or directory, open '/Users/kmb/dev/yastpack/dist/build/bundle.js' at Object.openSync (node:fs:495:3) at Object.readFileSync (node:fs:396:35) at exporter (/Users/kmb/dev/yastpack/node_modules/@roxi/routify/lib/services/exporter.js:13:23) at Command. (/Users/kmb/dev/yastpack/node_modules/@roxi/routify/plugins/cli.js:78:5) at Command.listener [as _actionHandler] (/Users/kmb/dev/yastpack/node_modules/commander/index.js:907:31) at Command._parseCommand (/Users/kmb/dev/yastpack/node_modules/commander/index.js:1491:14) at Command._dispatchSubcommand (/Users/kmb/dev/yastpack/node_modules/commander/index.js:1436:18) at Command._parseCommand (/Users/kmb/dev/yastpack/node_modules/commander/index.js:1453:12) at Command.parse (/Users/kmb/dev/yastpack/node_modules/commander/index.js:1283:10) at Object. (/Users/kmb/dev/yastpack/node_modules/@roxi/routify/plugins/cli.js:82:9) { errno: -2, syscall: 'open', code: 'ENOENT', path: '/Users/kmb/dev/yastpack/dist/build/bundle.js' } npm ERR! code 1 npm ERR! path /Users/kmb/dev/yastpack npm ERR! command failed npm ERR! command sh -c routify -b && routify export && snowpack build

npm ERR! A complete log of this run can be found in:`

mcdba avatar Feb 12 '21 09:02 mcdba

Routify's export function will soon be deprecated in favor of spank. https://github.com/roxiness/routify/issues/267

mcdba avatar Feb 12 '21 09:02 mcdba