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

Transform failed with 1 error: Unterminated string literal #35

Open
flora8984461 opened this issue Jul 11, 2022 · 3 comments
Open

Transform failed with 1 error: Unterminated string literal #35

flora8984461 opened this issue Jul 11, 2022 · 3 comments

Comments

@flora8984461
Copy link

Versions

  • originjs: 1.0.3
  • node: 16.14.2

Reproduction

https://stackblitz.com/edit/vitejs-vite-tsxtjf?file=vite.config.js,main.js

Uncomment the part in vite.config.js

Additional Details

Steps to reproduce

  1. Open the reproduction link above
  2. Uncomment the code part in vite.config.js
  3. Re-run the project by vite, the error shows in console log and page does not load anything

What is Expected?

Expect the transform to succeed and the project runs properly

What is actually happening?

There is transform error:

 Internal server error: Transform failed with 1 error:<stdin>:2140:54: ERROR: Unterminated string literal
  Plugin: originjs:commonjs
  File: /home/projects/vitejs-vite-tsxtjf/packages/counter/dist/esm/index.js
      at failureErrorWithLog (/home/projects/vitejs-vite-tsxtjf/node_modules/esbuild/lib/main.js:1605:15)
      at eval (/home/projects/vitejs-vite-tsxtjf/node_modules/esbuild/lib/main.js:1394:29)
      at eval (/home/projects/vitejs-vite-tsxtjf/node_modules/esbuild/lib/main.js:666:9)
      at handleIncomingPacket (/home/projects/vitejs-vite-tsxtjf/node_modules/esbuild/lib/main.js:763:9)
      at Socket.readFromStdout (/home/projects/vitejs-vite-tsxtjf/node_modules/esbuild/lib/main.js:632:7)
      at EventEmitter.emit (https://vitejs-vite-tsxtjf.w.staticblitz.com/blitz.bff91798029e1af88e01551d056a592b2882b9ac.js:6:155573)
      at addChunk (https://vitejs-vite-tsxtjf.w.staticblitz.com/blitz.bff91798029e1af88e01551d056a592b2882b9ac.js:6:656476)
      at readableAddChunk (https://vitejs-vite-tsxtjf.w.staticblitz.com/blitz.bff91798029e1af88e01551d056a592b2882b9ac.js:6:656180)
      at Readable.push (https://vitejs-vite-tsxtjf.w.staticblitz.com/blitz.bff91798029e1af88e01551d056a592b2882b9ac.js:6:656864)
      at _0x461419.onStreamRead [as onread] (https://vitejs-vite-tsxtjf.w.staticblitz.com/blitz.bff91798029e1af88e01551d056a592b2882b9ac.js:6:783977)

Thank you so much for the plugin. Any help is really appreciated.

@Andrei-Ivanov98
Copy link

Andrei-Ivanov98 commented Dec 5, 2022

@flora8984461 Have you managed to solve it after all?

@flora8984461
Copy link
Author

Hi @Andrei-Ivanov98 thank you for check in. I re-examined our project and managed to remove "isomorphic-fetch" package. I didn't use the plugin and do not have this issue now.

@walmon
Copy link

walmon commented Feb 25, 2023

I'm having this same issue, it doesn't even say in which line is the error to try and fix it. Any ideas if we can't just remove the package? My issue is happening with xlsx-populate

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

3 participants