saberland/saber

Cannot use scope package for theme. #360

Morgul 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. -->

<!-- Please confirm you will submit an issue. -->

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

<!-- (Update "[ ]" to "[x]" to check a box) -->

  • I confirm that this is an issue rather than a question.

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

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

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

Bug report

You can't use a scoped package as a theme. If you try to set one, you get the following error:

error Error: Cannot find module 'saber-theme-@skewedaspect/saber-theme-minima/package.json'
Require stack:
- /Users/ccase/devel/armtech/saber-test/docs/noop.js
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:623:15)
    at resolveFileName (/Users/ccase/devel/armtech/saber-test/node_modules/saber/node_modules/resolve-from/index.js:29:39)
    at resolveFrom (/Users/ccase/devel/armtech/saber-test/node_modules/saber/node_modules/resolve-from/index.js:43:9)
    at module.exports (/Users/ccase/devel/armtech/saber-test/node_modules/saber/node_modules/resolve-from/index.js:46:47)
    at module.exports (/Users/ccase/devel/armtech/saber-test/node_modules/saber/lib/utils/resolvePackage.js:19:5)
    at Saber.prepare (/Users/ccase/devel/armtech/saber-test/node_modules/saber/lib/index.js:135:20)
    at processTicksAndRejections (internal/process/task_queues.js:89:5)
    at async Saber.serve (/Users/ccase/devel/armtech/saber-test/node_modules/saber/lib/index.js:349:5)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

Process finished with exit code 1

Version

v0.7.0

Steps to reproduce

Easiest way to reproduce:

Basically, just try to use a theme published under a scoped package.

What is expected?

The theme just works.

What is actually happening?

It does not work.

Other relevant information

  • Result of running saber -v:
    • saber/0.7.0 darwin-x64 node-v12.4.0
  • Is Saber a global or local install?
    • local
  • Which package manager did you use for the install?
    • yarn
  • Does this issue occur when all plugins are disabled?
    • yes

@issuehunt has funded $60.00 to this issue.


posted by issuehunt-app[bot] over 5 years ago

@issuehunt has funded $60.00 to this issue.


posted by issuehunt-app[bot] over 5 years ago

@kazup01 has cancelled @issuehunt's funding for this issue.(Cancelled amount: $60.00) See it on IssueHunt

posted by issuehunt-app[bot] over 5 years ago

@egoist has rewarded $42.00 to @saltysugar. See it on IssueHunt

  • :moneybag: Total deposit: $60.00
  • :tada: Repository reward(20%): $12.00
  • :wrench: Service fee(10%): $6.00
posted by issuehunt-app[bot] over 5 years ago

Fund this Issue

$60.00
Rewarded

Rewarded pull request

Other pull requests

Recent activities

saltysugar was rewarded by egoist for saberland/saber# 360
over 5 years ago
egoist submitted an output to  saberland/ saber# 360
over 5 years ago