SyntaxError: Invalid or unexpected token (express)
See original GitHub issueHow 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
Issue Analytics
- State:
- Created 7 years ago
- Comments:5
Top Results From Across the Web
Nodejs SyntaxError: Invalid or unexpected - Stack Overflow
OK. I found the solution to this issue. The thing is that I created the index.js file in my project using PowerShell's Out-File...
Read more >Have a JavaScript Unexpected Token Error? Check Your Syntax
The Unexpected Token error is a specific type of SyntaxError object. Why Does an Unexpected Token Occur? JavaScript is particular about the way ......
Read more >Nodejs Uncaught SyntaxError: Unexpected token import
An unexpected token import occurs when an error message appears in the console while running a web application.
Read more >JavaScript SyntaxError: Invalid or unexpected token ... - IBM
I have an urgent problem with client side human service which runs in a rendering javascript issue. I am on v8.5.7 - no...
Read more >SyntaxError: Unexpected token import in Node.js | bobbyhadz
The "SyntaxError: Unexpected token import" occurs when we use the ES6 import syntax in a version of Node that doesn't support it. To...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
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:
Issue Fixed![screenshot from 2019-02-01 16-15-12](https://user-images.githubusercontent.com/34771766/52118593-bc445980-263c-11e9-9e38-08f6bfb75307.png)
Change the encoding of your file (UTF-8 )