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

test: fix missing module #36

Merged
merged 1 commit into from
Sep 19, 2024
Merged

test: fix missing module #36

merged 1 commit into from
Sep 19, 2024

Conversation

uiolee
Copy link
Member

@uiolee uiolee commented Sep 11, 2024

check list

  • Add test cases for the changes.
  • Passed the CI test.

Description

https://github.com/hexojs/hexo-filter-nofollow/actions/runs/10466375549/job/29979033333#step:6:12

log

> hexo-filter-nofollow@2.0.3 test
> mocha test/index.js


 Exception during run: Error: Cannot find module '/home/runner/work/hexo-filter-nofollow/hexo-filter-nofollow/node_modules/hexo/dist/hexo'. Please verify that the package.json has a valid "main" entry
    at tryPackage (node:internal/modules/cjs/loader:487:19)
    at Module._findPath (node:internal/modules/cjs/loader:771:18)
    at Module._resolveFilename (node:internal/modules/cjs/loader:1211:27)
    at Module._load (node:internal/modules/cjs/loader:1051:27)
    at Module.require (node:internal/modules/cjs/loader:1311:19)
    at require (node:internal/modules/helpers:179:18)
    at Suite.<anonymous> (/home/runner/work/hexo-filter-nofollow/hexo-filter-nofollow/test/index.js:6:16)
    at Object.create (/home/runner/work/hexo-filter-nofollow/hexo-filter-nofollow/node_modules/mocha/lib/interfaces/common.js:148:19)
    at context.describe.context.context (/home/runner/work/hexo-filter-nofollow/hexo-filter-nofollow/node_modules/mocha/lib/interfaces/bdd.js:42:27)
    at Object.<anonymous> (/home/runner/work/hexo-filter-nofollow/hexo-filter-nofollow/test/index.js:5:1)
    at Module._compile (node:internal/modules/cjs/loader:1469:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1548:10)
    at Module.load (node:internal/modules/cjs/loader:1288:32)
    at Module._load (node:internal/modules/cjs/loader:1104:12)
    at cjsLoader (node:internal/modules/esm/translators:346:17)
    at ModuleWrap.<anonymous> (node:internal/modules/esm/translators:286:7)
    at ModuleJob.run (node:internal/modules/esm/module_job:234:25)
    at async ModuleLoader.import (node:internal/modules/esm/loader:473:24)
    at async formattedImport (/home/runner/work/hexo-filter-nofollow/hexo-filter-nofollow/node_modules/mocha/lib/nodejs/esm-utils.js:9:14)
    at async exports.requireOrImport (/home/runner/work/hexo-filter-nofollow/hexo-filter-nofollow/node_modules/mocha/lib/nodejs/esm-utils.js:42:28)
    at async exports.loadFilesAsync (/home/runner/work/hexo-filter-nofollow/hexo-filter-nofollow/node_modules/mocha/lib/nodejs/esm-utils.js:100:20)
    at async singleRun (/home/runner/work/hexo-filter-nofollow/hexo-filter-nofollow/node_modules/mocha/lib/cli/run-helpers.js:162:3)
    at async exports.handler (/home/runner/work/hexo-filter-nofollow/hexo-filter-nofollow/node_modules/mocha/lib/cli/run.js:375:5) {
  code: 'MODULE_NOT_FOUND',
  path: '/home/runner/work/hexo-filter-nofollow/hexo-filter-nofollow/node_modules/hexo/package.json',
  requestPath: 'hexo'
}

fix MODULE_NOT_FOUND after hexo@v7

Additional information

Copy link
Member

@yoshinorin yoshinorin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 🚀

@SukkaW SukkaW merged commit 48b01f6 into master Sep 19, 2024
18 checks passed
@SukkaW SukkaW deleted the missingmodule branch September 19, 2024 04:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants