Skip to content

Error: Cannot find module '../package.json' [solved] #298

@onxs

Description

@onxs

I agree and want to create new issue


Expected behavior

success dev

Actual behavior

$ hexo g
hexoINFO Start processing
INFO Files loaded in 2.45 s
ERROR Cannot find module '../package.json'
Error: Cannot find module '../package.json'
at Function.Module._resolveFilename (module.js:489:15)
at Function.Module._load (module.js:439:25)
at Module.require (module.js:517:17)
at require (F:\hxo\node_modules\hexo\lib\hexo\index.js:219:21)
at Object. (F:\hxo\themes\next\scripts\helpers.js:8:13)
at wrapper (F:\hxo\node_modules\lodash\lodash.js:4949:19)
at Object.eval [as tpl] (eval at precompile (F:\hxo\node_modules\swig-templa tes\lib\swig.js:497:13), :338:127)
at compiled (F:\hxo\node_modules\swig-templates\lib\swig.js:618:18)
at Theme._View.View._compiled.locals [as _compiled] (F:\hxo\node_modules\hex o\lib\theme\view.js:124:48)
at Theme._View.View.View.render (F:\hxo\node_modules\hexo\lib\theme\view.js: 29:15)
at route.set (F:\hxo\node_modules\hexo\lib\hexo\index.js:386:29)
at tryCatcher (F:\hxo\node_modules\bluebird\js\release\util.js:16:23)
at F:\hxo\node_modules\bluebird\js\release\method.js:15:34
at RouteStream._read (F:\hxo\node_modules\hexo\lib\hexo\router.js:134:3)
at RouteStream.Readable.read (stream_readable.js:431:10)
at resume
(_stream_readable.js:811:12)
at _combinedTickCallback (internal/process/next_tick.js:138:11)
at process._tickCallback (internal/process/next_tick.js:180:9)
ERROR Cannot find module '../package.json'
Error: Cannot find module '../package.json'
at Function.Module._resolveFilename (module.js:489:15)
at Function.Module._load (module.js:439:25)
at Module.require (module.js:517:17)
at require (F:\hxo\node_modules\hexo\lib\hexo\index.js:219:21)
at Object. (F:\hxo\themes\next\scripts\helpers.js:8:13)
at wrapper (F:\hxo\node_modules\lodash\lodash.js:4949:19)
at Object.eval [as tpl] (eval at precompile (F:\hxo\node_modules\swig-templa tes\lib\swig.js:497:13), :338:127)
at compiled (F:\hxo\node_modules\swig-templates\lib\swig.js:618:18)
at Theme._View.View._compiled.locals [as _compiled] (F:\hxo\node_modules\hex o\lib\theme\view.js:124:48)
at Theme._View.View.View.render (F:\hxo\node_modules\hexo\lib\theme\view.js: 29:15)
at route.set (F:\hxo\node_modules\hexo\lib\hexo\index.js:386:29)
at tryCatcher (F:\hxo\node_modules\bluebird\js\release\util.js:16:23)
at F:\hxo\node_modules\bluebird\js\release\method.js:15:34
at RouteStream._read (F:\hxo\node_modules\hexo\lib\hexo\router.js:134:3)
at RouteStream.Readable.read (stream_readable.js:431:10)
at resume
(_stream_readable.js:811:12)
at _combinedTickCallback (internal/process/next_tick.js:138:11)
at process._tickCallback (internal/process/next_tick.js:180:9)
ERROR Cannot find module '../package.json'
Error: Cannot find module '../package.json'

Steps to reproduce the behavior

  1. N/A
  2. N/A
  3. N/A
  • Link to demo site with this issue: N/A
  • Link(s) to source code or any usefull link(s): N/A

Node.js and NPM Information

