Skip to content
This repository has been archived by the owner on May 10, 2024. It is now read-only.

Error: Cannot find module 'request' #506

Open
goodevilgenius opened this issue Nov 15, 2017 · 15 comments
Open

Error: Cannot find module 'request' #506

goodevilgenius opened this issue Nov 15, 2017 · 15 comments
Labels

Comments

@goodevilgenius
Copy link

A fresh install of api-designer results in the following:

$ npm install -g api-designer
npm WARN deprecated wrench@1.5.9: wrench.js is deprecated! You should check out fs-extra (https://github.com/jprichardson/node-fs-extra) for any operations you were using wrench for. Thanks for all the usage over the years.
/Users/danjones/.nvm/versions/node/v8.7.0/bin/api-designer -> /Users/danjones/.nvm/versions/node/v8.7.0/lib/node_modules/api-designer/bin/api-designer.js
+ api-designer@0.4.1
added 145 packages in 7.83s

$ api-designer
module.js:529
    throw err;
    ^

Error: Cannot find module 'request'
    at Function.Module._resolveFilename (module.js:527:15)
    at Function.Module._load (module.js:476:23)
    at Module.require (module.js:568:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (/Users/danjones/.nvm/versions/node/v8.7.0/lib/node_modules/api-designer/bin/api-designer.js:6:15)
    at Module._compile (module.js:624:30)
    at Object.Module._extensions..js (module.js:635:10)
    at Module.load (module.js:545:32)
    at tryModuleLoad (module.js:508:12)
    at Function.Module._load (module.js:500:3)

After running npm install -g request, api-designer runs properly.

@pongz79
Copy link

pongz79 commented Nov 22, 2017

I had the same issue with a fresh install of api-designer.

Thanks for the fix @goodevilgenius

@ch8771
Copy link

ch8771 commented Nov 23, 2017

I had the same issue too.
thanks for solve my problem.

@qileilove
Copy link

awesome, the same issue, now it works fine.

@ssjunior
Copy link

ssjunior commented Jan 7, 2018

+1

@dark-neou
Copy link

npm -g install request

@T-vK
Copy link

T-vK commented Mar 29, 2018

2018 and the module is still broken.
Latest node version (v9.8.0) and npm v 5.6.0.
I don't want to install request globally.
If you use a module, then you have to add it to the dependencies in the package.json. Surely this can't be that hard.

@goodevilgenius
Copy link
Author

@shisama
Copy link

shisama commented Jul 25, 2018

See #518 (comment)

The version is old on npmjs.com. Latest is on master branch.
Try the below command to install latest version.

npm install -g mulesoft/api-designer#master

@mp3monster
Copy link

I had to follow npm install -g mulesoft/api-designer#master to get the designer to work. Recommend the install instructions on the readme page be updated

@T-vK
Copy link

T-vK commented Nov 8, 2018

npm install -g mulesoft/api-designer did the trick for me.

@AngusCS
Copy link

AngusCS commented Jul 5, 2019

Did not install well for me. There were six warnings from NPM about deprecated packages and a warning from api-designer about another deprecated package.

Is this project still being maintained?

MachineName:~ anguscs$ npm install -g mulesoft/api-designer#master
npm WARN deprecated node-uuid@1.4.8: Use uuid module instead
npm WARN deprecated hawk@1.0.0: This module moved to @hapi/hawk. Please make sure to switch over as this distribution is no longer supported and may contain bugs and critical security issues.
npm WARN deprecated sntp@0.2.4: This module moved to @hapi/sntp. Please make sure to switch over as this distribution is no longer supported and may contain bugs and critical security issues.
npm WARN deprecated boom@0.4.2: This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial).
npm WARN deprecated cryptiles@0.2.2: This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial).
npm WARN deprecated hoek@0.9.1: This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial).
/usr/local/bin/api-designer -> /usr/local/lib/node_modules/api-designer/bin/api-designer.js
+ api-designer@0.5.0
added 149 packages from 158 contributors in 13.324s
MachineName:~ anguscs$ api-designer
API designer running on port 3000...
(node:14599) [DEP0066] DeprecationWarning: OutgoingMessage.prototype._headers is deprecated

@tamiryspino
Copy link

@carowright I think this commit closes this issue.
842b07f#diff-b9cfc7f2cdf78a7f4b91a753d10865a2

@santileira
Copy link

santileira commented Oct 29, 2019

i had the same issue,

thanks for the solution @goodevilgenius

@Yovven
Copy link

Yovven commented Sep 3, 2020

nice~

@Yovven
Copy link

Yovven commented Dec 22, 2021 via email

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests