iissnan/hexo-theme-next

Cannot find module 'hexo-util' in /next/script/tags/exturl.js

hitao123 opened this issue · 5 comments

Expected behavior (预期行为)

var util = require('hexo-util');

Actual behavior (实际行为)

but you don not provide the module in the repository , than i need to install it again

Could you please provide the following information?

  • Node.js and NPM version
  • Hexo version
  • Your site package dependencies

@iissnan
hexo-cli: 1.0.1
os: Windows_NT 10.0.14393 win32 x64
node: 6.9.2
npm: 3.10.9
ex df _ h4r52z uid1vwx
owy9mgjer bxe17nj0tnj
wkuko loza5v 50 9r5nt
the main package dependencies hexo-util ,when i meet this problem then i install the dependency

According to the NPM package installation algorithm, hexo-util (with other hexo plugin like hexo-fs) should be installed just in your "Blog/node_modules" directory, you don't have to specify hexo-util explicitly.

Could you please delete the hexo-util dependency in the package.json and Blog/node_modules directory, then reinstall all dependencies?

@iissnan ,thanks for your help and patience, i build another folder, use hexo init, i found it in the node_modules, maybe create the folder for a long time.

You are welcome.

For those who also encounter this issue, please check your NPM version.

  • > 3: Still not work. Please remove node_modules directory and reinstall using npm install.
  • < 3: Please add hexo-util explicitly via npm install --save-dev hexo-util to you site package deps.