Comments (13)
I cloned vue app repo, then extracted vue-app-dist in the same folder (I saw dist directory appear) and tried to start with
npm run build
The output I posted comes from this procedure.
I will try to extract in a clean folder, then run
npm run build
EDIT: sorry now I understand: just copy, no need for npm run.
Will try tomorrow and post results, thanks again.
from backend.
What do you see if you try to access localhost:5000?
You have to place a build of the Vue app in a folder called "dist".
As the readme specifies:
New Vue web application: localhost:5000/ (assuming a vue-app build is placed in the
dist/
folder);
from backend.
Error is ERR_CONNECTION_REFUSED
.
Following instruction to setup a vue-app (sorry did not noticed), after cloning repo:
pi@coderbot:~/vue-app $ npm install
npm ERR! Error: Method Not Allowed
npm ERR! at errorResponse (/usr/share/npm/lib/cache/add-named.js:260:10)
npm ERR! at /usr/share/npm/lib/cache/add-named.js:203:12
npm ERR! at saved (/usr/share/npm/node_modules/npm-registry-client/lib/get.js:167:7)
npm ERR! at FSReqWrap.oncomplete (fs.js:82:15)
npm ERR! If you need help, you may report this *entire* log,
npm ERR! including the npm and node versions, at:
npm ERR! <http://github.com/npm/npm/issues>
npm ERR! System Linux 4.9.35-v7+
npm ERR! command "/usr/bin/nodejs" "/usr/bin/npm" "install"
npm ERR! cwd /home/pi/vue-app
npm ERR! node -v v4.8.2
npm ERR! npm -v 1.4.21
npm ERR! code E405
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /home/pi/vue-app/npm-debug.log
npm ERR! not ok code 0
from backend.
This is likely caused by a really old version of node/npm..
Are you trying to build the vue-app on the raspberry pi? This is discouraged and not supported, if you can, launch the build on another system then just move the dist folder on the raspberry.
However, you can find ready builds in the releases page of the vue-app repository, https://github.com/CoderBotOrg/vue-app/releases. Just download the more recent one and extract it, you should have the folder as if you built it yourself
from backend.
Downloaded vue-app-dist.tgz as suggested but
pi@coderbot:~/vue-app $ npm run build
[email protected] build /home/pi/vue-app
node build/build.js
module.js:339
throw err;
^
Error: Cannot find module 'chalk'
at Function.Module._resolveFilename (module.js:337:15)
at Function.Module._load (module.js:287:25)
at Module.require (module.js:366:17)
at require (module.js:385:17)
at Object. (/home/pi/vue-app/build/check-versions.js:2:15)
at Module._compile (module.js:435:26)
at Object.Module._extensions..js (module.js:442:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:311:12)
at Module.require (module.js:366:17)
npm ERR! [email protected] build: node build/build.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] build script.
npm ERR! This is most likely a problem with the vue-app package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node build/build.js
npm ERR! You can get their info via:
npm ERR! npm owner ls vue-app
npm ERR! There is likely additional logging output above.
npm ERR! System Linux 4.9.35-v7+
npm ERR! command "/usr/bin/nodejs" "/usr/bin/npm" "run" "build"
npm ERR! cwd /home/pi/vue-app
npm ERR! node -v v4.8.2
npm ERR! npm -v 1.4.21
npm ERR! code ELIFECYCLE
npm WARN This failure might be due to the use of legacy binary "node"
npm WARN For further explanations, please read
/usr/share/doc/nodejs/README.Debian
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /home/pi/vue-app/npm-debug.log
npm ERR! not ok code 0
I will try to compile on my machine. Thanks for support.
from backend.
Sorry, didn't make myself clear:
vue-app-dist.tgz already contains the built web application. Exract it and you should see a "dist" folder. Just move it in the backend folder and you're good to go.
if you want to manually build it, clone the vue-app repo and follow the instructions in the README (npm install, then npm run build)
from backend.
Exactly, the release contains the result of npm run build.
Let me know!
from backend.
I tried again but:
If I browse to http://localhost:5000/
Any hint?
from backend.
Try with coderbot.local
from backend.
I removed vue-app directory, created again and copied dist folder after fresh download of prebuilt binary.
Browsing to http://coderbot.local:5000 redirects to http://coderbot.local:5000/vue/index.html and returns this json:
{
"detail": "The requested URL was not found on the server. If you entered the URL manually please check your spelling and try again.",
"status": 404,
"title": "Not Found",
"type": "about:blank"
}
from backend.
This happens when the webserver can't find the vue-app build.
Are you sure you have a "dist" folder alongside the init.py script? and that folder contains the vue-app build (an index.html and some other files) ?
from backend.
Ok it works. I had the dist folder in vue-app, not coderbot.
Thank you very much, closing this issue.
from backend.
Gotcha, glad you figured that out
from backend.
Related Issues (20)
- The webcam view retains "print" commands from previous executions HOT 1
- I2C >> sudo echo "dtparam=i2c_arm=on" > /boot/config.txt
- connexion error HOT 4
- CoderBot SDcard Image HOT 1
- sleep block not working
- zbar lib no more working with python3 HOT 1
- find_text (Tesseract via OpenCV) is broken (again) HOT 1
- several opencv functions broken
- The default password must be changed on the first access HOT 2
- Unable to install requirements via pip3 install -r requirements_stub.txt HOT 3
- Include program purpose/brief documentation in (example) programs HOT 1
- Unable to change default view when configuring an activity HOT 1
- Newly created activity is not selectable HOT 2
- backend v4 incompatible with (old) v5 hardware
- Communicate with the coderbot using python HOT 2
- Fix tooltips on "vision" blocks HOT 2
- Add CONTRIBUTING document HOT 6
- video auto recording not supported by api v2
- remove "old" apis and UI
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from backend.