-
Notifications
You must be signed in to change notification settings - Fork 24
Linux server error: Unexpected reserved word #36
Comments
@rockthrower69 Please provide your environment and steps |
I had nodejs already installed. I executed "sudo apt-get update" before executing the server. When I just execute "node server.js" I get this error. root@rpi-anton-1:/home/pi/agar-mini-map-master/server/src# node server.js /home/pi/agar-mini-map-master/server/src/server.js:1 module.js:434 Appearently "import" isn't correct NodeJS syntax. Maybe I have to install something before? |
You should execute |
Your node version is out-of-date. Upgrade your node package to v0.12 or upper. |
"npm run build" is what I tried before, but I also got errors. When I try to update NodeJS "nodejs is already the newest version.". |
/home/pi/agar-mini-map-master/server# npm run build
sh: 1: babel: not found npm ERR! [email protected] build: |
You have to run rockthrower69 [email protected] 於 2015年8月15日週六 上午2:10 寫道:
|
/home/pi/agar-mini-map-master/server# npm install npm ERR! Error: No compatible version found: object-assign@'^3.0.0' |
Your node version is out of date. Please try to reinstall it |
Already updated and reinstalled it. It stays the same version and says it is the highest. I use apt-get to install node and npm. |
What is your Linux distribution? If your package manager does not provide the latest Node.js, you might want to build Node.js from source by yourself. I believe that all problems will be solved as long as you install the latest Node. |
After encountering the above, and other, problems, and eventually getting agar-mini-map running on the Raspberry Pi, I thought I would leave the following comments for any others following in my footsteps:
|
Hello,
I tried setting up the NodeJS server on my Raspberry Pi, and I got this error.
/home/pi/agar-mini-map-master/server/dist/server.js:1
import { Server
^^^^^^
module.js:434
var compiledWrapper = runInThisContext(wrapper, filename, true);
^
SyntaxError: Unexpected reserved word
at Module._compile (module.js:434:25)
at Object..js (module.js:464:10)
at Module.load (module.js:353:32)
at Function._load (module.js:311:12)
at Array.0 (module.js:484:10)
at EventEmitter._tickCallback (node.js:190:39)
npm ERR! [email protected] start:
node dist/server.js
npm ERR!
sh "-c" "node dist/server.js"
failed with 1npm ERR!
npm ERR! Failed at the [email protected] start script.
npm ERR! This is most likely a problem with the mini-map-server package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node dist/server.js
npm ERR! You can get their info via:
npm ERR! npm owner ls mini-map-server
npm ERR! There is likely additional logging output above.
npm ERR!
npm ERR! System Linux 3.18.12+
npm ERR! command "/usr/bin/nodejs" "/usr/bin/npm" "run" "start"
npm ERR! cwd /home/pi/agar-mini-map-master/server
npm ERR! node -v v0.6.19
npm ERR! npm -v 1.1.4
npm ERR! code ELIFECYCLE
npm ERR! message [email protected] start:
node dist/server.js
npm ERR! message
sh "-c" "node dist/server.js"
failed with 1npm ERR! errno {}
npm WARN This failure might be due to the use of legacy binary "node"
npm WARN For further explanations, please read
npm WARN /usr/share/doc/nodejs/README.Debian
npm WARN
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /home/pi/agar-mini-map-master/server/npm-debug.log
npm not ok
Why am I receiving this error? Is it my fault or is it the server itself?
The text was updated successfully, but these errors were encountered: