cmgriffing / scully-image

An image placeholder and lazy loading plugin for Scully.
https://scully-image.github.io
17 stars 1 forks source link

Error...cannot build #36

Closed emekaelo closed 2 years ago

emekaelo commented 2 years ago

when I run `npx scully, I get this error.


We encountered an error executing the config file. ".\scully.brunoelo.config.ts" Check the error below, and try again later

Error [ERR_PACKAGE_PATH_NOT_EXPORTED]: Package subpath './plugin' is not defined by "exports" in C:\Users\\Documents\BE\projects\brunoelo\node_modules\scully-image\package.json at throwExportsNotFound (internal/modules/esm/resolve.js:285:9) at packageExportsResolve (internal/modules/esm/resolve.js:508:3) at resolveExports (internal/modules/cjs/loader.js:450:36) at Function.Module._findPath (internal/modules/cjs/loader.js:490:31) at Function.Module._resolveFilename (internal/modules/cjs/loader.js:888:27) at Function.Module._load (internal/modules/cjs/loader.js:746:27) at Module.require (internal/modules/cjs/loader.js:974:19) at require (internal/modules/cjs/helpers.js:92:18) at Object. (C:\Users\\Documents\BE\projects\brunoelo\scully.brunoelo.config.js:7:27) at Module._compile (internal/modules/cjs/loader.js:1085:14) { code: 'ERR_PACKAGE_PATH_NOT_EXPORTED' }

cmgriffing commented 2 years ago

Sorry. Scully went through a major rewrite. This is not yet supporting those changes.

I will look at this when I get a chance.

cmgriffing commented 2 years ago

Ok, after digging into it, I believe this was actually related to a newer NPM version requiring the exports be explicitly called out in the package.json.

So try again with version 0.1.3.

I have only tested with the Puppeteer based renderer for now though. I will get to work on the Scully platform server and Playwright versions soon.

EDIT: I fixed some other issues and the latest version is now 0.3.0

emekaelo commented 2 years ago

Thanks a lot. So far, it worked the first time when I placed the <scully-blur-image> component in my template and ran the angular and scully build but didn't work after subsequent builds. Also, where I need to use this plugin is the images coming from the markdown file which is where I structure posts. Is there a demo of how to use this plugin in the markdown file? Another thing is adding the plugin to the scully config file. The demo shows doing it with require. Is it possible for the library to follow import method for homogeneity as imports is what the scully config file was bootstrapped with. Thank you. Here is what it shows when I inspect the element scully-Image

Also, my Angular version is 13.3

cmgriffing commented 2 years ago

Good feedback.

Could we maybe get some of these things as new issues?

I want to make sure we don't lose track of them and I also want to have separate issues to resolve via PRs.

cmgriffing commented 2 years ago

Thanks again for creating the separate issues. I am going to close this one now that those exist. Feel free to create more issues if needed.