Skip to content
This repository has been archived by the owner on Aug 16, 2022. It is now read-only.

Cant get Started following the docs procedure... #102

Open
joshiparthin opened this issue Oct 25, 2018 · 2 comments
Open

Cant get Started following the docs procedure... #102

joshiparthin opened this issue Oct 25, 2018 · 2 comments

Comments

@joshiparthin
Copy link

Just made the project structure following the docs:
https://github.com/frappe/frappejs/blob/master/docs/app.md

Cant get started with it... throwing some error:

$ ./node_modules/.bin/frappe start 
path.js:28
    throw new TypeError('Path must be a string. Received ' + inspect(path));
    ^

TypeError: Path must be a string. Received undefined
    at assertPath (path.js:28:11)
    at Object.resolve (path.js:1171:7)
    at resolveAppDir (/Users/parthjoshi/work/code/frappejs/node_modules/frappejs/webpack/utils.js:37:15)
    at getConfig (/Users/parthjoshi/work/code/frappejs/node_modules/frappejs/webpack/config.js:81:27)
    at Object.<anonymous> (/Users/parthjoshi/work/code/frappejs/node_modules/frappejs/webpack/serve.js:14:23)
    at Module._compile (module.js:652:30)
    at Object.Module._extensions..js (module.js:663:10)
    at Module.load (module.js:565:32)
    at tryModuleLoad (module.js:505:12)
    at Function.Module._load (module.js:497:3)
Parths-MacBook-Pro:frappejs parthjoshi$ ./node_modules/.bin/frappe start src/main.js 
path.js:28
    throw new TypeError('Path must be a string. Received ' + inspect(path));
    ^

TypeError: Path must be a string. Received undefined
    at assertPath (path.js:28:11)
    at Object.resolve (path.js:1171:7)
    at resolveAppDir (/Users/parthjoshi/work/code/frappejs/node_modules/frappejs/webpack/utils.js:37:15)
    at getConfig (/Users/parthjoshi/work/code/frappejs/node_modules/frappejs/webpack/config.js:81:27)
    at Object.<anonymous> (/Users/parthjoshi/work/code/frappejs/node_modules/frappejs/webpack/serve.js:14:23)
    at Module._compile (module.js:652:30)
    at Object.Module._extensions..js (module.js:663:10)
    at Module.load (module.js:565:32)
    at tryModuleLoad (module.js:505:12)
    at Function.Module._load (module.js:497:3)

@mr-karan
Copy link

mr-karan commented Nov 1, 2018

+1 same issue. Looks like we need to check for undefined in resolveAppDir in utils.js ?

Something like this, works:

function resolveAppDir(...args) {
  for (let arg of args) {
    if (arg != undefined) {
      return path.resolve(getAppDir(), ...args);
    }
  }
}

@mr-karan
Copy link

mr-karan commented Nov 1, 2018

Actually, the issue is in old frappe.conf.js in docs and the new structure used in the repo. entryHtml srcDir values were undefined.

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

No branches or pull requests

2 participants