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

When trying to build with snowpack this error is thrown #67

Closed
trancephorm opened this issue Feb 14, 2022 · 4 comments
Closed

When trying to build with snowpack this error is thrown #67

trancephorm opened this issue Feb 14, 2022 · 4 comments

Comments

@trancephorm
Copy link

[21:51:17] [snowpack] Build Result Error: There was a problem with a file build result.
[21:51:17] [snowpack] Parse error @:13:78
[21:51:17] [snowpack] Error: Parse error @:13:78
at parse (/home/pyc/ttwww/node_modules/es-module-lexer/dist/lexer.cjs:1:402)

Is there any help to it?

@guybedford
Copy link
Collaborator

If snowpack is using this project, one thing that would help the error message is to pass the second argument as the file name where they are calling into es-module-lexer. Then the @ in the above message would be the filename causing the parse issue, allowing seeing what character is failing the parse. It may well be JSX or TypeScript syntax causing it though. I'd suggest posting an issue on the relevant repo directly for more information.

@trancephorm
Copy link
Author

Thanks for your reply. I'm pretty new to this so I don't know where exactly that second argument should be passed.
is that somewhere around here?

$ grep es-module-lexer * -R
node_modules/snowpack/lib/esm/scan-imports.js:import { init as initESModuleLexer, parse } from 'es-module-lexer';
node_modules/snowpack/lib/esm/rewrite-imports.js:const { parse } = require('es-module-lexer');
node_modules/snowpack/lib/esm/lexer-util.js: * Adopted from https://github.com/guybedford/es-module-lexer
node_modules/snowpack/lib/esm/scan-imports.d.ts:import { ImportSpecifier } from 'es-module-lexer';
node_modules/snowpack/lib/cjs/scan-imports.js:const es_module_lexer_1 = require("es-module-lexer");
node_modules/snowpack/lib/cjs/rewrite-imports.js:const { parse } = require('es-module-lexer');
node_modules/snowpack/lib/cjs/lexer-util.js: * Adopted from https://github.com/guybedford/es-module-lexer
node_modules/snowpack/lib/cjs/scan-imports.d.ts:import { ImportSpecifier } from 'es-module-lexer';

@guybedford
Copy link
Collaborator

@trancephorm yes it's the second argument to that parse function that is imported.

@trancephorm
Copy link
Author

I'll be honest: I don't have a clue what to do. :) But it doesn't matter, thanks anyways.

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

No branches or pull requests

2 participants