TypeError: Cannot set property 'siteName' of undefined

Everything is on the title, I’m trying to run this code from Jose Rocha https://github.com/joserocha3/uncharted-d3

But I don’t have enough xp with meteor to understand this error

TypeError: Cannot set property 'siteName' of undefined at module (imports/api/users.js:55:5) at fileEvaluate (packages\modules-runtime.js:336:7) at Module.require (packages\modules-runtime.js:238:14) at Module.moduleLink [as link] (C:\...\Local\.meteor\packages\modules\0.15.0\npm\node_modules\reify\lib\runtime\index.js:52:22) at module (imports/startup/server/main.jsx:1:1) at fileEvaluate (packages\modules-runtime.js:336:7) at Module.require (packages\modules-runtime.js:238:14) at Module.moduleLink [as link] (C:\...\Local\.meteor\packages\modules\0.15.0\npm\node_modules\reify\lib\runtime\index.js:52:22) at module (server/main.js:1:8) at fileEvaluate (packages\modules-runtime.js:336:7) at Module.require (packages\modules-runtime.js:238:14) at require (packages\modules-runtime.js:258:21) at E:\test\uncharted\.meteor\local\build\programs\server\app\app.js:1305:1 at E:\test\uncharted\.meteor\local\build\programs\server\boot.js:401:38 at Array.forEach (<anonymous>) at E:\test\uncharted\.meteor\local\build\programs\server\boot.js:226:21 Exited with code: 1 Your application is crashing. Waiting for file change.

From where could come this error?

Can you paste here what’s in imports/api/users.js around line 55?

1 Like

Yes sure this is the num 6 line here :slight_smile:

import {Meteor} from 'meteor/meteor'
import {Accounts} from 'meteor/accounts-base'
import {check} from 'meteor/check'
if (Meteor.isServer) {
...
 Accounts.emailTemplates.siteName = ''
    Accounts.emailTemplates.from = 'Password Reset <contact@nomoreanalog.com>'
    Accounts.emailTemplates.resetPassword.subject = (user) => 'Reset Password Link for ' + user.username
    Accounts.emailTemplates.resetPassword.html = (user, url) => {
...

thank your for your interest on my topic :slight_smile: I try for days to find a working exemple with meteor+react+D3 and this source seems to be a really nice one

In the file .meteor/packages do you have accounts-password?

Yup… sometime the solution is not that complex, I forgot to copy the packages on .meteor/package from the original ghitub code. Thank you!

Now I’ve got a new problem, I think there is no end xD It will be a miracle if I run it

Error: A method named 'MeteorToys' is already defined
    at packages/ddp-server/livedata_server.js:1595:15
    at Function._.each._.forEach (packages\underscore.js:147:22)
    at Server.methods (packages/ddp-server/livedata_server.js:1591:7)
    at packages\meteortoys_shell.js:27:956
    at packages\meteortoys_shell.js:30:4
    at packages\meteortoys_shell.js:34:4
    at packages\meteortoys_shell.js:40:3
    at E:\test\uncharted\.meteor\local\build\programs\server\boot.js:401:38
    at Array.forEach (<anonymous>)
    at E:\test\uncharted\.meteor\local\build\programs\server\boot.js:226:21
    at E:\test\uncharted\.meteor\local\build\programs\server\boot.js:464:7
    at Function.run (E:\test\uncharted\.meteor\local\build\programs\server\profile.js:280:14)
    at E:\test\uncharted\.meteor\local\build\programs\server\boot.js:463:13
Exited with code: 1
Your application is crashing. Waiting for file change.

I also did’nt fix this one yet :slight_smile:

Unable to resolve some modules:

  "url" in /E/ERP/uncharted2/node_modules/xmlhttprequest/lib/XMLHttpRequest.js (web.browser.legacy)
  "child_process" in /E/ERP/uncharted2/node_modules/xmlhttprequest/lib/XMLHttpRequest.js (web.browser.legacy)
  "fs" in /E/ERP/uncharted2/node_modules/xmlhttprequest/lib/XMLHttpRequest.js (web.browser.legacy)
  "http" in /E/ERP/uncharted2/node_modules/xmlhttprequest/lib/XMLHttpRequest.js (web.browser.legacy)
  "https" in /E/ERP/uncharted2/node_modules/xmlhttprequest/lib/XMLHttpRequest.js (web.browser.legacy)

If you notice problems related to these missing modules, consider running:

  meteor npm install --save meteor-node-stubs

But I’m unable to install it from npm,

npm ERR! code ENOENT
npm ERR! syscall spawn git
npm ERR! path git
npm ERR! errno ENOENT
npm ERR! enoent Error while executing:
npm ERR! enoent undefined ls-remote -h -t https://github.com/meteor/readable-stream.git
npm ERR! enoent
npm ERR! enoent
npm ERR! enoent spawn git ENOENT
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent