What steps can be taken to fix the "Encountered an issue with the installation script" error message when deploying a meteor application?

I have experience in packaging and deploying Meteor applications, but I recently encountered an error while working on a project that I couldn't solve.

These are the steps I followed to package and deploy my Meteor app:

    1. meteor build package 
    2. cd package
    3. tar -xf inventoryTool.tar.gz
    4. cd bundle/programs/server
    5. npm install
    6. cd ../..
    7. PORT=<port> MONGO_URL=mongodb://127.0.0.1:27017/dbName ROOT_URL=http://<ip> node main.js

You can view the error log generated when running the npm install command (STEP 5). Is there something essential missing from my process? I haven't used the fibers package in my project. Any solutions or suggestions would be greatly appreciated. Thanks!

Answer №1

Why does this happen frequently?

The version of node on your local machine is v8.9.4. When you use the build command, your application is exported and the code is compiled specifically for this exact version of node. Your server environment also requires this exact version.

Here's an excerpt from the custom deployment section of the guide:

Depending on the version of Meteor you are using, you should install the proper version of node by following the installation process that suits your platform. To determine the required version of node, run meteor node -v in your development environment or check the .node_version.txt file within the generated bundle by meteor build.

Even if you don't explicitly use fibers, it is necessary to run your Meteor app successfully on the server.

How can this be resolved?

To solve this issue, you need to

a) ensure that the local node version matches exactly with the server's version

b) make sure to build against the architecture of the server (refer to the build command)

To install a) the specific node version on your server, you have two options:

Option I. Use n, as explained here. Note: This method only works if your server uses node instead of nodejs.

II. To install a particular nodejs version from the repositories, follow these steps:

$ cd /tmp
$ wget https://deb.nodesource.com/node_8.x/pool/main/n/nodejs/nodejs_8.9.4-1nodesource1_amd64.deb
$ apt install nodejs_8.9.4-1nodesource1_amd64.deb

If you're unsure which one is installed on your server, check the versions using node -v and nodejs -v. One of them will return a version. If your npm install still fails, examine the error output for any mention of either node or nodejs, and then proceed to install the desired distribution accordingly.

To build b) against the server's architecture, use the --architecture flag in your build command.

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

Nuxt encountered a fatal error due to a TypeError, stating that it cannot destructure the property 'nuxt' of 'this' because it is undefined. This error occurred while using Nuxt Js

Whenever I attempt to run npm run dev in my nuxt project, an error message pops up: Using default Tailwind CSS file from runtime/tailwind.css nuxt:tailwindcss 21:02:57 FATAL Cannot de ...

Which is the best choice for a large-scale production app: caret, tilde, or a fixed package.json

I am currently managing a sizeable react application in production and I find myself undecided on whether it is more beneficial to use fixed versions for my packages. Some suggest that using the caret (^) is a safer route, but I worry that this could poten ...

Consolidate HTML project into a unified HTML file

In my current project, I am working with a static HTML report that is organized in the structure outlined below: 1.css 2.font 3.js 4.pages 5.attachments 6.index.html I would like to know how I can combine all these elements to create a unified 'repor ...

Experiencing Issues with MySQL Data Length?

I am currently working with the mysql2 library in conjunction with NodeJS. I have identical code and database structures on both my local machine and a server. Interestingly, when I attempt to upload an image into the "photos" table on my local setup, ever ...

Collaborating on PHPStorm file watchers across different operating systems

Is there a way to create a file watcher that can run the (npm) gulp command when a file is changed, and have it work on both mac and windows without having to use explicit paths? Currently, I was only successful in making this work by specifying the paths ...

Is the installation of a root package synonymous with the automatic installation of a scoped library?

Upon installing a root library, like npm install aws-amplify, I often find that I also need to install its sub-library, such as npm install @aws-amplify/cli. Why doesn't the initial installation of npm install aws-amplify cover all sub-libraries withi ...

