Unable to build meteor app (Windows): \promise_server.js:116 - javascript

More code posted here https://forums.meteor.com/t/major-node-issue-unable-to-build-meteor-app-windows-promise-server-js-116/26798/1
I get the following errors when I try to build or update an app:
When UPDATEing from 1.2.1 to any other version:
C:\Users\user1\AppData\Local\.meteor\packages\less\2.6.0\plugin.compileLessBatch.os\npm\node_modules\meteor\promise\node_modules\meteor-promise\promise_server.js:116
throw error;
^
Error: ENOTDIR, readdir '<projectDirectory>\.meteor\local\isopacks\.build994576.ccbanker_template-banker\web.browser\client\js\settings\.builder-tmp-file.264146'
When BUILDing an app - which is meteor 1.3.5.1
C:\Users\user2\AppData\Local\.meteor\packages\templating\1.1.9\plugin.compileTemplatesBatch.os\npm\node_modules\meteor\promise\node_modules\meteor-promise\promise_server.js:116
throw error;
^
TypeError: Cannot call method 'split' of undefined
I also get a similar error when I create a new empty app, and then try to BUILD it (which succeeds) and NPM INSTALL (which fails, again throwing the error at promise_server.js:116)
Have tried rebuilding all of this on a clean install of node+npm+meteor.

Node version 0.10.40 require for npm build in meteor js.
You can use nvm for node version change: https://github.com/creationix/nvm

Related

Why doesn't npx react-native init MyApp not work and doesn't create a React Native project?

