FredKSchott / snowpack

ESM-powered frontend build tool. Instant, lightweight, unbundled development. ✌️
https://www.snowpack.dev
MIT License
19.48k stars 922 forks source link

🐛 BUG: #3818

Open GabrielPedroza opened 2 years ago

GabrielPedroza commented 2 years ago

Quick checklist

What package manager are you using?

npm

What operating system are you using?

mac

Describe the bug

Getting a unscannable package import.

react-is: Unscannable package import found. Snowpack scans source files for package imports at startup, and on every change. But, sometimes an import gets added during the build process, invisible to our file scanner. We'll prepare this package for you now, but should add "react-is" to "knownEntrypoints" in your config file so that this gets prepared with the rest of your imports during startup.

Steps to reproduce

  1. npx create-snowpack-app using template
  2. ...
  3. ...
  4. ...
  5. Error! Describe what went wrong (and what was expected instead)...

Link to minimal reproducible example (optional)

No response

PeterlitsZo commented 2 years ago

Same. I set the packageOptions.knownEntrypoints as ['react-is'] in file snowpack.config.mjs, but not work.

Then I just use yarn add react-is then it run well. I do not what happen, but I do not want to put my dependence's dependence in my package.json. Please help.

sebastienbarre commented 2 years ago

Same here, but not even yarn add react-is helped...

If only there was a flag to at least silence that warning, it's a bit much, I mean, one warning OK, but 4?

yarn start                                                                                             
yarn run v1.22.17
$ snowpack dev
[21:21:21] [snowpack] Ready!
[21:21:21] [snowpack] Server started in 11ms.
[21:21:21] [snowpack] Local: http://localhost:8080
[21:21:21] [snowpack] Network: http://192.168.1.7:8080
[21:21:22] [snowpack] react-is: Unscannable package import found.
Snowpack scans source files for package imports at startup, and on every change.
But, sometimes an import gets added during the build process, invisible to our file scanner.
We'll prepare this package for you now, but should add "react-is" to "knownEntrypoints"
in your config file so that this gets prepared with the rest of your imports during startup.
[21:21:22] [snowpack] + react-is@16.13.1
[21:21:22] [snowpack] react-is: Unscannable package import found.
Snowpack scans source files for package imports at startup, and on every change.
But, sometimes an import gets added during the build process, invisible to our file scanner.
We'll prepare this package for you now, but should add "react-is" to "knownEntrypoints"
in your config file so that this gets prepared with the rest of your imports during startup.
[21:21:22] [snowpack] + react-is@16.13.1
[21:21:22] [snowpack] react-is: Unscannable package import found.
Snowpack scans source files for package imports at startup, and on every change.
But, sometimes an import gets added during the build process, invisible to our file scanner.
We'll prepare this package for you now, but should add "react-is" to "knownEntrypoints"
in your config file so that this gets prepared with the rest of your imports during startup.
[21:21:22] [snowpack] + react-is@16.13.1
[21:21:22] [snowpack] react-is: Unscannable package import found.
Snowpack scans source files for package imports at startup, and on every change.
But, sometimes an import gets added during the build process, invisible to our file scanner.
We'll prepare this package for you now, but should add "react-is" to "knownEntrypoints"
in your config file so that this gets prepared with the rest of your imports during startup.
[21:21:22] [snowpack] + react-is@16.13.1
GabrielPedroza commented 2 years ago

I genuinely don't remember what I did to fix it because it was months ago that I had this but since my project was relatively small, I just deleted the entire project and restarted. I just carefully wrote everything and I didn't have the issue anymore for some odd reason.