The error message "'react-native-reanimated' Cannot call method "String.startsWith(String)" because the variable "versionOutput" is currently undefined

After accidentally unlinking react-native-reanimated from my App, I started encountering a specific error. It's worth noting that I recently upgraded to macOS Ventura 13.2.1 The issue arises when running npx react-native start, which results in a fai ...

Having issues with 'main character' dependency while using 'yarn install' command

Executing yarn install on the command line resulted in the following error: yarn install v1.15.2 $ node tools/nodeVersionCheck.js [1/5] Validating package.json... [2/5] Resolving packages... [3/5] Fetching packages... info <a href="/cdn-cgi/l/email-pro ...

Having trouble with an npm installation? Encountering a SyntaxError related to block-scoped

Having issues while trying to install create-react-app as it throws the following error message - rem$ npm install -g create-react-app Command failed: /bin/sh -c /usr/local/bin/node /usr/local/lib/node_modules/npm/bin/npm-cli.js config get cache --parsea ...

Encountering an 'Authentication Failed' message while attempting to access the Azure DevOps Artifacts feed via npm, resulting in an E401 error

I am facing a challenge while trying to establish a connection to an Azure DevOps Artifacts feed as I keep encountering an E401 error. Interestingly, when I attempted the same on a different device, the connection was successful. Additionally, I have gone ...

Is there a correlation between eliminating unnecessary imports and the size of the bundle as well as the speed of the build process

I am working on a Reactjs application built with Create React app, and I often encounter warnings during the startup and build process indicating that there are unused variables or imports in my Components. ./src/components/home/Header.js Line 10: & ...

What is the process for displaying node_modules directories in a json/javascript document?

Exploring ways to showcase the dependencies within my d3.js tree, I am curious if it's possible to dynamically list the dependencies' names in a JSON file or directly within the javascript file. I'm puzzled by how JavaScript can access folde ...

Leveraging NPM 'pre' commands

Utilizing NPM, we have the ability to implement pre scripts to function as pre hooks (in addition to post hooks). In my case, I am aiming to execute 'gulp default' prior to running my npm script in the following manner: "scripts":{ "prestart ...

Having trouble running `npm start` in React due to a `npm update check failed` error

When attempting to open a window to view my React app using npm start, I encounter the following error: npm update check failed │ │ Try running with sudo or get access │ │ ...

Troubleshooting npm test failure on CircleCI due to inability to locate installed package

It's puzzling that Circle is encountering issues with utilizing ts-mocha after it was successfully installed with npm install in a previous step of the build process. The functionality used to function properly, but now it suddenly stopped working. ...

create-react-app : npm ERROR! JSON data parsing halted unexpectedly near '....'

Explain the issue The command npx create-react-app my-app is not functioning properly. I have attempted to resolve the problem by using npm cache clean --force, but unfortunately, I continue to encounter the same error repeatedly. Steps for replication ...

Using Node.js to execute JavaScript with imported modules via the command line

Having limited experience with running JavaScript from the command line, I am facing a situation where I need to utilize an NPM package for controlling a Panasonic AC unit, which includes a wrapper for their unofficial API. My objective is to create a sim ...

What is the best node.js version to install on Ubuntu 16.10?

I am currently in the process of setting up Truffle on my Ubuntu 16.10 operating system. To begin this installation, I must first install node.js. The latest v8 version is not compatible with Truffle, so I opted to download and install v7 along with its `b ...

Use a npm script within another npm script

Take a look at this snippet from a package.json file: { // ... "scripts": { "start": "npm run b -- --watch", "build": "builder --in src --out dest" } // ... } Now, when I execute the build command within the start command and ad ...

A guide on launching a Next.js app and Express server simultaneously with the npm concurrently package

Running a Next.js App and Express Server Simultaneously with npm and the concurrently Package I have a project that combines Node Express as the backend and Next.js as the frontend. I am looking to utilize the concurrently npm package to launch both the E ...