-
Notifications
You must be signed in to change notification settings - Fork 21
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
Dependency not found after npm install --save windows-1252 #7
Comments
Did you follow the README? https://github.com/mathiasbynens/windows-1252#installation The library is now shipped as a JavaScript module, so you have to |
Hmm, perhaps you were hitting this? e732af9 Please try with v3.0.1 and see if it works for you now. |
thank you, but no effect. npm 7.20.3 and node v16.6.0 on win 10 64. npm 7.10.0 and node v14.15.1 on macOS 11.2.1 too. |
Could you share more information? How can I reproduce this? |
I am using a Vue 3 - Vue.js https://v3.vuejs.org project, difficult to share, but does npm install --save windows-1252 and "import * as windows1252 from 'windows-1252'" work for you with my maximum versions of npm and node above? As I said, "main" does the job instead of the new npm-Syntax "exports", please see documentation of npm. |
I'm seeing the same issue, using v3.0.1 in my node project. npm: 6.13.4
And then |
Could you share a gist with a |
Hello Mathias, I have a similar problem with using your package in a web app build with rollup. Unfortunately I currently don't have a demo project to reproduce it either but some more information: having only 'exports' in your package.json leads to the rollup error:
rollup (actually @rollup/plugin-node-resolve) does not resolve the path and my app fails to load it. When I add either the 'main' field or the 'module' field to your package.json, it works. So it looks like rollup considers 'main' and 'module' but not 'exports' alone. I have not checked the specification yet but here is an issue that discusses main/module and gives me the impression that adding 'module' would be the correct way for ESM: nodejs/node#34027 I checked a few packages I use regularly as examples but with mixed results: Google LitElement uses this
D3 on the other hand has this:
web-animations has this:
But they all build with rollup successfully. |
Had to substitute "exports" with "main" in package.json
The text was updated successfully, but these errors were encountered: