evertonrobertoauler/universal-demo-v5

Error: Cannot find module 'reflect-metadata'

Closed this issue · 2 comments

Hello,

i have run npm run build then node server.js

its return error

indianics-iMac:dist indianic$ node server.js
module.js:540
throw err;
^

Error: Cannot find module 'reflect-metadata'
at Function.Module._resolveFilename (module.js:538:15)
at Function.Module._load (module.js:468:25)
at Module.require (module.js:587:17)
at require (internal/module.js:11:18)
at Object. (/Volumes/DATA/Projects/NG4-seed-Test/dist/server.js:1:1338)
at n (/Volumes/DATA/Projects/NG4-seed-Test/dist/server.js:1:163)
at Object. (/Volumes/DATA/Projects/NG4-seed-Test/dist/server.js:1:713)
at n (/Volumes/DATA/Projects/NG4-seed-Test/dist/server.js:1:163)
at /Volumes/DATA/Projects/NG4-seed-Test/dist/server.js:1:513
at Object. (/Volumes/DATA/Projects/NG4-seed-Test/dist/server.js:1:522)
indianics-iMac:dist indianic$

Hi, you need to run the server.js script from the project root folder, like this:

node dist/server.js

➜ custom-metadata node dist/server.js
module.js:471
throw err;
^

Error: Cannot find module '/Users/newuser/custom-metadata/dist/server.js'
at Function.Module._resolveFilename (module.js:469:15)
at Function.Module._load (module.js:417:25)
at Module.runMain (module.js:604:10)
at run (bootstrap_node.js:394:7)
at startup (bootstrap_node.js:149:9)
at bootstrap_node.js:509:3