Comments (8)
Sorry for the noise!
Don't be afraid to spam me if anything else comes up! And thanks for trying the RC and querying/reporting problems. Feedback on the release notes is also welcome if you think the issue was the wording.
from svgo.
For example:
Could not resolve import "svgo/dist/svgo.browser.js" in C:\Users\xmr\Desktop\svgomg\src\js\svgo-worker\index.js using exports defined in C:\Users\xmr\Desktop\svgomg\node_modules\svgo\package.json.
[08:01:06] Finished 'bound js' after 301 ms
[08:01:06] Finished 'bound js' after 465 ms
Could not resolve import "svgo/dist/svgo.browser.js" in C:\Users\xmr\Desktop\svgomg\src\js\svgo-worker\index.js using exports defined in C:\Users\xmr\Desktop\svgomg\node_modules\svgo\package.json.
'svgo/dist/svgo.browser.js' is imported by src/js/svgo-worker/index.js, but could not be resolved – treating it as an external dependency
No name was provided for external module 'svgo/dist/svgo.browser.js' in output.globals – guessing 'svgo_browser_js'
I can change the imports but this means that the changes in v3.3.0 are indeed breaking. :/
from svgo.
@SethFalco I just tried 4.0.0-rc here: jakearchibald/svgomg@b2cdb05
And it seems it doesn't work:
C:\Users\xmr\Desktop\svgomg>npm i [email protected] -D
npm WARN deprecated [email protected]: See https://github.com/lydell/source-map-url#deprecated
npm WARN deprecated [email protected]: Please see https://github.com/lydell/urix#deprecated
npm WARN deprecated [email protected]: https://github.com/lydell/resolve-url#deprecated
npm WARN deprecated [email protected]: See https://github.com/lydell/source-map-resolve#deprecated
npm WARN deprecated [email protected]: Chokidar 2 does not receive security updates since 2019. Upgrade to chokidar 3 with 15x fewer dependencies
added 982 packages, and audited 1032 packages in 33s
163 packages are looking for funding
run `npm fund` for details
17 vulnerabilities (1 low, 5 moderate, 10 high, 1 critical)
To address issues that do not require attention, run:
npm audit fix
To address all issues possible (including breaking changes), run:
npm audit fix --force
Some issues need review, and may require choosing
a different dependency.
Run `npm audit` for details.
C:\Users\xmr\Desktop\svgomg>npm run dev
> [email protected] dev
> gulp dev
Error [ERR_PACKAGE_PATH_NOT_EXPORTED]: Package subpath './package.json' is not defined by "exports" in C:\Users\xmr\Desktop\svgomg\node_modules\svgo\package.json
at exportsNotFound (node:internal/modules/esm/resolve:303:10)
at packageExportsResolve (node:internal/modules/esm/resolve:650:9)
at resolveExports (node:internal/modules/cjs/loader:591:36)
at Module._findPath (node:internal/modules/cjs/loader:668:31)
at Module._resolveFilename (node:internal/modules/cjs/loader:1130:27)
at Module._load (node:internal/modules/cjs/loader:985:27)
at Module.require (node:internal/modules/cjs/loader:1235:19)
at require (node:internal/modules/helpers:176:18)
at Object.<anonymous> (C:\Users\xmr\Desktop\svgomg\gulpfile.js:5:35)
at Module._compile (node:internal/modules/cjs/loader:1376:14) {
code: 'ERR_PACKAGE_PATH_NOT_EXPORTED'
}
Did I miss something or something else is broken?
Thanks!
from svgo.
We don't export out package.json
!
SVGOMG only used it for the version I believe, so you can do, which is the reason I added it:
const { VERSION } = require('svgo');
PS: A while back I opened a PR to update SVGO there too, but closed it later. In case it's helpful to you, these were the changes I proposed:
from svgo.
Damn it, I misread the migration notes :)
So, this works jakearchibald/svgomg@2c5835c
Sorry for the noise!
from svgo.
I don't follow the repos I have push rights so unless I'm CC'ed I won't see any issue :)
I'm keeping the xmr-dev branch for now since I have other PRs pending, but I left them as is after reading the new plans.
from svgo.
One thing I notice is the lack of extension in the browser export. Not a huge deal, but I prefer always adding an extension (plus xo errors by default for such cases).
Your call though :)
from svgo.
(plus xo errors by default for such cases)
Sorry, could you clarify what this means?
from svgo.
Related Issues (20)
- [cleanupIDs] symbol is incorrectly removed when its ID is *NOT* used by URL-encoded reference
- Missing a ';' after converting svg with png;base64 HOT 1
- SVGO 3.3.0 stopped working in the AWS environment with Node.js 20 HOT 2
- Version 3.3.0 break commonjs exports
- Package.exports types file specification missing HOT 2
- Unable to install [email protected] HOT 3
- Option to resize SVGs to custom dimesnions HOT 4
- Remove consecutive points in linear path string if they have zero length or direction does not change HOT 1
- 'Cannot read properties of undefined' error in reflectPoint
- An idea to round/rewrite elements with gradient
- v4.0 rc - import plugin utils, e.g xast.js HOT 4
- Mask colors are changed when using convertColors and currentColor: true
- RFC: Defining a General Preset for SVG Sprites
- Paths won't merge HOT 1
- Feature Request: Add Option to Remove Invisible Items HOT 1
- Multiple issues with styles / css HOT 1
- --datauri 'unenc' add 'data:image/svg+xml,data:image/svg+xml,'
- Error: Unmatched selector: % HOT 3
- [FEATURE REQUEST]: Option to hide SVGs that were optimised by 0%
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from svgo.