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

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

Closed
hitao123 opened this issue Mar 7, 2017 · 5 comments
Closed

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

hitao123 opened this issue Mar 7, 2017 · 5 comments

Comments

@hitao123
Copy link

@hitao123 hitao123 commented Mar 7, 2017

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

@iissnan
Copy link
Owner

@iissnan iissnan commented Mar 14, 2017

Could you please provide the following information?

  • Node.js and NPM version
  • Hexo version
  • Your site package dependencies
@hitao123
Copy link
Author

@hitao123 hitao123 commented Mar 14, 2017

@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

@iissnan
Copy link
Owner

@iissnan iissnan commented Mar 14, 2017

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?

@hitao123
Copy link
Author

@hitao123 hitao123 commented Mar 14, 2017

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

@iissnan
Copy link
Owner

@iissnan iissnan commented Mar 15, 2017

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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.