I'm trying to execute the following command grunt build but when trying it the below error message appear
PS C:\Users\EDMA\Documents\Tutenlabs\Bitbucket\tuten-macarena-backoffice-web> grunt build
C:\Users\EDMA\AppData\Roaming\nvm\v6.16.0\node_modules\grunt-cli\node_modules\micromatch\index.js:44
let isMatch = picomatch(String(patterns[i]), { ...options, onResult }, true);
^^^
SyntaxError: Unexpected token ...
at createScript (vm.js:56:10)
at Object.runInThisContext (vm.js:97:10)
at Module._compile (module.js:549:28)
at Object.Module._extensions..js (module.js:586:10)
at Module.load (module.js:494:32)
at tryModuleLoad (module.js:453:12)
at Function.Module._load (module.js:445:3)
at Module.require (module.js:504:17)
at require (internal/module.js:20:19)
at Object.<anonymous> (C:\Users\EDMA\AppData\Roaming\nvm\v6.16.0\node_modules\grunt-cli\node_modules\findup-sync\index.js:12:10)
I navigate to C:\Users\EDMA\AppData\Roaming\nvm\v6.16.0\node_modules\grunt-cli\node_modules\micromatch\index.js:44 path and looked for index.js file to check whether there's an error or not, but the strange thing is there isn't. Any idea what's going on here?
Aditionally, this is AngularJS.
Related
When I put in the code
const mongoose = require("mongoose")
I get back the following error:
/Users/user/shares3/node_modules/mongodb/lib/utils.js:1069
catch {
^
SyntaxError: Unexpected token {
at createScript (vm.js:80:10)
at Object.runInThisContext (vm.js:139:10)
at Module._compile (module.js:616:28)
at Object.Module._extensions..js (module.js:663:10)
at Module.load (module.js:565:32)
at tryModuleLoad (module.js:505:12)
at Function.Module._load (module.js:497:3)
at Module.require (module.js:596:17)
at require (internal/module.js:11:18)
at Object.<anonymous> (/Users/user/shares3/node_modules/mongodb/lib/operations/add_user.js:6:17)
This code is as simple as could be. I have tried reinstalling the mongoose package.
Do you have any ideas on how I can troubleshoot this?
The issue is caused by using a (very) old version of Node.js that doesn't support try/catch.
Yo guys!
I get early a job on a legacy app, using gulpjs
After having installed all dependencies, when I try execute the application with "gulp server", get the following error at console:
D:\scripts\node_modules\gulp-sass\index.js:186
).toString();
^
SyntaxError: Unexpected token )
at createScript (vm.js:56:10)
at Object.runInThisContext (vm.js:97:10)
at Module._compile (module.js:549:28)
at Object.Module._extensions..js (module.js:586:10)
at Module.load (module.js:494:32)
at tryModuleLoad (module.js:453:12)
at Function.Module._load (module.js:445:3)
at Module.require (module.js:504:17)
at require (internal/module.js:20:19)
at Object.<anonymous> (D:\Playkids\playkids-simple-pages\scripts\tasks\development.js:4:12)
I`ve just started to learn nodejs and react and I am trying to build bundle using webpack and I receive next error. How can I make it work?
C:\Users\Admin\WebstormProjects\reactandwebpacktests>webpack
C:\Users\Admin\WebstormProjects\reactandwebpacktests\node_modules\v8-compile-cache\v8-compile-cache.js:161
return mod.npm require(id);
^^^^^^^
SyntaxError: Unexpected identifier
?[90m at wrapSafe (internal/modules/cjs/loader.js:1054:16)?[39m
?[90m at Module._compile (internal/modules/cjs/loader.js:1102:27)?[39m
?[90m at Object.Module._extensions..js (internal/modules/cjs/loader.js:1158:10)?[39m
?[90m at Module.load (internal/modules/cjs/loader.js:986:32)?[39m
?[90m at Function.Module._load (internal/modules/cjs/loader.js:879:14)?[39m
?[90m at Module.require (internal/modules/cjs/loader.js:1026:19)?[39m
I am relatively new to coding so I followed a simple tutorial on how to create a Discord bot, but when I try to start it by using the command node bot.js in Command Prompt, I get this error:
SyntaxError: Invalid or unexpected token
at new Script (vm.js:73:7)
at createScript (vm.js:245:10)
at Object.runInThisContext (vm.js:297:10)
at Module._compile (internal/modules/cjs/loader.js:657:28)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:700:10)
at Module.load (internal/modules/cjs/loader.js:599:32)
at tryModuleLoad (internal/modules/cjs/loader.js:538:12)
at Function.Module._load (internal/modules/cjs/loader.js:530:3)
at Function.Module.runMain (internal/modules/cjs/loader.js:742:12)
at startup (internal/bootstrap/node.js:266:19)
Can someone please help me prevent this error from occurring?
I've installed a weexpack project.
When I am trying to run the command weexpack run web It's showing error.
module.js:442
throw err;
^
Error: Cannot find module '../src/run/Web'
at Function.Module._resolveFilename (module.js:440:15)
at Function.Module._load (module.js:388:25)
at Module.require (module.js:468:17)
at require (internal/module.js:20:19)
at Object. (/home/dev03/.nvm/versions/node/v6.2.1/lib/node_modules/weexpack/bin/weexpack-run:7:16)
at Module._compile (module.js:541:32)
at Object.Module._extensions..js (module.js:550:10)
at Module.load (module.js:458:32)
at tryModuleLoad (module.js:417:12)
at Function.Module._load (module.js:409:3)
Can anyone help me with it?
As mentioned by #zahidul-islam-suzon in the comment above, it looks like this is a case sensitivity bug in weexpack: https://github.com/weexteam/weex-pack/issues/148#issuecomment-302861410
It can be fixed by renaming /usr/local/lib/node_modules/weexpack/src/run/web.js (or wherever your weexpack is installed) to Web.js.