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
internal/modules/cjs/loader.js:983 throw err; ^ Could you help me with this code? #2644
Comments
Hello, can you give more information? |
I also get the same error on running Trying to get the react native up and running. |
Hello, I'm having the same problem as stated above. When type {node index.js } I get the error below, I tried number of solutions ie uninstalled node and npm then reinstalled then back separately. I'm still getting the same error, help needed. The error:
|
delete node module and install again |
same errors: ...
> core-js-pure@3.6.5 postinstall /***/node_modules/core-js-pure
> node -e "try{require('./postinstall')}catch(e){}"
> ejs@2.7.4 postinstall /***/node_modules/ejs
> node ./postinstall.js
internal/modules/cjs/loader.js:969
throw err;
^
Error: Cannot find module '/***/node_modules/ejs/postinstall.js'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:966:15)
at Function.Module._load (internal/modules/cjs/loader.js:842:27)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:71:12)
at internal/main/run_main_module.js:17:47 {
code: 'MODULE_NOT_FOUND',
requireStack: [] Tried many ways:
|
versions: |
Work for me:
:) |
I do have the same issue .I tried many solutions ,I am feeling frustrated to solve this 🤣 |
Example index.js as module: var productList = [{name: "banana"},{name: "apple"} module.exports = { productList }; |
yes i Fix it
|
I am struggling with this same issue. I followed the fix as well and it is not working for me. I am on windows 10 if that makes any difference. It seems to not be downloading the complete fileset of Node. Any help would be amazing. |
same issue, tried all of the solutions mentioned above, but no use.
[nodemon] 2.0.4 Error: Cannot find module '../../temp'
|
I fixed the issue by using and trying different versions of node. It took a while to find the right one but I eventually did. |
I fixed the issue, apparently whenever you change your project directory some node modules will be imported automatically by node.js and along with it, some file paths inside the project will be changed. |
Where did you find the temp file? |
node js can only run app.js like you execute main function in other programming languages! |
Thanks guys, this blog helped me so much to solve my problem with node! |
To anyone who stumbled upon this issue. |
First, check the path of your current folder under terminal rm -rf node_modules package-lock.json && npm install && npm start |
Am also facing the same issue... here is the solution from my end. |
Worked for me. |
I too got faced the same issue . I got rid that finally by removing node
modules that got installed twice and twice.
…On Sat, Sep 12, 2020 at 12:08 AM Naimur Rahman ***@***.***> wrote:
Am also facing the same issue... here is the solution from my end.
if index.js not in our root folder means, we will getting error, once you
move to root folder then server will be running
Worked for me.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#2644 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/APY4QRXSA3CUOMDUQPWGBEDSFJVDVANCNFSM4MP5B33A>
.
|
I got faced the same issue and I solved it finally. HOPE this can help! |
Oh my god!! i was struggling on this, tried everything, in the end, found out my file name was sever.js |
Create the .js file in the root folder . |
Here's what ended up working for me (Strapi v3.6.8) None of the above worked ... Neither did moving server.js files around etc. Bizarrely, just using this start command worked: strapi start Somehow that's different to running: node server.js etc Here's my package.json start scripts for reference:
|
Simply use the cd command for going to the specific directory where the script is written. It will have to be done manually as the command is not being able to direct properly. Once done the script runs successfully. This method worked for me. |
check the address when giving command like if you giving node .\module , check if its inside src and provide src before module name like node .\src\module |
first check whether in the json file the dependencies you are require for is mentioned there or not after your installation, in my case it was not listed there so i double check and it was not listed as just becouse i did one silly mistake that the location to install dependencies is different where the src folder so that is why the dependencies were not listed there i just reinstall and its working fine. |
Hello I having issues with this please help node:internal/modules/cjs/loader:1078 Error: Cannot find module '/Users/yandyestrada/ethers_examples/start' Node.js v18.14.2 |
I have the same exact issue, did you find a fix? |
Check if Nodejs directory(generally -> C:\Program Files\nodejs) location is added in the system variables or not, sometimes it gets removed by mistake if not then add and restart everything |
This was simple thanks. Worked |
for Linux users: rm -rf node_modules package-lock.json && npm install && npm start |
Ubuntu Server 20.04 LTS /init.js:27 SyntaxError: Unexpected token '.' Node.js v18.17.1 :( :( :( |
@domajor yours is probably just JS syntax that node 18 doesn't understand. |
Ubuntu reinstalled, node.js reinstalled. node init.js Error: Cannot find module 'dateformat' |
I tried 1 or 2 months ago and the working system died after updating, nothing is working |
It worked when the server was restarted and updated, I wonder how long it will work. |
nodejs :) ubuntu server 20.04 [master] Starting Cryptonote Node.JS pool version Oguzhan unresolved error |
[master] Starting Cryptonote Node.JS pool version v2.0.0 I'm so tired, I have no hope :( I'm using Ubuntu Server 20 |
this kind of is breaking me 😢 |
I am facing some issues when trying to run sass: I have tried all the above mentioned solutions and nothing seems to work so far. PS C:\Users\admin\Desktop\IT\JONAS CSS & SASS\Natours-starter> npm run compile:sass
'SASS\Natours-starter\node_modules.bin' is not recognized as an internal or external command, Error: Cannot find module 'C:\Users\admin\Desktop\IT\node-sass\bin\node-sass' Node.js v18.12.1 |
ubuntu server |
I faced this problem today and it was because of the path name. It was called redux and it was working. Then I changed the file to redux & react-redux and the problem appeared. The problem was in & for me. |
remove & from JONAS CSS & SASS => JONAS CSS and SASS |
npm run dev
[nodemon] 2.0.22 Error: Cannot find module './app.ts'
Node.js v20.11.1 i have the same issue, even though i most of the solutions above, the app.ts file is available in my root directory, still i am getting the error |
Node version : 14.17.5 internal/modules/cjs/loader.js:892 throw err; ^ Error: Cannot find module 'node:os' Require stack:
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:889:15) at Function.Module._load (internal/modules/cjs/loader.js:745:27) at Module.require (internal/modules/cjs/loader.js:961:19) at require (internal/modules/cjs/helpers.js:92:18) at Object. (/home/suresh-dhwani/citifinance-node-api/node_modules/@azure/logger/dist/commonjs/log.js:7:19) at Module._compile (internal/modules/cjs/loader.js:1072:14) at Object.Module._extensions..js (internal/modules/cjs/loader.js:1101:10) at Module.load (internal/modules/cjs/loader.js:937:32) at Function.Module._load (internal/modules/cjs/loader.js:778:12) at Module.require (internal/modules/cjs/loader.js:961:19) at require (internal/modules/cjs/helpers.js:92:18) at Object. (/home/suresh-dhwani/citifinance-node-api/node_modules/@azure/logger/dist/commonjs/debug.js:5:18) at Module._compile (internal/modules/cjs/loader.js:1072:14) at Object.Module._extensions..js (internal/modules/cjs/loader.js:1101:10) at Module.load (internal/modules/cjs/loader.js:937:32) at Function.Module._load (internal/modules/cjs/loader.js:778:12) { code: 'MODULE_NOT_FOUND', requireStack: [ '/home/suresh-dhwani/citifinance-node-api/node_modules/@azure/logger/dist/commonjs/log.js', '/home/suresh-dhwani/citifinance-node-api/node_modules/@azure/logger/dist/commonjs/debug.js', '/home/suresh-dhwani/citifinance-node-api/node_modules/@azure/logger/dist/commonjs/index.js', '/home/suresh-dhwani/citifinance-node-api/node_modules/@azure/core-http/dist/index.js', '/home/suresh-dhwani/citifinance-node-api/node_modules/@azure/storage-blob/dist/index.js', '/home/suresh-dhwani/citifinance-node-api/service/blob_service.js', '/home/suresh-dhwani/citifinance-node-api/service/getBlobUrl.js', '/home/suresh-dhwani/citifinance-node-api/service/common.js', '/home/suresh-dhwani/citifinance-node-api/service/index.js', '/home/suresh-dhwani/citifinance-node-api/app.js', '/home/suresh-dhwani/citifinance-node-api/server.js' ] } |
The comments for this issue seem to have begun to be unrelated If you are experiencing an issue, please open an new issue, rather than commenting here |
internal/modules/cjs/loader.js:983
throw err;
^
Error: Cannot find module 'D:\Bryan Durán\Desktop\chat-javascript-fullstack-master\index.js'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:980:15)
:12)
at internal/main/run_main_module.js:18:47 {
code: 'MODULE_NOT_FOUND',
requireStack: []
The text was updated successfully, but these errors were encountered: