Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SyntaxError: Invalid or unexpected token (express) #244

Closed
medelasri opened this issue Nov 17, 2016 · 5 comments
Closed

SyntaxError: Invalid or unexpected token (express) #244

medelasri opened this issue Nov 17, 2016 · 5 comments

Comments

@medelasri
Copy link

How to solve this error??

vagrant@med:~/modal.dev$ npm run dev
> modaljs@1.0.0 dev /home/vagrant/modal.dev
> node build/dev-server.js

/home/vagrant/modal.dev/node_modules/express/lib/application.js:370
  return

SyntaxError: Invalid or unexpected token
    at Object.exports.runInThisContext (vm.js:76:16)
    at Module._compile (module.js:542:28)
    at Object.Module._extensions..js (module.js:579:10)
    at Module.load (module.js:487:32)
    at tryModuleLoad (module.js:446:12)
    at Function.Module._load (module.js:438:3)
    at Module.require (module.js:497:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> (/home/vagrant/modal.dev/node_modules/express/lib/express.js:17:13)
    at Module._compile (module.js:570:32)

npm ERR! Linux 3.2.0-23-generic-pae
npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "run" "dev"
npm ERR! node v6.9.1
npm ERR! npm  v3.10.8
npm ERR! code ELIFECYCLE
npm ERR! modaljs@1.0.0 dev: `node build/dev-server.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the modaljs@1.0.0 dev script 'node build/dev-server.js'.
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 modaljs package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node build/dev-server.js
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs modaljs
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls modaljs
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /home/vagrant/modal.dev/npm-debug.log
@shailuk
Copy link

shailuk commented Feb 16, 2017

Hello,
I just started learning nodejs.
I installed node js and tried to run a simple hello world program. I am getting this error which appears in the screenshot. Please help me resolve. Thanks.

screen shot 2017-02-15 at 7 01 35 pm

@ghost
Copy link

ghost commented Jun 25, 2017

i have this problem too :(

@pwichmann
Copy link

pwichmann commented Nov 17, 2017

Arrived here by accident.
I think you copied code from the MacOS Notes and your quotes were transformed into weird quotes instead of the only two allowed types:

  • "
  • '

What you have is:

@jamsheedpk
Copy link

Issue Fixed
screenshot from 2019-02-01 16-15-12

Change the encoding of your file (UTF-8 )

@abirrugal
Copy link

Don't make file by out-file command,, make file by new-item command from windows shell.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants