-
Notifications
You must be signed in to change notification settings - Fork 292
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
fast-glob fails with SyntaxError: Unexpected token from relocate-loader #438
Comments
Thanks! I was able to reproduce this issue. |
I recently struggled with this same error trying to build fast-glob with browserify. Using the |
Fixed in 0.20.4 via #448. |
@guybedford @styfle I still face the same issue with version 0.20.4 but not sure which dependency is causing it 2019-07-16T10:24:54.555Z Error: Module build failed (from /tmp/6f7bd075/.build-utils/.builder/node_modules/@zeit/ncc/dist/ncc/loaders/relocate-loader.js):
SyntaxError: Unexpected token (16:10)
at Object.re.raise (evalmachine.<anonymous>:1:266416)
at Object.z.unexpected (evalmachine.<anonymous>:1:222693)
at Object.ee.parseIdent (evalmachine.<anonymous>:1:265599)
at Object.parseIdent (evalmachine.<anonymous>:1:461728)
at Object.parseIdent (evalmachine.<anonymous>:1:186548)
at Object.ee.parsePropertyName (evalmachine.<anonymous>:1:261995)
at Object.parsePropertyName (evalmachine.<anonymous>:1:4333)
at Object.H.parseClassElement (evalmachine.<anonymous>:1:236905)
at Object.parseClassElement (evalmachine.<anonymous>:1:459918)
at Object.parseClassElement (evalmachine.<anonymous>:1:183081)
Module build failed (from /tmp/6f7bd075/.build-utils/.builder/node_modules/@zeit/ncc/dist/ncc/loaders/relocate-loader.js):
SyntaxError: Unexpected token (15:10)
at Object.re.raise (evalmachine.<anonymous>:1:266416)
at Object.z.unexpected (evalmachine.<anonymous>:1:222693)
at Object.ee.parseIdent (evalmachine.<anonymous>:1:265599)
at Object.parseIdent (evalmachine.<anonymous>:1:461728)
at Object.parseIdent (evalmachine.<anonymous>:1:186548)
at Object.ee.parsePropertyName (evalmachine.<anonymous>:1:261995)
at Object.parsePropertyName (evalmachine.<anonymous>:1:4333)
at Object.H.parseClassElement (evalmachine.<anonymous>:1:236905)
at Object.parseClassElement (evalmachine.<anonymous>:1:459918)
at Object.parseClassElement (evalmachine.<anonymous>:1:183081)
at compiler.close.n (evalmachine.<anonymous>:3:1350338)
at _promise0.then._result0 (eval at create (evalmachine.<anonymous>:1:349386), <anonymous>:13:1)
at <anonymous> how can i debug this? |
My issue was that the deployment environment was still using the old version of ncc but not sure how to upgrade it to 0.20.4 |
If you're using ZEIT Now, you can try the latest builder |
@styfle it's building correctly after i tried canary but i am facing the following issue when trying to access the deployment URL 2019-07-16T16:07:02.708Z 8f2fbb84-5482-48bc-bd92-aeae76e8e330 Cannot find module '@nodelib/fs.stat'
2019-07-16T16:07:02.708Z 8f2fbb84-5482-48bc-bd92-aeae76e8e330 Did you forget to add it to "dependencies" in `package.json`? |
@gimyboya Are you using yarn workspaces? There is a known bug we are working on with symlinks. |
Oh right, I am. |
You can try referencing the path directly (probably Follow this PR which will probably be fixed today or tomorrow https://github.com/zeit/now-builders/pull/765 |
Found syntax error when bundling
fast-glob
:Repro:
git clone https://gist.github.com/7f5cb8d054337c0b1a8217501305514f.git ncc-bug cd ncc-bug npm i npx ncc build input.js
logs:
The text was updated successfully, but these errors were encountered: