Verifying deploy failed: "SyntaxError: Unexpected" while Mup builds to NGINX? - javascript

Trying to build a meteor app through mup to the digitalOceans droplet, which runs on Nginx.
During this process, I always stack on deployment verifictation.
nodejs & node version: v4.8.4
npm version: 2.15.11
Error:
x Verifying Deployment: FAILED
-----------------------------------STDERR-----------------------------------
WARN package.json meteor-dev-bundle#0.0.0 No description
npm WARN package.json meteor-dev-bundle#0.0.0 No repository field.
npm WARN package.json meteor-dev-bundle#0.0.0 No README data
npm WARN cannot run in wd meteor-dev-bundle#0.0.0 node npm-rebuild.js (wd=/bundle/bundle/programs/server)
=> Starting meteor app on port:80
/bundle/bundle/programs/server/mini-files.js:82
const unicodeNormalizePath = (path) => {
^
SyntaxError: Unexpected token >
at Module._compile (module.js:439:25)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Module.require (module.js:364:17)
at require (module.js:380:17)
at Object.<anonymous> (/bundle/bundle/programs/server/boot.js:9:13)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
=> Redeploying previous version of the app
-----------------------------------STDOUT-----------------------------------
To see more logs type 'mup logs --tail=100'
----------------------------------------------------------------------------
And here is logs:https://pastebin.com/zs8FG86V
Thank you!

Fixed it, by changing docker image, from 'kadirahq/meteord' to 'abernix/meteord:base' in mup.js file.

Related

"[BABEL] Cannot find module" on a fresh PC install

I'm setting up my dev environment on a fresh system. In my project folder:
npm install
npm run serve
And got this:
Module build failed (from ./node_modules/babel-loader/lib/index.js):
Error: [BABEL] /Users/user/Documents/project/editor/src/main.js: Cannot find module '#babel/compat-data/corejs3-shipped-proposals'
Require stack:
- /Users/user/Documents/project/editor/node_modules/#babel/preset-env/lib/polyfills/corejs3/usage-plugin.js
- /Users/user/Documents/project/editor/node_modules/#babel/preset-env/lib/index.js
- /Users/user/Documents/project/editor/node_modules/#vue/babel-preset-app/index.js
- /Users/user/Documents/project/editor/node_modules/#vue/cli-plugin-babel/preset.js
- /Users/user/Documents/project/editor/node_modules/#babel/core/lib/config/files/plugins.js
- /Users/user/Documents/project/editor/node_modules/#babel/core/lib/config/files/index.js
- /Users/user/Documents/project/editor/node_modules/#babel/core/lib/index.js
- /Users/user/Documents/project/editor/node_modules/#vue/cli-plugin-babel/index.js
- /Users/user/Documents/project/editor/node_modules/#vue/cli-service/lib/Service.js
- /Users/user/Documents/project/editor/node_modules/#vue/cli-service/bin/vue-cli-service.js (While processing: "/Users/user/Documents/project/editor/node_modules/#vue/cli-plugin-babel/preset.js")
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:966:15)
at Function.Module._load (internal/modules/cjs/loader.js:842:27)
at Module.require (internal/modules/cjs/loader.js:1026:19)
at require (internal/modules/cjs/helpers.js:72:18)
at Object.<anonymous> (/Users/user/Documents/project/editor/node_modules/#babel/preset-env/lib/polyfills/corejs3/usage-plugin.js:10:55)
at Module._compile (internal/modules/cjs/loader.js:1138:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1158:10)
at Module.load (internal/modules/cjs/loader.js:986:32)
at Function.Module._load (internal/modules/cjs/loader.js:879:14)
at Module.require (internal/modules/cjs/loader.js:1026:19)
at require (internal/modules/cjs/helpers.js:72:18)
at Object.<anonymous> (/Users/user/Documents/project/editor/node_modules/#babel/preset-env/lib/index.js:29:44)
at Module._compile (internal/modules/cjs/loader.js:1138:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1158:10)
at Module.load (internal/modules/cjs/loader.js:986:32)
at Function.Module._load (internal/modules/cjs/loader.js:879:14)
# multi (webpack)-dev-server/client?http://192.168.0.105:8080/sockjs-node (webpack)/hot/dev-server.js ./src/main.js
I checked in node_modules/#babel/compat-data/ and the module is there. Why doesn't webpack (is it webpack?) see it?
Note that I did the same thing on another system a few weeks ago and it worked fine.
I also have a vuepress project on the same new system and it also runs fine.
Thanks
In project folder:
rm package_lock.json
rm -r node_modules
npm install
Turns out I had package_lock.json on git from another system. Removed it and it worked.
you can remove the lock files generated (package-lock.json)
and then remove the node modules from your project.
And then again try to download the dependencies via npm
as npm install

Node - Tried to run the file "server.js" through CLI by typing node server.js but it shows message as Cannot find module

Find Visual Studio Code application where I tried to run the file. Things look fine but it says cannot find module. Find my terminal output below along with screenshot in "Node Program"
F:\Git Clone\Node.js_From 31Oct2019\IBM-Developer\Node.js\Course\Unit-6>node server.js
internal/modules/cjs/loader.js:638
throw err;
^
Error: Cannot find module 'sqlite3'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:636:15)
at Function.Module._load (internal/modules/cjs/loader.js:562:25)
at Module.require (internal/modules/cjs/loader.js:692:17)
at require (internal/modules/cjs/helpers.js:25:18)
at Object.<anonymous> (F:\Git Clone\Node.js_From 31Oct2019\IBM-Developer\Node.js\Course\Unit-6\utils\utils.js:23:17)
at Module._compile (internal/modules/cjs/loader.js:778:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
at Module.load (internal/modules/cjs/loader.js:653:32)
at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
at Function.Module._load (internal/modules/cjs/loader.js:585:3)
Node Program
You have to run npm i and then restart your application and vs code.
Install NPM by typing npm i and then restart your application

Get a error missing modules on the terminal

I want to make a new project running npm install -g create-react-app on the folder directory. After doing this I get the following error:
module.js:487
throw err;
^
Error: Cannot find module '../package.json'
at Function.Module._resolveFilename (module.js:485:15)
at Function.Module._load (module.js:437:25)
at Module.require (module.js:513:17)
at require (internal/module.js:11:18)
at /usr/local/lib/node_modules/npm/bin/npm-cli.js:30:15
at Object.<anonymous> (/usr/local/lib/node_modules/npm/bin/npm-cli.js:92:3)
at Module._compile (module.js:569:30)
at Object.Module._extensions..js (module.js:580:10)
at Module.load (module.js:503:32)
at tryModuleLoad (module.js:466:12)
Your question is not very precise. You should give more details about what you are doing.
Still, here are some suggestions. Make sure:
You run the command from within the folder, where your package.json is located.
If you have not created a package.json yet, run npm init
Your package.json is a valid format and readable

gitlab pipeline fails during build

I'm new to using gitlab CI. I am deploying a gulp website through gitlab and everything works fine locally, and deployes without errors, up until my latest commit. I get the following error during pipeline build on gitlab.
npm info lifecycle undefined~preshrinkwrap: undefined
npm info lifecycle undefined~shrinkwrap: undefined
npm info lifecycle undefined~postshrinkwrap: undefined
npm info ok
up to date in 7.152s
$ ./scripts/build_website.sh
module.js:487
throw err;
^
Error: Cannot find module 'gulp-sass'
at Function.Module._resolveFilename (module.js:485:15)
at Function.Module._load (module.js:437:25)
at Module.require (module.js:513:17)
at require (internal/module.js:11:18)
at Module._compile (module.js:569:30)
at Object.Module._extensions..js (module.js:580:10)
at Module.load (module.js:503:32)
at tryModuleLoad (module.js:466:12)
at Function.Module._load (module.js:458:3)
ERROR: Job failed: exit code 1
I will appreciate any help on this problem.
Thanks in advance

Node-Red Pm2 Setup

I am trying to start my node-red on a raspberry pi 2 using pm2. I am using the startup command:
pm2 start /usr/bin/node-red-pi --node-args="--max-old-space-size=128" -- -v
At first it seems to work:
But unfortunatly then it errors:
Thats the log:
SyntaxError: Unexpected token ILLEGAL
at exports.runInThisContext (vm.js:53:16)
at Module._compile (module.js:373:25)
at Object.Module._extensions..js (module.js:404:10)
at Module.load (module.js:343:32)
at Function.Module._load (module.js:300:12)
at Function._load (/usr/local/lib/node_modules/pm2/node_modules/pmx/lib/transaction.js:62:21)
at Object.<anonymous> (/usr/local/lib/node_modules/pm2/lib/ProcessContainerFork.js:28:21)
at Module._compile (module.js:397:26)
at Object.Module._extensions..js (module.js:404:10)
at Module.load (module.js:343:32)
Please make sure you installed the latest PM2 version (>2.x):
$ npm install pm2#latest -g
$ pm2 update
Then start node-red again, it should works as expected:
pm2 start node-red --node-args="--max-old-space-size=128" -- -v

Categories

Resources