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

Unexpected character '�' when generating build #15057

Open
arek125 opened this issue Sep 30, 2022 · 6 comments
Open

Unexpected character '�' when generating build #15057

arek125 opened this issue Sep 30, 2022 · 6 comments

Comments

@arek125
Copy link

arek125 commented Sep 30, 2022

Environment

  • Operating System: Windows_NT
  • Node Version: v16.17.0
  • Nuxt Version: 3.0.0-rc.11
  • Nitro Version: 0.5.4
  • Package Manager: npm@8.15.0
  • Builder: vite

Reproduction

I Tried to reproduce but looks like problem appears only in local windows 10

https://github.com/arek125/nuxt3-ant-sql

Describe the bug

Dev runs fine, but when tries to generate build:


1: MZ�♥♦���☺♫▼�♫�       �!�☺L�!This program cannot be run in DOS mode.
     ^
3�H��(H�%ÿ☺3�H��(�������������H�♣!H☻H�☺H�H�H�������������H�H�♣ED☻H��H☼E�����������������������������@SH�� H�♣�G☻H��H�☺��☺txt�☺►�☺♦ `.rdata^��☺��☺@@.datax▼�☻♫�☻@�.pdata�↓�☻→�☻@@.rsrc�☺�☻☻�☻@@.reloc�♠��☻@BH�   
3: �►�ҔH��H�� [������H�☺�������������@SH�� H�Q@H��H��►r-H�I(H��H��►r↑L�A�H��'I+�H�A�H��▼wMI���t�H�C8H�♣IG☻H�C@☼�C(H�♥H�S↑H��t↑�{ u


 ERROR  Unexpected character '�' (Note that you need plugins to import files that are not JavaScript)                                                                                                 09:14:51  

  at error (/C:/Users/agolen/Desktop/nuxt3/nuxt3-ant-sql/node_modules/rollup/dist/es/shared/rollup.js:1858:30)
  at Module.error (/C:/Users/agolen/Desktop/nuxt3/nuxt3-ant-sql/node_modules/rollup/dist/es/shared/rollup.js:12429:16)
  at Module.tryParse (/C:/Users/agolen/Desktop/nuxt3/nuxt3-ant-sql/node_modules/rollup/dist/es/shared/rollup.js:12806:25)
  at Module.setSource (/C:/Users/agolen/Desktop/nuxt3/nuxt3-ant-sql/node_modules/rollup/dist/es/shared/rollup.js:12711:24)
  at ModuleLoader.addModuleSource (/C:/Users/agolen/Desktop/nuxt3/nuxt3-ant-sql/node_modules/rollup/dist/es/shared/rollup.js:21959:20)

Additional context

No response

Logs

No response

@arek125
Copy link
Author

arek125 commented Nov 21, 2022

Argon2 is causing the issue, for now i'm switching to bcrypt.

@jeremycoder
Copy link

Just had the same problem

@danielroe danielroe added the 3.x label Jan 19, 2023
@danielroe danielroe transferred this issue from nuxt/framework Jan 19, 2023
@productdevbook
Copy link
Member

CleanShot 2024-01-13 at 20 23 33

nuxt 3.9.1 this problem

@productdevbook
Copy link
Member

pr

  1. cd packages/nuxt
  2. pnpm build

@productdevbook
Copy link
Member

paulmillr/chokidar#1202 (comment)

 rollupOptions: {
      external: ["fsevents"]
    }

and

  "pnpm": {
    "overrides": {
      "rollup": "^4.2.0"
    }
  },

@meirroth
Copy link

In case anyone else runs into this, I'm getting a similar error when running build on windows, not getting any error on Mac or Linux:

Expand to see full error.
[plugin inject] node_modules/@sentry/profiling-node/lib/sentry_cpu_profiler-linux-arm64-glibc-115.node: rollup-plugin-inject: failed to parse C:/.../nuxt/node_modules/@sentry/profiling-node/lib/sentry_cpu_profiler-linux-arm64-glibc-115.node. Consider restricting the plugin to particular files via options.include

[nitro 20:37:30] ERROR RollupError: node_modules/@sentry/profiling-node/lib/sentry_cpu_profiler-darwin-x64-93.node (1:0): Unexpected character '�' (Note that you need plugins to import files that are not JavaScript)

�♠��☺↓(☻__TEXT��♣♣♠__text...
^
2: ☺♀*►♀0↑☻♥�♦☺/usr/lib/libc++.1.dylib♀8↑☻▼♣☺/usr/lib/libSystem.B.dyl...
3: I�v►I��♠H��L��I���H�E�H�}��MM���M��H�E�toH��L��H��H�UUUUUUUUH!�L��H)�H�33333333H��H!�H��☻H!�H☺�H��H��♦H☺�H�...

[20:37:30] ERROR node_modules/@sentry/profiling-node/lib/sentry_cpu_profiler-darwin-x64-93.node (1:0): Unexpected character '�' (Note that you need plugins to import files that are not JavaScript)

at getRollupError (/C:/.../nuxt/node_modules/rollup/dist/es/shared/parseAst.js:394:41)
at ParseError.initialise (/C:/.../nuxt/node_modules/rollup/dist/es/shared/node-entry.js:11332:28)
at convertNode (/C:/.../nuxt/node_modules/rollup/dist/es/shared/node-entry.js:13082:10)
at convertProgram (/C:/.../nuxt/node_modules/rollup/dist/es/shared/node-entry.js:12399:12)
at Module.setSource (/C:/.../nuxt/node_modules/rollup/dist/es/shared/node-entry.js:14243:24)
at async ModuleLoader.addModuleSource (/C:/.../nuxt/node_modules/rollup/dist/es/shared/node-entry.js:18896:13)

[20:37:30] ERROR node_modules/@sentry/profiling-node/lib/sentry_cpu_profiler-darwin-x64-93.node (1:0): Unexpected character '�' (Note that you need plugins to import files that are not JavaScript)

We're using the Sentry recipe from https://github.com/manniL/nuxt3-sentry-recipe

@danielroe danielroe removed the 3.x label Jun 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants