You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I hope you're doing well! I've encountered an issue while using hexo-util and I could use some help in resolving it. Would you mind taking a look?
Here's a brief description of the issue:
jack@jackdeMacBook-Pro new % node -v
v14.2.0
jack@jackdeMacBook-Pro new % npm install hexo-util
npm WARN read-shrinkwrap This version of npm is compatible with lockfileVersion@1, but package-lock.json was generated for lockfileVersion@2. I'll try to do my best with it!
> [email protected] postinstall /Users/jack/Documents/project/blog/node_modules/hexo-util
> npm run build:highlight
> [email protected] build:highlight /Users/jack/Documents/project/blog/node_modules/hexo-util
> node scripts/build_highlight_alias.js
internal/modules/cjs/loader.js:491
throw new ERR_PACKAGE_PATH_NOT_EXPORTED(basePath, mappingKey);
^
Error [ERR_PACKAGE_PATH_NOT_EXPORTED]: Package subpath './lib/languages/1c' is not defined by "exports" in /Users/jack/Documents/project/blog/node_modules/highlight.js/package.json
at applyExports (internal/modules/cjs/loader.js:491:9)
at resolveExports (internal/modules/cjs/loader.js:507:23)
at Function.Module._findPath (internal/modules/cjs/loader.js:635:31)
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:1007:27)
at Function.Module._load (internal/modules/cjs/loader.js:890:27)
at Module.require (internal/modules/cjs/loader.js:1080:19)
at require (internal/modules/cjs/helpers.js:72:18)
at /Users/jack/Documents/project/blog/node_modules/hexo-util/scripts/build_highlight_alias.js:13:15
at Array.forEach (<anonymous>)
at Object.<anonymous> (/Users/jack/Documents/project/blog/node_modules/hexo-util/scripts/build_highlight_alias.js:10:11) {
code: 'ERR_PACKAGE_PATH_NOT_EXPORTED'
}
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] build:highlight: `node scripts/build_highlight_alias.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] build:highlight script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/jack/.npm/_logs/2024-03-09T03_16_45_806Z-debug.log
npm WARN blog No description
npm WARN blog No repository field.
npm WARN blog No license field.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] postinstall: `npm run build:highlight`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] postinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/jack/.npm/_logs/2024-03-09T03_16_45_902Z-debug.log
In addition, I found that hexo-util's package.json supports "node": ">=14", so I don't know why the installation failed.
@uiolee First of all, thank you for your reply. Indeed, I can install [email protected] perfectly in the node14.21.3 version, but the above error will be reported in the node14.2.0 version. I hope a3f399a can be a solution. Thanks again for your reply.
Hi there! 👋
I hope you're doing well! I've encountered an issue while using hexo-util and I could use some help in resolving it. Would you mind taking a look?
Here's a brief description of the issue:
In addition, I found that hexo-util's package.json supports "node": ">=14", so I don't know why the installation failed.
https://github.com/hexojs/hexo-util/blob/master/package.json
"engines": {
"node": ">=14"
}
Any assistance or guidance you could provide would be greatly appreciated! Thank you in advance for your help.
The text was updated successfully, but these errors were encountered: