Skip to content
This repository has been archived by the owner on Apr 17, 2023. It is now read-only.

Webpack::Rails::Manifest::ManifestLoadError in Auth::Registrations#new #1245

Closed
rzcastilho opened this issue Mar 13, 2017 · 19 comments
Closed

Comments

@rzcastilho
Copy link

Hi everyone,

After checkout latest Portus version, I followed the basic steps to configure with command bellow.

./compose-setup.sh -e <my_domain>

Everything works fine, but, when I access the url http://<my_domain>:3000, I get the error bellow.

Webpack::Rails::Manifest::ManifestLoadError in Auth::Registrations#new
Showing /portus/app/views/layouts/authentication.html.slim where line #6 raised:

Could not load compiled manifest from /portus/public/assets/webpack/manifest.json - have you run `rake webpack:compile`? (original error No such file or directory @ rb_sysopen - /portus/public/assets/webpack/manifest.json)
@vitoravelino
Copy link
Contributor

vitoravelino commented Mar 13, 2017

@rodrigozc

I'm assuming you are trying to run everything on development environment, right?

You need to run yarn install and then webpack --watch --config config/webpack.js. Not sure if restarting the web container is necessary.

Webpack must also be installed globally. I guess yarn add global webpack should do the job, if not try npm install webpack -g.

These steps are still missing on docs. Sorry for that.

/cc @mssola

@mssola
Copy link
Collaborator

mssola commented Mar 13, 2017

That is correct. I need to update the docker-compose setup for this.

@rzcastilho
Copy link
Author

Thanks @vitoravelino and @mssola

@lukeshaughnessy
Copy link

Could you please clarify where/how to install webpack.js? I tried execing into the web container and running the npm command, and it failed to resolve the problem.

@vitoravelino
Copy link
Contributor

@lukeshaughnessy try executing from outside the web container.

@mssola
Copy link
Collaborator

mssola commented Mar 15, 2017

As @vitoravelino points out, running this outside of the container should work because the source code is shared in a volume. That being said, I'll add documentation and all that asap.

@lukeshaughnessy
Copy link

docker exec -it portus_web_1 /usr/bin/npm install webpack -g
docker restart portus_web_1

Issue persists. Perhaps I am misunderstanding?

@vitoravelino
Copy link
Contributor

There's no difference between docker exec and entering the container and running the command. When we meant outside we mean not related to docker.

@lukeshaughnessy
Copy link

I assume then that you mean running npm install webpack -g on the host operating system? This also does not work. I am quite confused. How does running this outside the container provide whatever files are needed in the volume? Could you please provide more specific details for this workaround?

@post707
Copy link

post707 commented Mar 16, 2017

@rodrigozc Hi, solved yet?

@Diokuz
Copy link
Contributor

Diokuz commented Mar 20, 2017

I think having local webpack is better #1256
especially when you already have it in node_modules

@ajeetraina
Copy link

ajeetraina commented Apr 1, 2017

I tried the below steps on Alpine Host OS and Fixed the issue:

(Please note that you need to run the below commands on the host machine and NOT on the docker container)

  1. echo -e 'http://dl-cdn.alpinelinux.org/alpine/edge/main\nhttp://dl-cdn.alpinelinux.org/alpine /edge/community\nhttp://dl-cdn.alpinelinux.org/alpine/edge/testing' > /etc/apk/repositories
  2. apk add --no-cache nodejs-current yarn
  3. yarn install
  4. yarn add global webpack
  5. yarn install
  6. apk add --update nodejs nodejs-npm && npm install npm@latest -g
  7. npm install webpack -g
  8. webpack --watch --config config/webpack.js

Done. Portus is up and running.

@mssola mssola mentioned this issue Apr 10, 2017
@kvalev
Copy link

kvalev commented Apr 21, 2017

I had to execute the following steps on Ubuntu 16.04 to fix the issue (after installing node/npm using this tutorial).

npm install -g webpack yarn
yarn install
webpack --watch --config config/webpack.js

@andrey01
Copy link

andrey01 commented Jun 6, 2017

Another quickie for zealous folks:

cd Portus/; docker run -it --rm -v "$PWD":/usr/src/app -w /usr/src/app --entrypoint sh node:8-alpine -c 'npm install -g webpack yarn && yarn install && webpack --watch --config config/webpack.js'

docker-compose

  webpack:
    image: node:8-alpine
    command: sh -c "npm install -g webpack yarn && yarn install && webpack --watch --config config/webpack.js"
    working_dir: /portus
    volumes:
      - .:/portus

@vagharsh
Copy link

vagharsh commented Jun 9, 2017

@kvalev on which container are you running those lines ?

@kvalev
Copy link

kvalev commented Jun 9, 2017

@vagharsh I did that on the host machine before executing compose-setup.sh.

@Geekays
Copy link

Geekays commented Jul 4, 2017

@andrey01 Thanks. The command that you wrote helps me to run. But could not get the compose file. Should I merge this to the docke-compose inside the Portus folder? If I add it at the bottom, it still is not working.

@mliradelc
Copy link

Hi, just downloaded portus to try it and I have the same problem, When the developers will upgrade the repository??

They are loosing the oportunity with a bad demo code from more than 1 moth ago.

@mssola
Copy link
Collaborator

mssola commented Jul 10, 2017

I have just updated the code and the documentation:

  • The portus web page will tell you how to manage containerized setups after merging Added containerized setup #1312.
  • The wiki has been updated with a new page, explaining how to build the frontend assets.
  • The PR Added an examples directory #1254 has been merged. This brings lots of changes, but most importantly: it allows the docker-compose setup to automatically call webpack, so this issue is resolved; and it adds some examples both for development and production. Note that quite a lot of things changed (mainly because of the new image). I've also updated the documentation to reflect on this.

Hopefully with this the situation has been improved. Sorry for the delay.

I'm closing this issue, since it has already been fixed, but feel free to leave comments if you have any further doubts.

@mssola mssola closed this as completed Jul 10, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests