# Content of web root

**URL:** https://discuss.tryton.org/t/content-of-web-root/2188
**Category:** User
**Created:** [January 16, 2020, 11:37am UTC](https://discuss.tryton.org/t/content-of-web-root/2188 "2020-01-16T11:37:04Z")
**Posts on this page:** 12
**Page:** 1

<div class="post-metadata">

### Author: ![ratatouille](https://discuss-cdn.tryton.org/letter_avatar_proxy/v4/letter/r/57b2e6/32.png) [@ratatouille](https://discuss.tryton.org/u/ratatouille)
#### Post date: [January 16, 2020, 11:37am UTC](https://discuss.tryton.org/t/content-of-web-root/2188/1 "2020-01-16T11:37:04Z")

</div>

I have one more question for now. In the configfile I read  
[web]  
listen = 0.0.0.0:8000  
root = /usr/share/tryton-sao/www

but there is no /usr/share/tryton-sao folder. What do I miss?

calling localhost:8000 I get

# Method Not Allowed

The method is not allowed for the requested URL.

Thank you!

---

<div class="post-metadata">

### Author: ![ced](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/ced/32/1237_2.png) [@ced](https://discuss.tryton.org/u/ced)
#### Post date: [January 16, 2020, 11:46am UTC](https://discuss.tryton.org/t/content-of-web-root/2188/2 "2020-01-16T11:46:36Z")

</div>

> [@ratatouille](#):
>
> root = /usr/share/tryton-sao/www

I do not know from where such value come from but the `[web] root` path should point to the web client (aka sao) source code.  
You may find it at [tryton-sao - npm](https://www.npmjs.com/package/tryton-sao) and installed in the directory pointed by the configuration.

---

<div class="post-metadata">

### Author: ![ratatouille](https://discuss-cdn.tryton.org/letter_avatar_proxy/v4/letter/r/57b2e6/32.png) [@ratatouille](https://discuss.tryton.org/u/ratatouille)
#### Post date: [January 16, 2020, 1:18pm UTC](https://discuss.tryton.org/t/content-of-web-root/2188/3 "2020-01-16T13:18:30Z")

</div>

I did a /usr/bin/npm i tryton-sao and get

> tryton-sao@5.0.18 postinstall /home/andreas/node\_modules/tryton-sao  
> bower install

bower ESUDO Cannot be run with sudo

Additional error details:  
Since bower is a user command, there is no need to execute it with superuser permissions.  
If you’re having permission errors when using bower without sudo, please spend a few minutes learning more about how your system should work and make any necessary repairs.

[http://www.joyent.com/blog/installing-node-and-npm](http://www.joyent.com/blog/installing-node-and-npm)

> <https://gist.github.com/isaacs/579814>

You can however run a command with sudo using “–allow-root” option  
npm WARN enoent ENOENT: no such file or directory, open ‘/home/andreas/package.json’  
npm WARN andreas No description  
npm WARN andreas No repository field.  
npm WARN andreas No README data  
npm WARN andreas No license field.  
npm ERR! Linux 4.15.0-74-generic  
npm ERR! argv “/usr/bin/node” “/usr/bin/npm” “i” “tryton-sao”  
npm ERR! node v8.10.0  
npm ERR! npm v3.5.2  
npm ERR! code ELIFECYCLE

npm ERR! tryton-sao@5.0.18 postinstall: `bower install`  
npm ERR! Exit status 1  
npm ERR!  
npm ERR! Failed at the tryton-sao@5.0.18 postinstall script ‘bower install’.  
npm ERR! Make sure you have the latest version of node.js and npm installed.  
npm ERR! If you do, this is most likely a problem with the tryton-sao package,  
npm ERR! not with npm itself.  
npm ERR! Tell the author that this fails on your system:  
npm ERR! bower install  
npm ERR! You can get information on how to open an issue for this project with:  
npm ERR! npm bugs tryton-sao  
npm ERR! Or if that isn’t available, you can get their info via:  
npm ERR! npm owner ls tryton-sao  
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:  
npm ERR! /home/andreas/npm-debug.log

Where is /usr/bin/npm i tryton-sao to be executed from? And do I call it to fix the error with bower above?

…  
31699 silly install printInstalled  
31700 warn enoent ENOENT: no such file or directory, open ‘/home/andreas/package.json’  
31701 warn andreas No description  
31702 warn andreas No repository field.  
31703 warn andreas No README data  
31704 warn andreas No license field.  
31705 verbose stack Error: tryton-sao@5.0.18 postinstall: `bower install`  
31705 verbose stack Exit status 1  
31705 verbose stack at EventEmitter. (/usr/share/npm/lib/utils/lifecycle.js:232:16)  
31705 verbose stack at emitTwo (events.js:126:13)  
31705 verbose stack at EventEmitter.emit (events.js:214:7)  
31705 verbose stack at ChildProcess. (/usr/share/npm/lib/utils/spawn.js:24:14)  
31705 verbose stack at emitTwo (events.js:126:13)  
31705 verbose stack at ChildProcess.emit (events.js:214:7)  
31705 verbose stack at maybeClose (internal/child\_process.js:925:16)  
31705 verbose stack at Process.ChildProcess.\_handle.onexit (internal/child\_process.js:209:5)  
31706 verbose pkgid tryton-sao@5.0.18  
31707 verbose cwd /home/andreas  
31708 error Linux 4.15.0-74-generic  
31709 error argv “/usr/bin/node” “/usr/bin/npm” “i” “tryton-sao”  
31710 error node v8.10.0  
31711 error npm v3.5.2  
31712 error code ELIFECYCLE  
31713 error tryton-sao@5.0.18 postinstall: `bower install`  
31713 error Exit status 1  
31714 error Failed at the tryton-sao@5.0.18 postinstall script ‘bower install’.  
31714 error Make sure you have the latest version of node.js and npm installed.  
31714 error If you do, this is most likely a problem with the tryton-sao package,  
31714 error not with npm itself.  
31714 error Tell the author that this fails on your system:  
31714 error bower install  
31714 error You can get information on how to open an issue for this project with:  
31714 error npm bugs tryton-sao  
31714 error Or if that isn’t available, you can get their info via:  
31714 error npm owner ls tryton-sao  
31714 error There is likely additional logging output above.  
31715 verbose exit [1, true]

---

<div class="post-metadata">

### Author: ![ced](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/ced/32/1237_2.png) [@ced](https://discuss.tryton.org/u/ced)
#### Post date: [January 16, 2020, 1:38pm UTC](https://discuss.tryton.org/t/content-of-web-root/2188/4 "2020-01-16T13:38:06Z")

</div>

> [@ratatouille](#):
>
> bower ESUDO Cannot be run with sudo

Yeps, bower does not like to be execute as root.

> [@ratatouille](#):
>
> Where is /usr/bin/npm i tryton-sao to be executed from?

Indeed from anywhere you like, it will create a `node_modules` folder which contains `tryton-sao` to which the `[web] root` should point.

---

<div class="post-metadata">

### Author: ![ratatouille](https://discuss-cdn.tryton.org/letter_avatar_proxy/v4/letter/r/57b2e6/32.png) [@ratatouille](https://discuss.tryton.org/u/ratatouille)
#### Post date: [January 16, 2020, 2:00pm UTC](https://discuss.tryton.org/t/content-of-web-root/2188/5 "2020-01-16T14:00:18Z")

</div>

That worked out!  
exept  
bower eonasdan-bootstrap-datetimepicker#^4.17 invalid-meta for:/tmp/andreas/bower/76bd398ee7174f6f95c3ab9b1ab3c397-12541-QGbkF4/bower.json  
bower eonasdan-bootstrap-datetimepicker#^4.17 invalid-meta The “main” field cannot contain minified files  
bower eonasdan-bootstrap-datetimepicker#^4.17 invalid-meta The “main” field cannot contain minified files  
and  
npm WARN enoent ENOENT: no such file or directory, open ‘/home/andreas/package.json’

package.json lives in ~/node\_modules/bower.

Thank you!

---

<div class="post-metadata">

### Author: ![ratatouille](https://discuss-cdn.tryton.org/letter_avatar_proxy/v4/letter/r/57b2e6/32.png) [@ratatouille](https://discuss.tryton.org/u/ratatouille)
#### Post date: [January 16, 2020, 4:41pm UTC](https://discuss.tryton.org/t/content-of-web-root/2188/6 "2020-01-16T16:41:27Z")

</div>

So in /var/www/node\_modules/tryton-sao there is no folder www.  
I now executed npm install --production in /var/www/node\_modules/tryton-sao but got an error:  
…  
npm WARN deprecated nomnom@1.8.1: Package no longer supported. Contact [support@npmjs.com](mailto:support@npmjs.com) for more info.  
npm ERR! Linux 4.15.0-74-generic  
npm ERR! argv “/usr/bin/node” “/usr/bin/npm” “install” “–production”  
npm ERR! node v8.10.0  
npm ERR! npm v3.5.2

npm ERR! Cannot read property ‘target’ of null  
npm ERR!  
npm ERR! If you need help, you may report this error at:  
npm ERR! [https://github.com/npm/npm/issues](https://github.com/npm/npm/issues)

npm ERR! Please include the following file with any support request:  
npm ERR! /var/www/node\_modules/tryton-sao/npm-debug.log

What’s wrong?

---

<div class="post-metadata">

### Author: ![ced](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/ced/32/1237_2.png) [@ced](https://discuss.tryton.org/u/ced)
#### Post date: [January 16, 2020, 4:47pm UTC](https://discuss.tryton.org/t/content-of-web-root/2188/7 "2020-01-16T16:47:30Z")

</div>

> [@ratatouille](#):
>
> So in /var/www/node\_modules/tryton-sao there is no folder www.

Why do you want a folder `www` ?

> [@ratatouille](#):
>
> I now executed npm install --production in /var/www/node\_modules/tryton-sao

Why do you run that?

The content of `tryton-sao` folder should contain everything after the installation.

---

<div class="post-metadata">

### Author: ![ratatouille](https://discuss-cdn.tryton.org/letter_avatar_proxy/v4/letter/r/57b2e6/32.png) [@ratatouille](https://discuss.tryton.org/u/ratatouille)
#### Post date: [January 16, 2020, 4:59pm UTC](https://discuss.tryton.org/t/content-of-web-root/2188/8 "2020-01-16T16:59:09Z")

</div>

I don’t need a folder www 😉 Just saw the line root = /usr/share/tryton-sao/www in trytond.conf and was not sure about what is needed.  
Now I have it like that root = /var/www/node\_modlules/tryton-sao and was hoping I can connect to localhost:8000 but get

# Method Not Allowed

The method is not allowed for the requested URL.

---

<div class="post-metadata">

### Author: ![ced](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/ced/32/1237_2.png) [@ced](https://discuss.tryton.org/u/ced)
#### Post date: [January 16, 2020, 5:00pm UTC](https://discuss.tryton.org/t/content-of-web-root/2188/9 "2020-01-16T17:00:42Z")

</div>

> [@ratatouille](#):
>
> Just saw the line root = /usr/share/tryton-sao/www in trytond.conf

Where does this file come from? Tryton does not ship any configuration file at all.

> [@ratatouille](#):
>
> Now I have it like that root = /var/www/node\_modlules/tryton-sao and was hoping I can connect to localhost:8000 but get

I do not think it is the proper path. It seems there is a typo.

---

<div class="post-metadata">

### Author: ![ratatouille](https://discuss-cdn.tryton.org/letter_avatar_proxy/v4/letter/r/57b2e6/32.png) [@ratatouille](https://discuss.tryton.org/u/ratatouille)
#### Post date: [January 16, 2020, 5:39pm UTC](https://discuss.tryton.org/t/content-of-web-root/2188/10 "2020-01-16T17:39:58Z")

</div>

Yes, typo. s/modlules/modules . Now I can login at localhost:8000 Great!  
What I now need is a docu how to start with and understand the ERP.

---

<div class="post-metadata">

### Author: ![bala4901](https://discuss-cdn.tryton.org/letter_avatar_proxy/v4/letter/b/fbc32d/32.png) [@bala4901](https://discuss.tryton.org/u/bala4901)
#### Post date: [January 18, 2020, 1:13pm UTC](https://discuss.tryton.org/t/content-of-web-root/2188/11 "2020-01-18T13:13:49Z")

</div>

For www folder, in docker default config is using www folder.

---

<div class="post-metadata">

### Author: ![system](https://discuss-cdn.tryton.org/uploads/default/original/1X/c6f8ec0a40525cdcd50058c734283450a4b3d38b.png) [@system](https://discuss.tryton.org/u/system)
#### Post date: [February 17, 2020, 1:13pm UTC](https://discuss.tryton.org/t/content-of-web-root/2188/12 "2020-02-17T13:13:54Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
