Skip to content

Error: Cannot find module '/usr/local/lib/package.json' #51

@hopperhuang

Description

@hopperhuang

i run this command : sudo npm install -g rc-tools to install rc-tools cli

but it throw err like this;

> fsevents@1.2.4 install /usr/local/lib/node_modules/rc-tools/node_modules/fsevents
> node install

[fsevents] Success: "/usr/local/lib/node_modules/rc-tools/node_modules/fsevents/lib/binding/Release/node-v57-darwin-x64/fse.node" already installed
Pass --update-binary to reinstall or --build-from-source to recompile

> uglifyjs-webpack-plugin@0.4.6 postinstall /usr/local/lib/node_modules/rc-tools/node_modules/uglifyjs-webpack-plugin
> node lib/post_install.js


> rc-tools@8.1.1 postinstall /usr/local/lib/node_modules/rc-tools
> node lib/init.js

module.js:549
    throw err;
    ^

Error: Cannot find module '/usr/local/lib/package.json'
    at Function.Module._resolveFilename (module.js:547:15)
    at Function.Module._load (module.js:474:25)
    at Module.require (module.js:596:17)
    at require (internal/module.js:11:18)
    at init (/usr/local/lib/node_modules/rc-tools/lib/init.js:73:15)
    at Object.<anonymous> (/usr/local/lib/node_modules/rc-tools/lib/init.js:83:1)
    at Module._compile (module.js:652:30)
    at Object.Module._extensions..js (module.js:663:10)
    at Module.load (module.js:565:32)
    at tryModuleLoad (module.js:505:12)

version info: see below

platform: macos 10.13.4
node: 8.11.1
npm: 5.6.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions