ERROR: Cannot find module '../node-v11-darwin-x64/node_sqlite3.node'

node cannot find local module
error: cannot find module node windows
error: cannot find module imported from
error cannot find module heapdump
error: cannot find module discord
error: cannot find module angular
error: cannot find module 'pg'
error: cannot find module 'express'

There is a production version of Ghost blogging platform with content and style changes on our server. I downloaded the blog's app folder to my local machine. The instructions seem straight forward.

Quickstart:
  1. npm install -g grunt-cli
  2. npm install
  3. grunt init (and grunt prod if you want to run Ghost in production mode)
  4. npm start

But when I run grunt init I get the following:

Running "shell:bower" (shell) task

module.js:340
    throw err;
      ^
Error: Cannot find module 'q'
at Function.Module._resolveFilename (module.js:338:15)
at Function.Module._load (module.js:280:25)
at Module.require (module.js:364:17)
at require (module.js:380:17)
at Object.<anonymous> (/Users/steelcollar/workspace/blog/node_modules/.bin/bower:6:9)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Function.Module.runMain (module.js:497:10)
Warning: Command failed:
module.js:340
    throw err;
      ^
Error: Cannot find module 'q'
at Function.Module._resolveFilename (module.js:338:15)
at Function.Module._load (module.js:280:25)
at Module.require (module.js:364:17)
at require (module.js:380:17)
at Object.<anonymous> (/Users/steelcollar/workspace/blog/node_modules/.bin/bower:6:9)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Function.Module.runMain (module.js:497:10)
Use --force to continue.

Eventually, running npm start leads to:

ERROR: Cannot find module '../node_modules/sqlite3/lib/binding/node-v11-darwin-x64/node_sqlite3.node'

I have bower and grunt installed. I haven't changed the code at all. Where could the problem be?

Update:

According to the folder structure I downloaded, the path is ../node-v11-linux-x64/node_sqlite3.node' instead of ../node-v11-darwin-x64/node_sqlite3.node'.

I am receiving this error if I change the folder name from darwin to linux though:

ERROR: dlopen(../node_modules/sqlite3/lib/binding/node-v11-darwin-x64/node_sqlite3.node, 1): no suitable image found.  Did find:
../node_modules/sqlite3/lib/binding/node-v11-darwin-x64/node_sqlite3.node: unknown file type, first eight bytes: 0x7F 0x45 0x4C 0x46 0x02 0x01 0x01 0x00

Hi I had the same situation and this is how I solved it:

On the local computer, simply npm uninstall sqlite3 and npm install sqlite3 --save, and it should work normally now.

I'm not sure why it's like this. But I think it's because the versions of sqlite3 each OS requires are different, simply downloading the app directory from server to local computer will result in incompatibility issue, so just let npm decide which version of sqlite3 to install.

How to solve "Error: Cannot find module '*.js'" with Node.js , Introduction. If you are trying to run your Node.js application and you get something like this: Error: Cannot find module 'C:\Users\Me\my_app.js'. Error: Cannot find module 'C:\Users\Me\my_app.js' then you are most likely trying to run the wrong file. It is possible you are missing a dependency that is needed from npm install, but if it says it cannot find the main file you are trying to run, then you are trying to run a file that does not exist. It is a common mistake.

I got the same error. This didn't work:

yarn remove sqlite3 && yarn add sqlite3

Then I tried this, which did:

npm uninstall sqlite3 && npm install sqlite3

Uncaught Error: Cannot find module "." � Issue #4921 � webpack , Do you want to request a feature or report a bug? bug What is the current behavior? Below exception: polyfills.js:1 Error: Cannot find module ". When I open my Discord, it sometimes doesnt work. After a while it gives me the message that the shortcut to my discord.exe doesn't exist anymore. Next time that I start up my laptop it gives me the error: Error: cannot find module build_info.json.

The correct answer to this would be to run npm rebuild. This will rebuild all the bindings relevant to the current project, especially after updates.

require.resolve "Error: Cannot find module" even though package , require.resolve "Error: Cannot find module" even though package folder exists # 29549. Closed. TotallyInformation opened this issue on Sep 13, 2019 � 3� I am getting the below mentioned error when i execute ng s --open command Cannot find module '@angular/compiler-cli' Error: Cannot find module '@angular/compiler-cli

Node.JS: Error Cannot find module [SOLVED] – imcodebased, Even though I have installed my npm package globally, I receive the following error : Error: Cannot find module 'color' at Function.Module. Node.js Error: Cannot find module 'request' Ask Question Asked 5 years, 5 months ago. Active 1 year, 1 month ago. Viewed 27k times 5. Ok so this is a

JS Action: Cannot find module - GitHub Learning Lab, <font color="#000000">Error: Cannot find module 'request-promise'</font>. I assumed that any dependencies would be automatically installed� Stack Overflow for Teams is a private, secure spot for you and your coworkers to find and share information. Learn more heroku Error: Cannot find module '/app/index.js'

Error: Cannot find module 'newman' Require stack: - Help, Hi Everyone, I just installed newman and able to run postman-collection test cases with the command line. However, when I try to create� Error: Cannot find module 'less' Ask Question Asked 4 years, 1 month ago. Active 3 years, 6 months ago. Viewed 3k times 1. When running command: "C:\ Program Files

Comments
  • Are you running this on Linux or OSX?
  • I am running this on OSX.
  • It sounds like for some reason, it installed and compiled the binary for Linux instead of OSX. I have no idea why it would have done that though.