When i run
vegan#vegan:~/xx-xx/gateway$ webdriver-manager start /usr/lib/node_modules/protractor/node_modules/webdriver-manager/built/lib/cli/logger.js:66
info(...msgs) {
^^^
SyntaxError: Unexpected token ...
at exports.runInThisContext (vm.js:53:16)
at Module._compile (module.js:387:25)
at Object.Module._extensions..js (module.js:422:10)
at Module.load (module.js:357:32)
at Function.Module._load (module.js:314:12)
at Module.require (module.js:367:17)
at require (internal/module.js:20:19)
at Object. (/usr/lib/node_modules/protractor/node_modules/webdriver-manager/built/lib/cli/index.js:8:10)
at Module._compile (module.js:413:34)
at Object.Module._extensions..js (module.js:422:10)
i got error. It started when protractor doesnot run.
the error was that
Protractor error selenium spring boot
but this time updating version, did not work. So i did npm install, bower gulp install after i deleing node module file.
now for gulp run ( i use gulp to run protractor), i got this
> gulp protractor prod [15:47:58] Using gulpfile
> ~/xx-xx/gateway/gulpfile.js [15:47:58] Starting 'protractor'...
> [15:47:58] Starting 'prod'... [15:47:58] Finished 'prod' after 547 μs
> Using ChromeDriver directly... [launcher] Running 1 instances of
> WebDriver [launcher] Error: SyntaxError: Unexpected token ...
> at exports.runInThisContext (vm.js:53:16)
> at Module._compile (module.js:387:25)
> at Object.Module._extensions..js (module.js:422:10)
> at Module.load (module.js:357:32)
> at Function.Module._load (module.js:314:12)
> at Module.require (module.js:367:17)
> at require (internal/module.js:20:19)
> at Object.<anonymous> (/home/vegan/xx-xx/gateway/node_modules/jasminewd2/index.js:7:17)
> at Module._compile (module.js:413:34)
> at Object.Module._extensions..js (module.js:422:10) [launcher] Process exited with error code 100 [15:47:59] gulp-notify: [JHipster
> Gulp Build] Error: protractor exited with code 100 [15:47:59] Finished
> 'protractor' after 1.19 s [15:47:59] E2E Tests failed
UPDATE
i deleted all node modules and did npm install again. Now when i do
**webdriver-manager it gives errors
**
webdriver-manager
/usr/lib/node_modules/protractor/node_modules/webdriver-manager/built/lib/cli/logger.js:66
info(...msgs) {
^^^
SyntaxError: Unexpected token ...
at exports.runInThisContext (vm.js:53:16)
at Module._compile (module.js:387:25)
at Object.Module._extensions..js (module.js:422:10)
at Module.load (module.js:357:32)
at Function.Module._load (module.js:314:12)
at Module.require (module.js:367:17)
at require (internal/module.js:20:19)
at Object.<anonymous> (/usr/lib/node_modules/protractor/node_modules/webdriver-manager/built/lib/cli/index.js:8:10)
at Module._compile (module.js:413:34)
at Object.Module._extensions..js (module.js:422:10)**
**
or for **webdriver-manager update
** same
It's due to you are using an older version of node. Please update your node version to min. 6.9.x and try it would certainly work.
Related
no matter what npm package I have, or try and install I keep getting this weird syntax error.
Users/BenNolan/.node/lib/node_modules/npm/lib/cli.js:66
module.exports = async process => {
^^^^^^^
SyntaxError: Unexpected identifier
at exports.runInThisContext (vm.js:53:16)
at Module._compile (module.js:414:25)
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)
at require (module.js:385:17)
at Object.<anonymous> (/Users/BenNolan/.node/lib/node_modules/npm/bin/npm-cli.js:2:1)
at Module._compile (module.js:435:26)
at Object.Module._extensions..js (module.js:442:10)
I have tried updating nvm, npm and node no matter what I try I am still getting the syntax error halfway through the install.
I have tried to reinstall VS code and Node but it did not work out.Please help!
Error While Creating -
C:\Users\ADMIN\Desktop\Projects>npx create-react-app my-app
C:\Users\ADMIN\Desktop\node_modules\fs-extra\lib\ensure\file.js:1
$→��m��mo�L�D��;�%g�?w��ŷ↓�▬��ovH0��a�5��*�ؒ��l͛�S�iy☺�r�O7����%L]��%��∟�hk
^
SyntaxError: Invalid or unexpected token
at Object.compileFunction (node:vm:352:18)
at wrapSafe (node:internal/modules/cjs/loader:1032:15)
at Module._compile (node:internal/modules/cjs/loader:1067:27)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1157:10)
at Module.load (node:internal/modules/cjs/loader:981:32)
at Function.Module._load (node:internal/modules/cjs/loader:822:12)
at Module.require (node:internal/modules/cjs/loader:1005:19)
at require (node:internal/modules/cjs/helpers:102:18)
at Object.<anonymous> (C:\Users\ADMIN\Desktop\node_modules\fs-extra\lib\ensure\index.js:3:40)
at Module._compile (node:internal/modules/cjs/loader:1103:14)
While Running -
C:\Users\ADMIN\Desktop\Projects\portfolio-website>npm start
> portfolio#0.1.0 start
> react-scripts start
Failed to compile.
Invalid or unexpected token
We have two build agents (Ubuntu 12.04), both have NodeJS 5 and Gulp 3.9 installed:
$ nodejs -v
v5.11.1
$ npm list | grep gulp
├─┬ gulp#3.9.1
But during gulp build - one agent works successfully, and other - return an error:
$ gulp build
/var/lib/go-agent/pipelines/Worker/gulpfile.js:3
let requireDir = require('require-dir');
^^^
SyntaxError: Unexpected strict mode reserved word
at exports.runInThisContext (vm.js:73:16)
at Module._compile (module.js:443:25)
at Object.Module._extensions..js (module.js:478:10)
at Module.load (module.js:355:32)
at Function.Module._load (module.js:310:12)
at Module.require (module.js:365:17)
at require (module.js:384:17)
at Object.<anonymous> (/usr/lib/node_modules/gulp/bin/gulp:19:19)
at Module._compile (module.js:460:26)
at Object.Module._extensions..js (module.js:478:10)
What could be wrong here?
Error initializing middleware
SyntaxError: Unexpected token ILLEGAL
at exports.runInThisContext (vm.js:53:16)
at Module._compile (module.js:387:25)
at Object.Module._extensions..js (module.js:422:10)
at Module.load (module.js:357:32)
at Function.Module._load (module.js:314:12)
at Function.cls_wrapMethod [as _load] node_modules/newrelic/lib/shimmer.js:246:38)
at Module.require (module.js:367:17)
at require (internal/module.js:20:19)
at Object.<anonymous> api/services/chargeService.js:3:23)
at Module._compile (module.js:413:34)
at Object.Module._extensions..js (module.js:422:10)
at Module.load (module.js:357:32)
at Function.Module._load (module.js:314:12)
at Function.cls_wrapMethod [as _load] node_modules/newrelic/lib/shimmer.js:246:38)
at Module.require (module.js:367:17)
at require (internal/module.js:20:19)
Unexpected token ILLEGAL seems I made a typo or forgot to comment out a line in one of my source files. but the error message is very unhelpful.
is there any generic tools for parsing messages like this?
This is callstack
Error initializing middleware <== graceful error message
SyntaxError: Unexpected token ILLEGAL <== raw error message
at exports.runInThisContext (vm.js:53:16) <== YOUR SCRIPT, CHECK HERE
at Module._compile (module.js:387:25) <== node script
at Object.Module._extensions.js (module.js) <== node script
at Module.load (module.js:357:32) <== node script
at Function.Module._load (module.js:314:12) <== node script
at Function.cls node_modules/.../shimmer.js) <== package script
at Module.require (module.js:367:17) <== node script
at require (internal/module.js:20:19) <== node script
at Object.<anonymous> api/services/chargeService.js:3:23) <== YOUR SCRIPT, CHECK HERE
at Module._compile (module.js:413:34) <== node script, etc
at Object.Module._extensions..js (module.js:422:10)
at Module.load (module.js:357:32)
at Function.Module._load (module.js:314:12)
at Function.cls_wrapMethod [as _load] node_modules/newrelic/lib/shimmer.js:246:38)
at Module.require (module.js:367:17)
at require (internal/module.js:20:19)
Usually node scripts and npm packages don't throw unexpected exceptions, they have tests, so first of all you have to check your files
at exports.runInThisContext (vm.js:53:16)
This means exports.runInThisContext function in file vm.js was executed previously exception catched
at Object.<anonymous> api/services/chargeService.js:3:23)
Same as above, object getter or setter was executed in file chargeService at line 3 column 23 before exception catched
I'm new to npm/node and I'm trying to build this repository:
https://github.com/react-component/slider
After clone and run npm install, I get this error:
/Users/rodrigora/Projects/slider/node_modules/rc-server/lib/index.js:39
app.get('/tests/runner.html', function* () {
^
SyntaxError: Unexpected token *
at exports.runInThisContext (vm.js:73:16)
at Module._compile (module.js:443:25)
at Object.Module._extensions..js (module.js:478:10)
at Module.load (module.js:355:32)
at Function.Module._load (module.js:310:12)
at Module.require (module.js:365:17)
at require (module.js:384:17)
at Object.<anonymous> (/Users/rodrigora/Projects/slider/node_modules/rc-server/bin/start.js:3:11)
at Module._compile (module.js:460:26)
at Object.Module._extensions..js (module.js:478:10)
I've reinstalled node/npm, deleted node_modules folder but nothing worked.
$ node -v
v0.12.0
$ npm -v
3.5.2
I don't have a clue how to fix it. Any help?