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 in "/tutorial/our-application/2 #21

Closed
yangfan16 opened this issue May 5, 2020 · 1 comment
Closed

Error: Cannot find module in "/tutorial/our-application/2 #21

yangfan16 opened this issue May 5, 2020 · 1 comment

Comments

@yangfan16
Copy link

docker build success , but docker run error , dashboard logs:

# success
sudo docker build -t getting-started .
# fail 
sudo docker run -dp 3000:3000 getting-started

emmm ,I try to run the program on my mac is normal sudo node app/src/index.js

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

Error: Cannot find module '/app/app/node_modules/sqlite3/lib/binding/node-v72-linux-x64/node_sqlite3.node'
Require stack:
- /app/app/node_modules/sqlite3/lib/sqlite3.js
- /app/app/src/persistence/sqlite.js
- /app/app/src/persistence/index.js
- /app/app/src/index.js
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:957:15)
    at Function.Module._load (internal/modules/cjs/loader.js:840:27)
    at Module.require (internal/modules/cjs/loader.js:1019:19)
    at require (internal/modules/cjs/helpers.js:77:18)
    at Object.<anonymous> (/app/app/node_modules/sqlite3/lib/sqlite3.js:4:15)
    at Module._compile (internal/modules/cjs/loader.js:1133:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1153:10)
    at Module.load (internal/modules/cjs/loader.js:977:32)
    at Function.Module._load (internal/modules/cjs/loader.js:877:14)
    at Module.require (internal/modules/cjs/loader.js:1019:19) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [
    '/app/app/node_modules/sqlite3/lib/sqlite3.js',
    '/app/app/src/persistence/sqlite.js',
    '/app/app/src/persistence/index.js',
    '/app/app/src/index.js'
  ]
}
@StefanScherer
Copy link
Member

Thanks for reporting. We've fixed several things in the tutorial. Please update your local copy, or start again from the beginning. Also the image on Docker Hub represents more up-to-date version of the tutorial.

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

No branches or pull requests

2 participants