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

Package subpath './lib/crc32' is not defined by "exports" #153

Closed
vandelpavel opened this issue Jan 24, 2022 · 1 comment
Closed

Package subpath './lib/crc32' is not defined by "exports" #153

vandelpavel opened this issue Jan 24, 2022 · 1 comment
Labels
bug Something isn't working

Comments

@vandelpavel
Copy link

Just created a new project and created and forked your project.
Then inside your project i'v launched:

yarn link
yarn

Then in my project:

yarn link quasar-app-extension-ssg
quasar ext invoke ssg
yarn build:ssg

Then i get this error:

yarn run v1.22.10
$ quasar ssg generate
 App • Looking for Quasar App Extension "ssg" command "generate"
 App • Running "ssg" Quasar App Extension...
 App • Running "ssg" > "generate" command

(node:94981) UnhandledPromiseRejectionWarning:   Error: Package subpath './lib/crc32' is not defined by "exports" in /media/avandelli/DataShared_NTFS/projects/quasar-app-extension-ssg/node_modules/crc/package.json
  
  - resolve.js:285 throwExportsNotFound
    internal/modules/esm/resolve.js:285:9
  
  - resolve.js:508 packageExportsResolve
    internal/modules/esm/resolve.js:508:3
  
  - loader.js:424 resolveExports
    internal/modules/cjs/loader.js:424:36
  
  - loader.js:464 Function.Module._findPath
    internal/modules/cjs/loader.js:464:31
  
  - loader.js:802 Function.Module._resolveFilename
    internal/modules/cjs/loader.js:802:27
  
  - loader.js:667 Function.Module._load
    internal/modules/cjs/loader.js:667:27
  
  - loader.js:887 Module.require
    internal/modules/cjs/loader.js:887:19
  
  - helpers.js:74 require
    internal/modules/cjs/helpers.js:74:18
  
  - snapshot.js:1 Object.<anonymous>
  -
    /media/avandelli/DataShared_NTFS/projects/quasar-app-extension-ssg/src/build/snapshot.js:1:15
  
  - loader.js:999 Module._compile
    internal/modules/cjs/loader.js:999:30
  

(node:94981) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:94981) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
Done in 0.44s.

While adding the this AE using quasar ext add ssg works.

@freddy38510
Copy link
Owner

Hi @vandelpavel,

Thanks for creating this issue.

The update of the dependency crc from v4.0.0 to v4.1.0 introduced this issue by removing crc/lib/crc32 from the exports paths. There was no breaking change mentionned by the dev.

Fortunately you found this issue before I published a new release.

freddy38510 added a commit that referenced this issue Jan 25, 2022
@freddy38510 freddy38510 added the bug Something isn't working label Jan 25, 2022
@freddy38510 freddy38510 changed the title UnhandledPromiseRejectionWarning while developing with local ssg repo Package subpath './lib/crc32' is not defined by "exports" Jan 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants