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

Error: Cannot find module 'C:\node_modules\npm\bin\npm-cli.js' #235

Closed
MAHOSSAN opened this issue Aug 10, 2019 · 12 comments
Closed

Error: Cannot find module 'C:\node_modules\npm\bin\npm-cli.js' #235

MAHOSSAN opened this issue Aug 10, 2019 · 12 comments
Assignees
Labels
CLI question Further information is requested

Comments

@MAHOSSAN
Copy link

I download this project and tried to run it but i am getting following errors ..
C:\Users\Khundokar Nirjor\Desktop\loop4\loopback4-example-shopping> npm start

[email protected] prestart C:\Users\Khundokar Nirjor\Desktop\loop4\loopback4-example-shopping
npm run build

[email protected] build C:\Users\Khundokar Nirjor\Desktop\loop4\loopback4-example-shopping
lerna run build

internal/modules/cjs/loader.js:628
throw err;
^
Error: Cannot find module 'C:\node_modules\npm\bin\npm-cli.js'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:625:15)
at Function.Module._load (internal/modules/cjs/loader.js:527:27)
at Function.Module.runMain (internal/modules/cjs/loader.js:839:10)
at internal/main/run_main_module.js:17:11 {
code: 'MODULE_NOT_FOUND',
requireStack: []
}
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] build: lerna run build
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Khundokar Nirjor\AppData\Roaming\npm-cache_logs\2019-08-10T02_05_39_890Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] prestart: npm run build
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] prestart script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Khundokar Nirjor\AppData\Roaming\npm-cache_logs\2019-08-10T02_05_40_026Z-debug.log

@dhmlau
Copy link
Member

dhmlau commented Aug 10, 2019

@MAHOSSAN, I followed the instruction in the Installation section to install dependencies and start the application and it seems to be working fine. Here is what i did:

 git clone https://github.com/strongloop/loopback4-example-shopping.git
cd loopback4-example-shopping
npm i
npm start 

Looking at your error, I found this thread nodejs/help#1618 that might be able to help you. At the end of the discussion, someone says:

Updating to the latest version of NPM fixed it for me. npm install npm@latest -g

So you might want to give it a try.

@dhmlau dhmlau self-assigned this Aug 10, 2019
@dhmlau dhmlau added CLI question Further information is requested labels Aug 10, 2019
@MAHOSSAN
Copy link
Author

for me its not working

@dhmlau
Copy link
Member

dhmlau commented Aug 12, 2019

are you using nvm to install Node.js? If not, we'd recommend you to do so to isolate some of the environment issues.

@hardikbodar
Copy link

i will some error i am trying to solve but note solve this error please help us...
C:\Users\SARKAR>npm start
npm ERR! code ENOENT
npm ERR! syscall open
npm ERR! path C:\Users\SARKAR\package.json
npm ERR! errno -4058
npm ERR! enoent ENOENT: no such file or directory, open 'C:\Users\SARKAR\package.json'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent

npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\SARKAR\AppData\Roaming\npm-cache_logs\2019-11-18T11_19_29_089Z-debug.log

C:\Users\SARKAR>expo init App
internal/modules/cjs/loader.js:797
throw err;
^

Error: Cannot find module 'C:\Users\SARKAR\AppData\Roaming\npm\node_modules\expo-cli\bin\expo.js'
←[90m at Function.Module._resolveFilename (internal/modules/cjs/loader.js:794:15)←[39m
←[90m at Function.Module._load (internal/modules/cjs/loader.js:687:27)←[39m
←[90m at Function.Module.runMain (internal/modules/cjs/loader.js:1025:10)←[39m
←[90m at internal/main/run_main_module.js:17:11←[39m {
code: ←[32m'MODULE_NOT_FOUND'←[39m,
requireStack: []
}

@dhmlau
Copy link
Member

dhmlau commented Mar 27, 2020

It's been 4 months since the last comment. There have been quite a lot of changes in this repo.

I'd like to close this issue. Please open a new issue if you still are running into problems. Thanks.

@dhmlau dhmlau closed this as completed Mar 27, 2020
@anuragyadav-ab
Copy link

internal/modules/cjs/loader.js:969
throw err;
^

Error: Cannot find module 'C:\Users\ANURAG\AppData\Roaming\npm\node_modules@angular\cli\bin\ng'
�[90m at Function.Module._resolveFilename (internal/modules/cjs/loader.js:966:15)�[39m
�[90m at Function.Module._load (internal/modules/cjs/loader.js:842:27)�[39m
�[90m at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:71:12)�[39m
�[90m at internal/main/run_main_module.js:17:47�[39m {
code: �[32m'MODULE_NOT_FOUND'�[39m,
requireStack: []
}
please help showing error while creating a project

@dougal83
Copy link
Contributor

Hi @anuragyadav-ab

I cannot find any issue with cloning this project and running npm i, npm run docker:start and npm run start. All work as expected.

Please create a new issue and give step by step instruction on how to replicate your problem.

@richawasp
Copy link

Hi tried everything but i still giving the same error and the strange part is i have able to launch appium from administrator without any issue but when i try to run from another user which has admin rights giving me an error each time .this is so frustrating ERROR cannot find module main.js at Function.Module._load (internal/modules/cjs/loader.js:841:27)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js
Can anyone suggest how to run appium setup successfully i installed node.js and then checked version of npm aand node which worked fine when i tried running npm install -g appium m getting error and unable to install appium successfully.

@dougal83
Copy link
Contributor

Hi @richawasp, I'm not sure how your post relates to this repo. The error here is generic, perhaps you should look for assistance in a Nodejs or 'appium' forum?

@gangadharsm
Copy link

I got same error, update the node js and angular cli, then this issue is resolved for me.

@BhagyaLahiru
Copy link

Error: Cannot find module 'C:\Program Files\nodejs\node_modules\npm\bin\node_modules\npm\bin\npm-cli.js'
←[90m at Function.Module._resolveFilename (node:internal/modules/cjs/loader:933:15)←[39m
←[90m at Function.Module._load (node:internal/modules/cjs/loader:778:27)←[39m
←[90m at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12)←[39m
←[90m at node:internal/main/run_main_module:17:47←[39m {
code: ←[32m'MODULE_NOT_FOUND'←[39m,
requireStack: []
}

@anjusm1
Copy link

anjusm1 commented Feb 11, 2022

Error: Cannot find module 'C:\Project\app.js'
at Function.Module._resolveFilename (node:internal/modules/cjs/loader:933:15)
at Function.Module._load (node:internal/modules/cjs/loader:778:27)
throw err; ^

Error: Cannot find module 'C:\Project\app.js'
at Function.Module._resolveFilename (node:internal/modules/cjs/loader:933:15)
at Function.Module._load (node:internal/modules/cjs/loader:778:27)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12)
at node:internal/main/run_main_module:17:47 {
code: 'MODULE_NOT_FOUND',
requireStack: []
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLI question Further information is requested
Projects
None yet
Development

No branches or pull requests

9 participants