$ hexo g
hexoINFO  Start processing
INFO  Files loaded in 2.45 s
ERROR Cannot find module '../package.json'
Error: Cannot find module '../package.json'
    at Function.Module._resolveFilename (module.js:489:15)
    at Function.Module._load (module.js:439:25)
    at Module.require (module.js:517:17)
    at require (F:\hxo\node_modules\hexo\lib\hexo\index.js:219:21)
    at Object.<anonymous> (F:\hxo\themes\next\scripts\helpers.js:8:13)
    at wrapper (F:\hxo\node_modules\lodash\lodash.js:4949:19)
    at Object.eval [as tpl] (eval at precompile (F:\hxo\node_modules\swig-templa                                                                                                                           tes\lib\swig.js:497:13), <anonymous>:338:127)
    at compiled (F:\hxo\node_modules\swig-templates\lib\swig.js:618:18)
    at Theme._View.View._compiled.locals [as _compiled] (F:\hxo\node_modules\hex                                                                                                                           o\lib\theme\view.js:124:48)
    at Theme._View.View.View.render (F:\hxo\node_modules\hexo\lib\theme\view.js:                                                                                                                           29:15)
    at route.set (F:\hxo\node_modules\hexo\lib\hexo\index.js:386:29)
    at tryCatcher (F:\hxo\node_modules\bluebird\js\release\util.js:16:23)
    at F:\hxo\node_modules\bluebird\js\release\method.js:15:34
    at RouteStream._read (F:\hxo\node_modules\hexo\lib\hexo\router.js:134:3)
    at RouteStream.Readable.read (_stream_readable.js:431:10)
    at resume_ (_stream_readable.js:811:12)
    at _combinedTickCallback (internal/process/next_tick.js:138:11)
    at process._tickCallback (internal/process/next_tick.js:180:9)
ERROR Cannot find module '../package.json'
Error: Cannot find module '../package.json'
    at Function.Module._resolveFilename (module.js:489:15)
    at Function.Module._load (module.js:439:25)
    at Module.require (module.js:517:17)
    at require (F:\hxo\node_modules\hexo\lib\hexo\index.js:219:21)
    at Object.<anonymous> (F:\hxo\themes\next\scripts\helpers.js:8:13)
    at wrapper (F:\hxo\node_modules\lodash\lodash.js:4949:19)
    at Object.eval [as tpl] (eval at precompile (F:\hxo\node_modules\swig-templa                                                                                                                           tes\lib\swig.js:497:13), <anonymous>:338:127)
    at compiled (F:\hxo\node_modules\swig-templates\lib\swig.js:618:18)
    at Theme._View.View._compiled.locals [as _compiled] (F:\hxo\node_modules\hex                                                                                                                           o\lib\theme\view.js:124:48)
    at Theme._View.View.View.render (F:\hxo\node_modules\hexo\lib\theme\view.js:                                                                                                                           29:15)
    at route.set (F:\hxo\node_modules\hexo\lib\hexo\index.js:386:29)
    at tryCatcher (F:\hxo\node_modules\bluebird\js\release\util.js:16:23)
    at F:\hxo\node_modules\bluebird\js\release\method.js:15:34
    at RouteStream._read (F:\hxo\node_modules\hexo\lib\hexo\router.js:134:3)
    at RouteStream.Readable.read (_stream_readable.js:431:10)
    at resume_ (_stream_readable.js:811:12)
    at _combinedTickCallback (internal/process/next_tick.js:138:11)
    at process._tickCallback (internal/process/next_tick.js:180:9)
ERROR Cannot find module '../package.json'
Error: Cannot find module '../package.json'

Package dependencies Information

{
  "name": "hexo-site",
  "version": "0.0.0",
  "private": true,
  "hexo": {
    "version": "3.7.1"
  },
  "dependencies": {
    "hexo": "^3.2.0",
    "hexo-generator-archive": "^0.1.4",
    "hexo-generator-category": "^0.1.3",
    "hexo-generator-index": "^0.2.0",
    "hexo-generator-tag": "^0.2.0",
    "hexo-renderer-ejs": "^0.3.0",
    "hexo-renderer-stylus": "^0.3.1",
    "hexo-renderer-marked": "^0.3.0",
    "hexo-server": "^0.2.0"
  }
}

Hexo Information

Hexo version


Hexo Configuration

NexT Information

NexT Version:

  • Latest Master branch
  • Latest Release version
  • Old version

NexT Scheme:

  • All schemes
  • Muse
  • Mist
  • Pisces
  • Gemini

NexT Configuration:

Other Information

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions