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

Setting prefix to false or empty string gives error and tries importing false #273

Open
5 tasks done
spa5k opened this issue Mar 7, 2023 · 0 comments
Open
5 tasks done

Comments

@spa5k
Copy link
Contributor

spa5k commented Mar 7, 2023

Describe the bug

Unexpected token (Note that you need plugins to import files that are not JavaScript)
file: /home/spark/Codes/quran/tanzil/src/providers/app.tsx:10:7
 8: import { useEffect } from 'react';
 9: import { Spinner } from '/home/spark/Codes/quran/tanzil/src/components/Elements/Spinner/Spinner.tsx';
10: import false from '~icons/fa/lse.tsx';
           ^
11: const queryClient = new QueryClient();
12: export const AppProvider = () => {
error during build:
RollupError: Unexpected token (Note that you need plugins to import files that are not JavaScript)
    at error (file:///home/spark/Codes/quran/node_modules/.pnpm/rollup@3.10.1/node_modules/rollup/dist/es/shared/rollup.js:2041:30)
    at Module.error (file:///home/spark/Codes/quran/node_modules/.pnpm/rollup@3.10.1/node_modules/rollup/dist/es/shared/rollup.js:13062:16)
    at Module.tryParse (file:///home/spark/Codes/quran/node_modules/.pnpm/rollup@3.10.1/node_modules/rollup/dist/es/shared/rollup.js:13737:25)
    at Module.setSource (file:///home/spark/Codes/quran/node_modules/.pnpm/rollup@3.10.1/node_modules/rollup/dist/es/shared/rollup.js:13347:39)
    at ModuleLoader.addModuleSource (file:///home/spark/Codes/quran/node_modules/.pnpm/rollup@3.10.1/node_modules/rollup/dist/es/shared/rollup.js:22929:20)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
/home/spark/Codes/quran/tanzil:
 ERR_PNPM_RECURSIVE_RUN_FIRST_FAIL  tanzil-react@0.0.0 build: `vite build`
Exit status 1
 ELIFECYCLE  Command failed with exit code 1.

Works well if there is some prefix

Reproduction

https://github.com/spa5k/quran

For the reproduction of issue, please clone the repo, and in tanzil/vite.config.ts change IconResolver settings to have prefix to false, or empty string.

System Info

System:
    OS: Linux 5.15 Arch Linux
    CPU: (16) x64 11th Gen Intel(R) Core(TM) i7-11800H @ 2.30GHz
    Memory: 4.58 GB / 7.64 GB
    Container: Yes
    Shell: 5.9 - /opt/distrod/alias/usr/bin/zsh
  Binaries:
    Node: 19.7.0 - ~/.nvm/versions/node/v19.7.0/bin/node
    npm: 9.5.0 - ~/.nvm/versions/node/v19.7.0/bin/npm

Used Package Manager

pnpm

Validations

  • Follow our Code of Conduct
  • Read the Contributing Guide.
  • Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
  • Check that this is a concrete bug. For Q&A, please open a GitHub Discussion instead.
  • The provided reproduction is a minimal reproducible of the bug.
@spa5k spa5k changed the title Setting prefix to false or empty string gives result Setting prefix to false or empty string gives error and tries importing false Mar 7, 2023
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

1 participant