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

build: dev-build doesn't work #520

Closed
FeelyChau opened this issue Aug 27, 2020 · 4 comments
Closed

build: dev-build doesn't work #520

FeelyChau opened this issue Aug 27, 2020 · 4 comments
Assignees
Labels
bug Something isn't working build CI/CD, and build stuffs

Comments

@FeelyChau
Copy link
Collaborator

It's not work for me.
After npm run dev-build, I got an error as:

$ node ./packages/daemon/bootstrap.js
ERROR: Error reading "dist/config/config.js". Error: SyntaxError: Cannot use import statement outside a module
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! @pipcook/daemon@1.1.2 migration: `sequelize-cli db:migrate`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the @pipcook/daemon@1.1.2 migration script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /path/to/.npm/_logs/2020-08-27T16_17_29_953Z-debug.log
(node:16127) UnhandledPromiseRejectionWarning: Error: Command failed: npm run migration
ERROR: Error reading "dist/config/config.js". Error: SyntaxError: Cannot use import statement outside a module
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! @pipcook/daemon@1.1.2 migration: `sequelize-cli db:migrate`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the @pipcook/daemon@1.1.2 migration script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /path/to/.npm/_logs/2020-08-27T16_17_29_953Z-debug.log

    at checkExecSyncError (child_process.js:630:11)
    at execSync (child_process.js:666:15)
    at bootstrap (/path/to/pipcook/packages/daemon/bootstrap.js:48:17)
    at Object.<anonymous> (/path/to/pipcook/packages/daemon/bootstrap.js:97:3)
    at Module._compile (internal/modules/cjs/loader.js:1138:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1158:10)
    at Module.load (internal/modules/cjs/loader.js:986:32)
    at Function.Module._load (internal/modules/cjs/loader.js:879:14)
    at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:71:12)
    at internal/main/run_main_module.js:17:47
(node:16127) 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:16127) [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.
@FeelyChau FeelyChau added the build CI/CD, and build stuffs label Aug 27, 2020
@WenheLI
Copy link
Collaborator

WenheLI commented Aug 28, 2020

This is because esbuild only supports esm output for non-bundle building. I am working on a cjs output solution now.

@yorkie yorkie added the bug Something isn't working label Aug 28, 2020
@yorkie
Copy link
Member

yorkie commented Aug 29, 2020

@FeelyChau the title of an issue should be in this way: [moduleA, moduleB, ...]: description.

@yorkie yorkie changed the title dev-build doesn't work build: dev-build doesn't work Aug 29, 2020
@yorkie
Copy link
Member

yorkie commented Aug 29, 2020

This is because esbuild only supports esm output for non-bundle building. I am working on a cjs output solution now.

We should maintain the esbuild can work on Pipcook absolutely, and we need a workflow to ensure that's working always.

@WenheLI
Copy link
Collaborator

WenheLI commented Sep 10, 2020

Closed by #562

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

No branches or pull requests

3 participants