saberland/saber

Do you want to work on this issue?

You can request for a bounty in order to promote it!

ERR_PACKAGE_PATH_NOT_EXPORTED #745

sharperDev2112 posted onGitHub

<!-- Please don't delete this template or we'll close your issue -->

<!-- Before creating an issue please make sure you are using the latest version of Saber. -->

Trying to install Saber fresh by following this page: https://saber.egoist.dev/docs/installation.html#prerequisites

<!-- Issues which contain questions or support requests will be closed. -->

<!-- Please ask questions via following several ways. -->

<!-- https://chat.saber.land/ -->

<!-- https://stackoverflow.com/questions/ask?tags=saberjs -->

Bug report

Steps to reproduce

By following the "Using the Generator" section on your installation page to install, I get errors. I tried this on both a Windows 10 machine and a Mac Pro with Ventura 13.4. Everything during the install runs fine. Then I issue the npm run dev command and I get the following:

npm run dev

dev saber

[info] Using config file: saber-config.yml [info] Using theme: minima [info] Using 2 plugins from config file [error] Error [ERR_PACKAGE_PATH_NOT_EXPORTED]: Package subpath './package' is not defined by "exports" in /Users/billuser/Projects/TestProjects/testSSR/my-site/node_modules/vue/package.json at new NodeError (node:internal/errors:371:5) at throwExportsNotFound (node:internal/modules/esm/resolve:453:9) at packageExportsResolve (node:internal/modules/esm/resolve:731:3) at resolveExports (node:internal/modules/cjs/loader:482:36) at Function.Module._findPath (node:internal/modules/cjs/loader:522:31) at Function.Module._resolveFilename (node:internal/modules/cjs/loader:919:27) at Function.resolve (node:internal/modules/cjs/helpers:108:19) at module.exports (/Users/billuser/Projects/TestProjects/testSSR/my-site/node_modules/saber/lib/webpack/webpack.config.js:44:26) at Saber.getWebpackConfig (/Users/billuser/Projects/TestProjects/testSSR/my-site/node_modules/saber/lib/index.js:288:54) at VueRenderer.getRequestHandler (/Users/billuser/Projects/TestProjects/testSSR/my-site/node_modules/saber/vue-renderer/lib/index.js:391:35)

Using node version 16.14.2, npm version 8.5.0

This is from my Mac. Windows gets the same error.

<!-- If you are reporting a bug that can ONLY be reproduced on your repository, PLEASE provide this repo link. That takes guessing work out of the way and saves us time. -->

<!-- You can also use this CodeSandbox starter https://bit.ly/2IlcpNF -->

What is expected?

I expect it to work without the hassle of these errors.

What is actually happening?

This software appears not to work at all and introduces a bunch of high vulnerabilities

Other relevant information

  • Result of running saber -v: I get "command not found"

  • Browser version (optional): Browser not used yet

  • Is Saber a global or local install? trying to install locally

  • Which package manager did you use for the install? npm 8.5.0

  • Does this issue occur when all plugins are disabled? n/a


For anyone come with this issue, locking the vue version to 2.6.x (legacy) will bypass the exception.

package.json with yarn:

{
  // ...
  "resolutions": {
    "vue-server-renderer": "2.6.14",
    "vue-template-compiler": "2.6.14",
    "vue": "2.6.14"
  }
}

package.json with npm >= 8:

{
  // ...
  "overrides": {
    "vue-server-renderer": "2.6.14",
    "vue-template-compiler": "2.6.14",
    "vue": "2.6.14"
  }
}

Or, for saber, completing the filename suffix on this line will fix this issue:

  const ownModulesDir = path.join(
-    path.dirname(require.resolve('vue/package')),
+    path.dirname(require.resolve('vue/package.json')),
    '..'
posted by imyelo over 1 year ago

Fund this Issue

$0.00
Funded
Only logged in users can fund an issue

Pull requests