I'm trying to start an App with npx react-native init <MyApp> but it doesn't finish building.
Two days ago this worked and today it doesn't.
I've googled for ideas, but I don't see anything like it
After a while building and downloading dependencies, everything stops and the console shows the following
The iOS and Android folders are not quite complete, and when I try to run iOS or Android I get errors.
Searching I found articles related to ignore-engines, but I don't understand why this happens to me suddenly, when 2 days ago everything was working
What does this error mean and why?
Thank you
error jest-cli#28.0.2: The engine "node" is incompatible with this
module. Expected version "^12.13.0 || ^14.15.0 || ^16.10.0 ||
=17.0.0". Got "16.6.0" error Found incompatible module. info Visit https://yarnpkg.com/en/docs/cli/add for documentation about this
command. /Volumes/MIguelApps/REACT-NATIVE/pruebas/carpeta sin
título/Senderos/node_modules/metro-hermes-compiler/src/emhermesc.js:77
throw ex;
^
RuntimeError: abort(Error: Command failed: yarn add -D #babel/core
#babel/runtime #react-native-community/eslint-config eslint jest
babel-jest metro-react-native-babel-preset
react-test-renderer#17.0.2). Build with -s ASSERTIONS=1 for more info.
at process.abort (/Volumes/MIguelApps/REACT-NATIVE/pruebas/carpeta sin
título/Senderos/node_modules/metro-hermes-compiler/src/emhermesc.js:402:15)
at process.emit (node:events:394:28)
at emit (node:internal/process/promises:136:22)
at processPromiseRejections (node:internal/process/promises:242:25)
at processTicksAndRejections (node:internal/process/task_queues:97:32)
/////////////////////////
warning Pattern ["#babel/core#^7.17.9"] is trying to unpack in the
same destination
"/Users/miguelito/Library/Caches/Yarn/v6/npm-#babel-core-7.17.9-6bae81a06d95f4d0dec5bb9d74bbc1f58babdcfe-integrity/node_modules/#babel/core"
as pattern
["#babel/core#^7.14.0","#babel/core#^7.14.0","#babel/core#^7.14.0","#babel/core#^7.13.16","#babel/core#^7.14.0","#babel/core#^7.14.0","#babel/core#^7.14.0","#babel/core#^7.11.6","#babel/core#^7.11.6","#babel/core#^7.12.3","#babel/core#^7.11.6","#babel/core#^7.14.0"].
This could result in non-deterministic behavior, skipping. warning
Pattern ["#babel/runtime#^7.17.9"] is trying to unpack in the same
destination
"/Users/miguelito/Library/Caches/Yarn/v6/npm-#babel-runtime-7.17.9-d19fbf802d01a8cb6cf053a64e472d42c434ba72-integrity/node_modules/#babel/runtime"
as pattern ["#babel/runtime#^7.8.4"]. This could result in
non-deterministic behavior, skipping.
had same issue and upgrading to latest node worked for me.

Having an error in running a prisma command

I'm new to Prisma and Ts.ED framework, I'm trying to build a simple crud operation using them to understand the flow. I have Prisma installed globally(although, not recommended) and also invoked it globally using this command "prisma". but, when I ran this command
"prisma generate"
I have this error:
Error: Generator at tsed-prisma could not start:
/bin/sh: tsed-prisma: command not found.
The error wasn't there initially but started when I shut down my system. I have deleted the node modules and installed Prisma again, and still, the error persists. Please, I need help to resolve this error. Thank you

Importing library in react code throws compilation error

When trying to consume messages from rabbitmq from my react project for which I use the following import
import amqp from 'amqplib'
npm install amqplib is already done. amqplib is the library suggested by rabbitmq official docs itself. But even before adding any code using the installed library, with just the import, I always get the following error: This is the case for
ERROR in ./node_modules/amqplib/lib/connect.js
Module not found: Error: Can't resolve 'net' in 'C:\Users\arun\Desktop\projects\react\amq-test\node_modules\amqplib\lib'
What is the missing piece here?
I think you missed net package. As a solution run this command on your terminal
npm i -s net
After that run your project again. If any error occurred try to remove node_modules folder and run npm install
I have the same problem in my react app. I solved by installing (npm i assert buffer ...) these modules;
assert
buffer
net
querysting
stream
tls
util

SyntaxError when importing ES6 npm module in Meteor

I created a new meteor project using meteor create
I ran npm install -S spacy-nlp, which contains some ES6 code
In my server/main.js, I wrote import spacy from 'spacy-nlp'
Upon running meteor, it complained Error: The babel-runtime npm package could not be found in your node_modules. Please run the following command to install it: meteor npm install --save babel-runtime
I installed babel-runtime
Then it complains
W20161120-16:40:30.175(8)? (STDERR) /Users/prashanthcr/code/es6-meteor-test/node_modules/spacy-nlp/src/start-io.js:3
W20161120-16:40:30.176(8)? (STDERR) const { spawn } = require('child_process')
W20161120-16:40:30.176(8)? (STDERR) ^
W20161120-16:40:30.177(8)? (STDERR)
W20161120-16:40:30.178(8)? (STDERR) SyntaxError: Unexpected token {
Not sure where to go from there. Why can't I import an npm package that uses ES6?
I have Node.js 7.1.0 installed globally and I'm using Meteor 1.4.2.3.
Meteor does not compile any files in node_modules to ES5. This means that the code is run unchanged. That is the reason you are getting the error at runtime and not during the build process.
Meteor v1.4.2.x uses node v4.6.2 (you can check the node version using meteor node --version).
This version of node does not normally support destructuring assignment (the const {foo} = ... syntax). This requires using the --harmony_destructuring flag. You can easily test this by running a node shell (REPL) with version 4.x vs 6.x.
Typing the following in 3 terminal sessions:
$ meteor node
$ meteor node --harmony_destructuring
$ node, when node is in v6+
Code:
let bar = () => ({foo: 3}); // 1
let { foo } = bar(); // 2
eval("let { foo } = bar();"); // 3
Statement 1 will run fine.
Statement 2 will not be recognized by node v4 (expect more user input) and will be evaluated as expected by node v6 and v4 with the flag.
Statement 3 forces node to evaluate the expression as a unit without expecting further input by the user, so it will cause node v4 to throw the error you are seeing and will be evaluated properly by node v6 and v4 w/flag.
This means that the error you are facing is a node issue and you need to either:
find a way to get Meteor to run node with the --harmony_destructuring flag.
fork the packages and change the problematic expressions.
fork and add a build configuration to the packages (e.g, a pre-publish step).
wait for Meteor to start using Node v6 (should happen soon, as it is now the stable LTS version).
There is a story about babel-runtime here, which all seems a little confusing to me, but I think the solution is to do
meteor npm install --save babel-runtime
https://forums.meteor.com/t/meteor-1-4-2-1-is-an-important-patch-for-1-4-2-users/31190
Meteor refuses to do anything with what's in node_modules, the thinking being that those packages should already be ready for distribution.
But more and more npm packages are not transpiling from ES6 before packaging so Meteor have been forced to look into this.
For packages that you don't need to modify the solution is easy (once you know it):
Make a symbolic link from node_modules/<package> to somewhere in your app (import maybe). No Meteor thinks that this is code in your application and does whatever is needed with it.

MeteorJS Iron Router installation crashing app

I have problem with my application, I'm learning with "Discover Meteor" book, but frankly I have an error that I don't know how to fix.
I'm right now at "Routing" chapter, and when I install iron-router package with
mrt add iron-router
my whole app just crushes and I don't know how to fix it.
Here are the errors:
TypeError: Template.__create__ is not a function
TypeError: Parent is undefined
TypeError: Iron.Layout is not a constructor
TypeError: Package['iron-router'] is undefined
ReferenceError: Template is not defined
ReferenceError: Template is not defined
ReferenceError: Template is not defined
ReferenceError: Template is not defined
ReferenceError: Template is not defined
ReferenceError: Meteor is not defined
ReferenceError: Meteor is not defined
Any ideas?
mrt add iron-router was deprecated
try with
meteor add iron:router instead
For template undefined error,
try run meteor reset command and then start server with meteor
Note: meteor reset will do reset your build and also local mongodb data
Update: It should remove the error but anyways try full uninstall of meteor from your system and install it again.
The meteor core installation might get corrupted while auto updating from 0.8 to 1.0 version
Uninstall meteor -
rm -rf ~/.meteor
rm -rf /usr/local/bin/meteor
Install
curl https://install.meteor.com/ | sh
Above will install latest version of meteor i.e 1.0
and after that now update your project with
cd <your-project-directory>
meteor update --release 1.0.0

Categories

Resources