I'm having trouble deploying my application on the OpenShift platform.
It seems like it's bcrypt that fails but everything also seems to install properly.
I'm afraid I'll be having same trouble with every node module I wanna use.
I thought that may be, the problem is with the version of the node module.
Still I have no clue. I hope someone could help me find out what's going on.
I copy bellow my entire jenkins console output (note that I had the exact same output after my first git push on the OpenShift server).
Started by user Jenkins Admin Building remotely on nodejsbldr in workspace /var/lib/openshift/myPrivateWorkSpace/app-root/runtime/repo Checkout:repo / /var/lib/openshift/myPrivateWorkSpace/app-root/runtime/repo - hudson.remoting.Channel#129c587:nodejsbldr Using strategy: Default Checkout:repo / /var/lib/openshift/myPrivateWorkSpace/app-root/runtime/repo - hudson.remoting.LocalChannel#d1cdcd Wiping out workspace first. Cloning the remote Git repository Cloning repository origin Fetching upstream changes from ssh://mySshPrivateId#nodejs-caty.rhcloud.com/~/git/nodejs.git Seen branch in repository origin/HEAD Seen branch in repository origin/alpha Seen branch in repository origin/master Commencing build of Revision 26cbed22880b5ac3b5bab4b016dbc5fe75579792 (origin/alpha) Checking out Revision 26cbed22880b5ac3b5bab4b016dbc5fe75579792 (origin/alpha) No change to record in branch origin/alpha [repo] $ /bin/sh -xe /tmp/hudson154161094843280943.sh
+ source /usr/lib/openshift/cartridge_sdk/bash/sdk
++ '[' false == true ']'
++ OO_BASH_SDK=true
+ alias 'rsync=rsync --delete-after -az -e '\''/usr/libexec/openshift/cartridges/jenkins/bin/git_ssh_wrapper.sh'\'''
+ upstream_ssh=mySshPrivateId#nodejs-caty.rhcloud.com
+ rm -f /var/lib/openshift/myPrivateWorkSpace//app-deployments/current/metadata.json
+ marker_present force_clean_build
+ '[' -f /var/lib/openshift/myPrivateWorkSpace/app-root/runtime/repo//.openshift/markers/force_clean_build ']'
+ set +e
+ rsync --delete-after -az -e /usr/libexec/openshift/cartridges/jenkins/bin/git_ssh_wrapper.sh 'mySshPrivateId#nodejs-caty.rhcloud.com:$OPENSHIFT_BUILD_DEPENDENCIES_DIR' /var/lib/openshift/myPrivateWorkSpace/app-root/runtime/build-dependencies/
+ rsync --delete-after -az -e /usr/libexec/openshift/cartridges/jenkins/bin/git_ssh_wrapper.sh 'mySshPrivateId#nodejs-caty.rhcloud.com:$OPENSHIFT_DEPENDENCIES_DIR' /var/lib/openshift/myPrivateWorkSpace/app-root/runtime/dependencies/
+ set -e
+ gear build Building git ref 'origin/alpha', commit 26cbed2 Building NodeJS cartridge npm info it worked if it ends with ok npm info using npm#1.2.17 npm info using node#v0.10.5 npm info preinstall Caty#0.0.1a npm info build /var/lib/openshift/myPrivateWorkSpace/app-root/runtime/repo npm info linkStuff Caty#0.0.1a npm info build /var/lib/openshift/myPrivateWorkSpace/app-root/runtime/repo/node_modules/csrf npm info preinstall csrf#0.0.3 npm info linkStuff csrf#0.0.3 npm info install csrf#0.0.3 npm info postinstall csrf#0.0.3 npm info build /var/lib/openshift/myPrivateWorkSpace/app-root/runtime/repo/node_modules/session-mongoose npm info preinstall session-mongoose#0.4.1 npm info linkStuff session-mongoose#0.4.1 npm info install session-mongoose#0.4.1 npm info postinstall session-mongoose#0.4.1 npm info install Caty#0.0.1a npm info postinstall Caty#0.0.1a npm info prepublish Caty#0.0.1a npm info ok
+ /usr/libexec/openshift/cartridges/jenkins/bin/git_ssh_wrapper.sh mySshPrivateId#nodejs-caty.rhcloud.com 'gear stop --conditional
--exclude-web-proxy --git-ref gtiRefNum' Stopping gear... Stopping MongoDB cartridge Stopping NodeJS cartridge
++ /usr/libexec/openshift/cartridges/jenkins/bin/git_ssh_wrapper.sh mySshPrivateId#nodejs-caty.rhcloud.com 'gear create-deployment-dir'
+ deployment_dir=2014-03-12_22-42-14.111
+ rsync --delete-after -az -e /usr/libexec/openshift/cartridges/jenkins/bin/git_ssh_wrapper.sh /var/lib/openshift/myPrivateWorkSpace//app-deployments/current/metadata.json mySshPrivateId#nodejs-caty.rhcloud.com:app-deployments/2014-03-12_22-42-14.111/metadata.json
+ rsync --delete-after -az -e /usr/libexec/openshift/cartridges/jenkins/bin/git_ssh_wrapper.sh
--exclude .git /var/lib/openshift/myPrivateWorkSpace/app-root/runtime/repo/ mySshPrivateId#nodejs-caty.rhcloud.com:app-root/runtime/repo/
+ rsync --delete-after -az -e /usr/libexec/openshift/cartridges/jenkins/bin/git_ssh_wrapper.sh /var/lib/openshift/myPrivateWorkSpace/app-root/runtime/build-dependencies/ mySshPrivateId#nodejs-caty.rhcloud.com:app-root/runtime/build-dependencies/
+ rsync --delete-after -az -e /usr/libexec/openshift/cartridges/jenkins/bin/git_ssh_wrapper.sh /var/lib/openshift/myPrivateWorkSpace/app-root/runtime/dependencies/ mySshPrivateId#nodejs-caty.rhcloud.com:app-root/runtime/dependencies/
+ /usr/libexec/openshift/cartridges/jenkins/bin/git_ssh_wrapper.sh mySshPrivateId#nodejs-caty.rhcloud.com 'gear remotedeploy
--deployment-datetime 2014-03-12_22-42-14.111' Preparing build for deployment Deployment id is aa14cca3 Activating deployment Starting MongoDB cartridge Starting NodeJS cartridge
DEBUG: Running node-supervisor with DEBUG: program 'app.js' DEBUG:
--watch '.' DEBUG: --ignore 'undefined' DEBUG: --extensions 'node|js|coffee' DEBUG: --exec 'node'
DEBUG: Starting child process with 'node app.js' DEBUG: Watching directory '/var/lib/openshift/mySshPrivateId/app-root/runtime/repo' for changes. Failed to load c++ bson extension, using pure JS version
/var/lib/openshift/mySshPrivateId/app-root/runtime/repo/node_modules/bcrypt/node_modules/bindings/bindings.js:79
throw e
^ Error: /var/lib/openshift/mySshPrivateId/app-root/runtime/repo/node_modules/bcrypt/build/Release/bcrypt_lib.node: invalid ELF header
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 bindings (/var/lib/openshift/mySshPrivateId/app-root/runtime/repo/node_modules/bcrypt/node_modules/bindings/bindings.js:74:15)
at Object.<anonymous> (/var/lib/openshift/mySshPrivateId/app-root/runtime/repo/node_modules/bcrypt/bcrypt.js:1:97)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12) DEBUG: Program node app.js exited with code 8
DEBUG: Starting child process with 'node app.js' Archiving artifacts Finished: SUCCESS
The extracted quote about the versions :
using npm#1.2.17 npm info using node#v0.10.5
And my application dependencies list :
"dependencies": {
"express": "3.4.8",
"jade": "1.1.5",
"socket.io": "0.9.16",
"bcrypt": "0.7.7",
"colors": "0.6.2",
"connect": "2.13.0",
"connect-mongo": "0.4.0",
"cookie": "0.1.1",
"mongodb": "1.3.23",
"mongoose": "3.8.6"
},
Thanks in advance for anyone brave enough to risk his self into that bunch of infos. :)
I've had the same problem, I suspect that since I am working on a mac it is related to the OSX bcrypt compilation issue that is described here.
I have tried to remove the node_modules directory and let OpenShift run npm and download the dependencies again but for some reason that did not work for me.
I have ended up creating a new application and committing my repository while excluding the node_module folder which solved my problem.
Related
Okay so I have been trying to deploy a Next app to my Ubuntu 20.04 vps but I am unable to do so. I have uploaded all the files from my local machine to the server via ftp and then after trying to install it gets stuck and then killed ( please check the image to see where it gets stuck ). The app works perfectly in my local machine.
I tried by deleting .next directory, node_modules directory as well as package-lock.json file but the problem prevails.
Here's the Node and NPM version in my local machine:
Node: v14.15.0
NPM: v7.14.0
This is the Node and NPM version in my server:
Node: v14.18.2
NPM: v8.3.0
I have also attached my package.json file incase you want to see the dependencies
UPDATE
I some how installed the dependencies but now I am getting different type of errors when I run 'npm run dev' or 'npm run build'.
Here's what I get after I run npm run dev:
[20:09] [server1.example.com boomboom] # npm run dev
> boomboom#0.1.0 dev
> next dev
warn - Port 3000 is in use, trying 3001 instead.
ready - started server on 0.0.0.0:3001, url: http://localhost:3001
info - Loaded env from /home/user1/node-apps/boomboom/.env.local
error - ./node_modules/next/dist/build/webpack/loaders/css-loader/src/index.js??ruleSet[1].rules[2].oneOf[4].use[1]!./node_modules/next/dist/build/webpack/loaders/postcss-loader/src/index.js??ruleSet[1].rules[2].oneOf[4].use[2]!./styles/Footer.module.css
/home/user1/node-apps/boomboom/node_modules/source-map/lib/util.js:101
// above the root is a no-op. Therefore we can remove all '.
SyntaxError: Unexpected end of input
<w> [webpack.cache.PackFileCacheStrategy] Caching failed for pack: SyntaxError: /home/user1/node-apps/boomboom/node_modules/mongodb-connection-string-url/node_modules/whatwg-url/package.json (directory description file): SyntaxError: Unexpected end of JSON input
<w> while resolving 'whatwg-url' in /home/user1/node-apps/boomboom/node_modules/mongodb-connection-string-url to a directory
<w> [webpack.cache.PackFileCacheStrategy] Caching failed for pack: SyntaxError: /home/user1/node-apps/boomboom/node_modules/mongodb-connection-string-url/node_modules/whatwg-url/package.json (directory description file): SyntaxError: Unexpected end of JSON input
<w> while resolving 'whatwg-url' in /home/user1/node-apps/boomboom/node_modules/mongodb-connection-string-url to a directory
This is what I get after I run npm run build:
[20:13] [server1.example.com boomboom] # npm run build
> boomboom#0.1.0 build
> next build
info - Loaded env from /home/user1/node-apps/boomboom/.env.local
info - Checking validity of types
error - ESLint: Failed to load plugin 'react' declared in '.eslintrc.json » eslint-config-next/core-web-vitals » /home/user1/node-apps/boomboom/node_modules/eslint-config-next/index.js': Cannot find module 'eslint-plugin-react' Require stack: - /home/user1/node-apps/boomboom/node_modules/eslint-config-next/index.js Referenced from: /home/user1/node-apps/boomboom/node_modules/eslint-config-next/index.js
> Build error occurred
/home/user1/node-apps/boomboom/node_modules/source-map/lib/util.js:101
// above the root is a no-op. Therefore we can remove all '.
SyntaxError: Unexpected end of input
at wrapSafe (internal/modules/cjs/loader.js:1001:16)
at Module._compile (internal/modules/cjs/loader.js:1049:27)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1114:10)
at Module.load (internal/modules/cjs/loader.js:950:32)
at Function.Module._load (internal/modules/cjs/loader.js:790:12)
at Module.require (internal/modules/cjs/loader.js:974:19)
at require (internal/modules/cjs/helpers.js:93:18)
at Object.<anonymous> (/home/user1/node-apps/boomboom/node_modules/source-map/lib/source-map-generator.js:9:12)
at Module._compile (internal/modules/cjs/loader.js:1085:14)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1114:10)
info - Creating an optimized production build .[20:13] [server1.example.com boomboom] #
Using the npm install handbrake-js --save command, I installed handbrake-js as a library, and after some tweaking, handbrake-js started to do the job perfectly. And here's the problem. On the local computer everything works well, videos are decoded, etc. BUT (!) When I upload my application to Heroku, handbrake-js stops working.
HandBrake version:
5.0.2
Operating system and version:
macOS 10.15 Catalina
My application uses node js
Error message text:
Here is what information Heroku gives when deploy an application on Heroku:
Linux users
handbrake-cli must be installed separately as the root user.
Ubuntu users can do this using the following commands:
add-apt-repository --yes ppa: stebbins / handbrake-releases
apt-get update -qq
apt-get install -qq handbrake-cli
Heroku Log:
Here's what happens when you try to decode:
2020-12-02T18:34:14.124945+00:00 app[web.1]: Error: Command failed: "HandBrakeCLI" --input "public/images/02122020-123404_338-test.mov" --output "public/images/02122020-123404_338-test.mp4" --preset "Gmail Medium 5 Minutes 480p30"
2020-12-02T18:34:14.124948+00:00 app[web.1]: /bin/sh: 1: HandBrakeCLI: not found
2020-12-02T18:34:14.124948+00:00 app[web.1]:
2020-12-02T18:34:14.124949+00:00 app[web.1]: at ChildProcess.exithandler (child_process.js:308:12)
2020-12-02T18:34:14.124950+00:00 app[web.1]: at ChildProcess.emit (events.js:314:20)
2020-12-02T18:34:14.124950+00:00 app[web.1]: at maybeClose (internal/child_process.js:1022:16)
2020-12-02T18:34:14.124951+00:00 app[web.1]: at Socket.<anonymous> (internal/child_process.js:444:11)
2020-12-02T18:34:14.124951+00:00 app[web.1]: at Socket.emit (events.js:314:20)
2020-12-02T18:34:14.124951+00:00 app[web.1]: at Pipe.<anonymous> (net.js:675:12) {
2020-12-02T18:34:14.124952+00:00 app[web.1]: killed: false,
2020-12-02T18:34:14.124952+00:00 app[web.1]: code: 127,
2020-12-02T18:34:14.124953+00:00 app[web.1]: signal: null,
2020-12-02T18:34:14.124954+00:00 app[web.1]: cmd: '"HandBrakeCLI" --input "public/images/02122020-123404_338-test.mov" --output "public/images/02122020-123404_338-test.mp4" --preset "Gmail Medium 5 Minutes 480p30"'
2020-12-02T18:34:14.124954+00:00 app[web.1]: }
Here is the code used to set up and start decoding:
const options = {
input: req.files.video ? req.files.video[0].path : '',
output: newPathVideo,
preset: 'Gmail Medium 5 Minutes 480p30',
}
async function startEncoding () {
console.log('Start decoding video')
const result = await hbjs.run(options)
console.log(`${result.stdout}End decoding video`)
}
await startEncoding()
For handbrake-js to work correctly, you need to globally install handbrake-cli on the heroku side. For this you need to use a third-party buildpack such as the heroku-buildpack-apt.
To add this buildpack to your application you can use the command
heroku buildpacks:add --index 1 heroku-community/apt -a your-app
Make sure Heroku is installed globally on your computer!
You would need to also create a file named Aptfile on your project root that contains the list of apt packages to be installed such as handbrake-cli.
I have a very basic "Hello World" NestJS app that I'm trying to get deployed to an Azure Web App instance in Azure DevOps.
I have set up a build pipeline using a YAML file which outputs a build artifact with the dist and node_modules directories.
Then, in my release pipeline, I have a continuous deployment set up to download that artifact and deploy it. The release pipeline consists of a single step to Deploy Azure App Service. Furthermore, after this step, I entered some Post-Deployment Actions which are npm install, npm update, and npm run start:prod to get the NestJS server started.
However, when running the pipeline, that step takes an inordinate amount of time eventually erroring with:
When I visit the web app instance that I have set up (https://<project-name>.azurewebsites.net/), I see:
So, I click on "Diagnostic Resources" to try to figure out why my release is failing and eventually discover this error:
2020-05-29T20:01:30.864090341Z _____
2020-05-29T20:01:30.864143041Z / _ \ __________ _________ ____
2020-05-29T20:01:30.864149941Z / /_\ \___ / | \_ __ \_/ __ \
2020-05-29T20:01:30.864153741Z / | \/ /| | /| | \/\ ___/
2020-05-29T20:01:30.864157341Z \____|__ /_____ \____/ |__| \___ >
2020-05-29T20:01:30.864161141Z \/ \/ \/
2020-05-29T20:01:30.864164541Z A P P S E R V I C E O N L I N U X
2020-05-29T20:01:30.864167941Z
2020-05-29T20:01:30.864171141Z Documentation: http://aka.ms/webapp-linux
2020-05-29T20:01:30.864174441Z NodeJS quickstart: https://aka.ms/node-qs
2020-05-29T20:01:30.864177741Z NodeJS Version : v12.13.0
2020-05-29T20:01:30.864181041Z Note: Any data outside '/home' is not persisted
2020-05-29T20:01:30.864184441Z
2020-05-29T20:01:30.951441760Z Oryx Version: 0.2.20191105.2, Commit: 67e159d71419415435cb5d10c05a0f0758ee8809, ReleaseTagName: 20191105.2
2020-05-29T20:01:30.951840160Z Cound not find build manifest file at '/home/site/wwwroot/oryx-manifest.toml'
2020-05-29T20:01:30.951915661Z Could not find operation ID in manifest. Generating an operation id...
2020-05-29T20:01:30.952061661Z Build Operation ID: dfd18989-3b7b-4e2e-a64e-cf7310361e99
2020-05-29T20:01:32.750738663Z Writing output script to '/opt/startup/startup.sh'
2020-05-29T20:01:33.355033998Z Running #!/bin/sh
2020-05-29T20:01:33.359017599Z
2020-05-29T20:01:33.359033399Z # Enter the source directory to make sure the script runs where the user expects
2020-05-29T20:01:33.359644199Z cd "/home/site/wwwroot"
2020-05-29T20:01:33.359658399Z
2020-05-29T20:01:33.359664799Z export NODE_PATH=$(npm root --quiet -g):$NODE_PATH
2020-05-29T20:01:33.360538899Z if [ -z "$PORT" ]; then
2020-05-29T20:01:33.360552699Z export PORT=8080
2020-05-29T20:01:33.360557899Z fi
2020-05-29T20:01:33.360561499Z
2020-05-29T20:01:33.361582699Z npm start
2020-05-29T20:01:35.698639821Z
2020-05-29T20:01:35.698668521Z > <project-name>#0.0.1 start /home/site/wwwroot
2020-05-29T20:01:35.698675121Z > nest start
2020-05-29T20:01:35.698679221Z
2020-05-29T20:01:35.930729770Z internal/modules/cjs/loader.js:797
2020-05-29T20:01:35.930766970Z throw err;
2020-05-29T20:01:35.930772870Z ^
2020-05-29T20:01:35.930776770Z
2020-05-29T20:01:35.930780670Z Error: Cannot find module '../commands'
2020-05-29T20:01:35.930784670Z Require stack:
2020-05-29T20:01:35.930788470Z - /home/site/wwwroot/node_modules/.bin/nest
2020-05-29T20:01:35.930792370Z at Function.Module._resolveFilename (internal/modules/cjs/loader.js:794:15)
2020-05-29T20:01:35.930803370Z at Function.Module._load (internal/modules/cjs/loader.js:687:27)
2020-05-29T20:01:35.930807770Z at Module.require (internal/modules/cjs/loader.js:849:19)
2020-05-29T20:01:35.930811570Z at require (internal/modules/cjs/helpers.js:74:18)
2020-05-29T20:01:35.930815370Z at Object. (/home/site/wwwroot/node_modules/.bin/nest:5:20)
2020-05-29T20:01:35.930819770Z at Module._compile (internal/modules/cjs/loader.js:956:30)
2020-05-29T20:01:35.930823570Z at Object.Module._extensions..js (internal/modules/cjs/loader.js:973:10)
2020-05-29T20:01:35.930827470Z at Module.load (internal/modules/cjs/loader.js:812:32)
2020-05-29T20:01:35.930831270Z at Function.Module._load (internal/modules/cjs/loader.js:724:14)
2020-05-29T20:01:35.930835070Z at Function.Module.runMain (internal/modules/cjs/loader.js:1025:10) {
2020-05-29T20:01:35.930838970Z code: 'MODULE_NOT_FOUND',
2020-05-29T20:01:35.930842770Z requireStack: [ '/home/site/wwwroot/node_modules/.bin/nest' ]
2020-05-29T20:01:35.930846670Z }
2020-05-29T20:01:35.970252977Z npm ERR! code ELIFECYCLE
2020-05-29T20:01:35.979824678Z npm ERR! errno 1
2020-05-29T20:01:35.981324478Z npm ERR! <project-name>#0.0.1 start: `nest start`
2020-05-29T20:01:35.982002178Z npm ERR! Exit status 1
2020-05-29T20:01:35.982641778Z npm ERR!
2020-05-29T20:01:35.991823280Z npm ERR! Failed at the <project-name>#0.0.1 start script.
2020-05-29T20:01:35.991838780Z npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
2020-05-29T20:01:36.118651500Z
2020-05-29T20:01:36.119439400Z npm ERR! A complete log of this run can be found in:
2020-05-29T20:01:36.128548002Z npm ERR! /root/.npm/_logs/2020-05-29T20_01_35_990Z-debug.log
At this point I can't figure out what is wrong. Any help would be greatly appreciated.
More than likely, you're using npm start which is mapped to nest start by default. The problem you'll run into with this is that #nestjs/cli (where the nest command comes from) is a part of devDependencies by default, so unless you've moved it, Azure is probably scrubbing the devDeps and keeping on prod deps. You should be using node dist/main to start your app instead to remove this problem without bloating your dependencies. Otherwise, adding #nestjs/cli to dependencies should fix it.
This is driving me nuts.
IDE: Visual Studion 2019
Project: Created a new "Basic Vue.js project" - I chose the *.ts flavour
I validate the new site runs. It does.
Following the quick start on Vuetify : https://vuetifyjs.com/en/getting-started/quick-start/#bootstrapping-the-vuetify-object
After each step I validate the site will still compile and run.
I reach the section where we add new modules to our project. I run this line:
npm install sass sass-loader fibers deepmerge -D
And now the site will not run. When I debug I get this output:
------ Build started: Project: MCCC.Web, Configuration: Debug Any CPU ------
> mccc.web#0.1.0 build C:\Labs\MCCC\Web\MCCC-Web\MCCC.Web
> vue-cli-service build
- Building for production...
Starting type checking service...
Using 1 worker with 2048MB memory limit
ERROR Failed to compile with 1 errors5:04:50 PM
error in ./src/main.ts
Module build failed (from ./node_modules/thread-loader/dist/cjs.js):
Thread Loader (Worker 0)
C:\Labs\MCCC\Web\MCCC-Web\MCCC.Web\babel.config.js: Error while loading config - Cannot find module 'fibers'
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:690:17)
at require (internal/modules/cjs/helpers.js:25:18)
at Object.<anonymous> (C:\Labs\MCCC\Web\MCCC-Web\MCCC.Web\babel.config.js:17:32)
at Module._compile (internal/modules/cjs/loader.js:776:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:787: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)
# multi ./src/main.ts
ERROR Build failed with errors.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! mccc.web#0.1.0 build: `vue-cli-service build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the mccc.web#0.1.0 build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Dwainwright.BC\AppData\Roaming\npm-cache\_logs\2020-04-26T21_04_50_521Z-debug.log
C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\MSBuild\Microsoft\VisualStudio\v16.0\Node.js Tools\Microsoft.NodejsToolsV2.targets(60,5): error MSB3073: The command "npm run build" exited with code 1.
Done building project "MCCC.Web.njsproj" -- FAILED.
Build FAILED.
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
The line that sticks out the most to me is:
C:\Labs\MCCC\Web\MCCC-Web\MCCC.Web\babel.config.js: Error while loading config - Cannot find module 'fibers'
fibres is references in the babel.config.json where I added the rules laid out in quick start:
module.exports = {
presets: [
'#vue/app',
'#babel/preset-env'
],
rules: [
{
test: /\.s(c|a)ss$/,
use: [
'vue-style-loader',
'css-loader',
{
loader: 'sass-loader',
// Requires sass-loader#^7.0.0
options: {
implementation: require('sass'),
fiber: require('fibers'),
indentedSyntax: true // optional
},
// Requires sass-loader#^8.0.0
options: {
implementation: require('sass'),
sassOptions: {
fiber: require('fibers'),
indentedSyntax: true // optional
},
},
},
],
},
]
};
Does anybody know how i can resolve this? Happy to share further info; not sure what else you may need.
Are you using the latest version of the docs? I followed the link you provided and the anchor #bootstrapping-the-vuetify-object doesn't appear to exist anymore. I was able to get a basic project up and running successfully following these steps:
vue create myapp: Selected "custom" and ticked all the boxes, for TypeScript, chose the default "class-style components"
verified that npm run serve worked
vue add vuetify: Selected "Configure", and these options:
Y (default)
y
y
Material Design Icons (default)
N (default)
Y (default)
English (default)
npm run serve would run, but I got warnings about type declaration for vuetify/lib. This answer led me to this FAQ item which made the warnings go away. (You have to add "vuetify" to the compilerOptions.types array in the root tsconfig.json for the project.)
FWIW, fibers does not appear to be included in the project at all anymore (searched for "fibers" in package-lock.json). My babel.config.js file looks like:
module.exports = {
presets: [
'#vue/cli-plugin-babel/preset'
]
}
And vue.config.js looks like:
module.exports = {
transpileDependencies: [
'vuetify'
]
}
Hope this helps!
I had an issue deploying a meteor app with mup and got this error:
tarted TaskList: Deploy app 'thermaMup' (linux)
[107.170.77.189] - Uploading bundle
[107.170.77.189] - Uploading bundle: SUCCESS
[107.170.77.189] - Setting up Environment Variables
[107.170.77.189] - Setting up Environment Variables: SUCCESS
[107.170.77.189] - Invoking deployment process
[107.170.77.189] x Invoking deployment process: FAILED
-----------------------------------STDERR-----------------------------------
npm 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=/opt/thermaMup/tmp/bundle/programs/server)
stop: Unknown instance:
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0curl: (7) Failed to connect to localhost port 80: Connection refused
App did not pick up! Please check app logs.
My logs read
[107.170.77.189] error: Script restart attempt #150[107.170.77.189]
[107.170.77.189] Meteor requires Node v0.10.41 or later.[107.170.77.189]
And I've been able to solve this problem on my separate laptop by changing my mup.json file to have a longer deployCheckWaitTime, and a different nodeVersion. BUT, I had alreadly run these commands on my desktop:
sudo npm cache clean -f
sudo npm install -g n
sudo n stable
sudo ln -sf /usr/local/n/versions/node/<VERSION>/bin/node /usr/bin/node
And now the error I'm seeing on my desktop since is:
Building Started: .
buffer.js:106
throw new Error(
^
Error: If encoding is specified then the first argument must be a string
at new Buffer (buffer.js:106:13)
at Readable.<anonymous> (/usr/local/lib/node_modules/mup/node_modules/archiver/lib/util/index.js:32:15)
at emitNone (events.js:91:20)
at Readable.emit (events.js:185:7)
at endReadableNT (_stream_readable.js:926:12)
at _combinedTickCallback (internal/process/next_tick.js:74:11)
at process._tickCallback (internal/process/next_tick.js:98:9)
How do I undo those previous sudo commands? Should I just uninstall and reinstall node completely?
I have installed Node v8.10.0 made one change in the following file in my
node_modules\node_modules\archiver\lib\util\index.js
source.on('end', function() {
//(may be different for few) Line 32:
// updated this line and add +'' in the first param to make it as string argument
var buf = new Buffer(size+'', 'utf8');
var offset = 0;
collection.forEach(function(data) {
data.copy(buf, offset);
offset += data.length;
});
});
I hope this helps
I seemed to have fixed this by installing node 4.4.3 instead of 6.0.0 github.com/Azure/azure-xplat-cli/issues/2825