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

Building Issues with Packagers (@zeit/ncc & parcel) & Node v8.10 #295

Closed
j opened this issue Mar 29, 2019 · 3 comments
Closed

Building Issues with Packagers (@zeit/ncc & parcel) & Node v8.10 #295

j opened this issue Mar 29, 2019 · 3 comments
Labels
Question ❔ Not future request, proposal or bug issue Solved ✔️ The issue has been solved

Comments

@j
Copy link
Contributor

j commented Mar 29, 2019

I'm trying to switch internal apps to monorepositories and it's best to build deployables using packagers like @zeit/ncc, parcel, webpack, etc, but when doing so, default options blip out.

async function* asyncIterator() {
              ^

SyntaxError: Unexpected token *
    at createScript (vm.js:80:10)
    at Object.runInThisContext (vm.js:139:10)
    at Module._compile (module.js:616:28)
    at Object.Module._extensions..js (module.js:663:10)
    at Module.load (module.js:565:32)
    at tryModuleLoad (module.js:505:12)
    at Function.Module._load (module.js:497:3)
    at Function.Module.runMain (module.js:693:10)
    at startup (bootstrap_node.js:188:16)
    at bootstrap_node.js:609:3

This output was created from calling type-graphql built with both zeit and parcel due to incompatibility with lambda's node versions.

What package would cause this?

@MichalLytek
Copy link
Owner

What package would cause this?

I have no idea. Maybe you have wrong target set for Node v8 that doesn't fully support generators yet?

You can bundle your app using TypeGraphQL with webpack, many people are doing this - see #289 as an example.

@MichalLytek MichalLytek added Question ❔ Not future request, proposal or bug issue Need More Info 🤷‍♂️ Further information is requested labels Mar 29, 2019
@j
Copy link
Contributor Author

j commented Mar 31, 2019

That example is working because they are using node externals which excludes externals and I’m assuming they aren’t using web sockets so the files in issue aren’t being required. ncc/parcel is pulling them all into one file so that’s why it’s freaking out. I’m gonna try to get the compiler to ignore the websocket packages and see if it compiles this week.

@j
Copy link
Contributor Author

j commented Mar 31, 2019

And I’m not trying to exclude modules and package them myself because I’m using monorepos, so it’s easier to have a bundled do it for me.

@j j closed this as completed Apr 23, 2019
@MichalLytek MichalLytek added Solved ✔️ The issue has been solved and removed Need More Info 🤷‍♂️ Further information is requested labels Apr 23, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Question ❔ Not future request, proposal or bug issue Solved ✔️ The issue has been solved
Projects
None yet
Development

No branches or pull requests

2 participants