Skip to content
This repository has been archived by the owner on Jan 20, 2024. It is now read-only.

npm problem? #11

Open
jotjot opened this issue Feb 2, 2021 · 5 comments
Open

npm problem? #11

jotjot opened this issue Feb 2, 2021 · 5 comments

Comments

@jotjot
Copy link

jotjot commented Feb 2, 2021

Hi!
I am trying to run Fiduswriter using docker with the image latest-stable (I have tries several others with similar results) but it always fails. I have tried running on a Synology with the lastes version of DSM and on MacOS.

Any suggestion?

Thank you.

This is the error log:
*** Running as user fiduswriter ...
*** Starting server ...
npm WARN deprecated [email protected]: WARNING: This project has been renamed to @vivliostyle/print. Install using @vivliostyle/print instead.
npm ERR! Linux 4.19.121-linuxkit
npm ERR! argv "/usr/bin/node" "/usr/bin/npm" "install"
npm ERR! node v8.10.0
npm ERR! npm v3.5.2
npm ERR! code EMISSINGARG

npm ERR! typeerror Error: Missing required argument #1
npm ERR! typeerror at andLogAndFinish (/usr/share/npm/lib/fetch-package-metadata.js:31:3)
npm ERR! typeerror at fetchPackageMetadata (/usr/share/npm/lib/fetch-package-metadata.js:51:22)
npm ERR! typeerror at resolveWithNewModule (/usr/share/npm/lib/install/deps.js:456:12)
npm ERR! typeerror at /usr/share/npm/lib/install/deps.js:457:7
npm ERR! typeerror at /usr/share/npm/node_modules/iferr/index.js:13:50
npm ERR! typeerror at /usr/share/npm/lib/fetch-package-metadata.js:37:12
npm ERR! typeerror at addRequestedAndFinish (/usr/share/npm/lib/fetch-package-metadata.js:82:5)
npm ERR! typeerror at returnAndAddMetadata (/usr/share/npm/lib/fetch-package-metadata.js:117:7)
npm ERR! typeerror at pickVersionFromRegistryDocument (/usr/share/npm/lib/fetch-package-metadata.js:134:20)
npm ERR! typeerror at /usr/share/npm/node_modules/iferr/index.js:13:50
npm ERR! typeerror This is an error with npm itself. Please report this error at:
npm ERR! typeerror http://github.com/npm/npm/issues

npm ERR! Please include the following file with any support request:
npm ERR! /fiduswriter/npm-debug.log
cp: cannot stat 'node_modules/katex/dist/katex.min.css': No such file or directory
cp: cannot stat 'node_modules/katex/dist/fonts': No such file or directory
Bundling KaTeX
Transpiling...
Transpiling app.mjs.
Traceback (most recent call last):
File "manage.py", line 28, in
execute_from_command_line(sys.argv)
File "/home/fiduswriter/.local/lib/python3.6/site-packages/django/core/management/init.py", line 381, in execute_from_command_line
utility.execute()
File "/home/fiduswriter/.local/lib/python3.6/site-packages/django/core/management/init.py", line 375, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/home/fiduswriter/.local/lib/python3.6/site-packages/django/core/management/base.py", line 316, in run_from_argv
self.execute(*args, **cmd_options)
File "/home/fiduswriter/.local/lib/python3.6/site-packages/django/core/management/base.py", line 353, in execute
output = self.handle(*args, **options)
File "/fiduswriter/base/management/commands/runserver.py", line 39, in handle
self.inner_run(*args, **options)
File "/fiduswriter/base/management/commands/runserver.py", line 44, in inner_run
call_command("transpile")
File "/home/fiduswriter/.local/lib/python3.6/site-packages/django/core/management/init.py", line 148, in call_command
return command.execute(*args, **defaults)
File "/home/fiduswriter/.local/lib/python3.6/site-packages/django/core/management/base.py", line 353, in execute
output = self.handle(*args, **options)
File "/home/fiduswriter/.local/lib/python3.6/site-packages/npm_mjs/management/commands/transpile.py", line 248, in handle
"--cachefile", cachefile
File "/usr/lib/python3.6/subprocess.py", line 356, in check_output
**kwargs).stdout
File "/usr/lib/python3.6/subprocess.py", line 423, in run
with Popen(*popenargs, **kwargs) as process:
File "/usr/lib/python3.6/subprocess.py", line 729, in init
restore_signals, start_new_session)
File "/usr/lib/python3.6/subprocess.py", line 1364, in _execute_child
raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: '/fiduswriter/node_modules/.bin/browserifyinc': '/fiduswriter/node_modules/.bin/browserifyinc'

@jonnymauser76
Copy link

Hi there,
same issue over here. tried with latest and latest stable

*** Running as user fiduswriter ...
*** Starting server ...
Transpiling...
Transpiling admin_console.mjs.
Traceback (most recent call last):
File "manage.py", line 28, in
execute_from_command_line(sys.argv)
File "/home/fiduswriter/.local/lib/python3.6/site-packages/django/core/management/init.py", line 381, in execute_from_command_line
utility.execute()
File "/home/fiduswriter/.local/lib/python3.6/site-packages/django/core/management/init.py", line 375, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/home/fiduswriter/.local/lib/python3.6/site-packages/django/core/management/base.py", line 316, in run_from_argv
self.execute(*args, **cmd_options)
File "/home/fiduswriter/.local/lib/python3.6/site-packages/django/core/management/base.py", line 353, in execute
output = self.handle(*args, **options)
File "/fiduswriter/base/management/commands/runserver.py", line 39, in handle
self.inner_run(*args, **options)
File "/fiduswriter/base/management/commands/runserver.py", line 44, in inner_run
call_command("transpile")
File "/home/fiduswriter/.local/lib/python3.6/site-packages/django/core/management/init.py", line 148, in call_command
return command.execute(*args, **defaults)
File "/home/fiduswriter/.local/lib/python3.6/site-packages/django/core/management/base.py", line 353, in execute
output = self.handle(*args, **options)
File "/home/fiduswriter/.local/lib/python3.6/site-packages/npm_mjs/management/commands/transpile.py", line 248, in handle
"--cachefile", cachefile
File "/usr/lib/python3.6/subprocess.py", line 356, in check_output
**kwargs).stdout
File "/usr/lib/python3.6/subprocess.py", line 423, in run
with Popen(*popenargs, **kwargs) as process:
File "/usr/lib/python3.6/subprocess.py", line 729, in init
restore_signals, start_new_session)
File "/usr/lib/python3.6/subprocess.py", line 1364, in _execute_child
raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: '/fiduswriter/node_modules/.bin/browserifyinc': '/fiduswriter/node_modules/.bin/browserifyinc'

@jonnymauser76
Copy link

Hi again,
setting transpiling to False in configurations.py actually helped in my case. Seems to work now.

@jotjot
Copy link
Author

jotjot commented Feb 13, 2021

Thank you!

@almereyda
Copy link

almereyda commented Apr 12, 2021

As transpilation actively helps reducing the size of the assets that are served to the users, it is not encouraged to disable it for production instances.

Following on with fiduswriter/fiduswriter#1097 it turned out that updating the base image to a more recent Ubuntu helped resolving that issue. Please see #10 for an Ubuntu 20.04 based Fidus Writer container. Eventually that helps to resolve your issue, too?

@jonnymauser76
Copy link

Thanks, actually it did.

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

3 participants