Working with compound js on windows. Cannot start anything - windows

I wish to create a hello world application using compound.js.
So far, nothing works at all.
I've installed "npm install compound -g" to have compound be available globally.
Now I wish to run "compound init" and I get this:
(see first code block)
While googling, I found an example app on npm called mongoose-compound-example-app.
After npm installing that, I ran "node ." as suggested in the readme:
(see second code block)
I am using Windows 8 x64. Node itself works, and I've been able to run a "hello world" application using locomotive.js. I really want to get compound figured out and working, but I can't seem to get anywhere at all.
Thank you in advance!
EDIT:
I am using Node v0.10.0
C:\Users\Lev\test>compound init hello
path.js:204
throw new TypeError('Arguments to path.join must be strings');
^
TypeError: Arguments to path.join must be strings
at f (path.js:204:15)
at Object.filter (native)
at Object.exports.join (path.js:209:40)
at CompoundServer.module.exports [as extensions] (C:\Users\Lev\AppData\Roaming\npm\node_modules\compound\lib\server\extensions.js:13:25)
at CompoundServer.initCompound (C:\Users\Lev\AppData\Roaming\npm\node_modules\compound\lib\compound.js:100:14)
at CompoundServer.init (C:\Users\Lev\AppData\Roaming\npm\node_modules\compound\lib\server\compound.js:42:29)
at C:\Users\Lev\AppData\Roaming\npm\node_modules\compound\lib\compound.js:61:18
at process._tickCallback (node.js:415:13)
at Function.Module.runMain (module.js:499:11)
at startup (node.js:119:16)
at node.js:903:3
mongoose-compound-example-app error:
C:\Projects\mongoose-compound-example-app\config\environment.js:11
app.use(compound.assetsCompiler.init());
^
TypeError: Cannot call method 'init' of undefined
at Function.<anonymous> (C:\Projects\mongoose-compound-example-app\config\environment.js:11:41)
at Function.app.configure (C:\Projects\mongoose-compound-example-app\node_modules\express\lib\application.js:396:61)
at module.exports (C:\Projects\mongoose-compound-example-app\config\environment.js:10:9)
at evalInContextOf (C:\Projects\mongoose-compound-example-app\node_modules\compound\lib\compound.js:187:9)
at requireIfExists (C:\Projects\mongoose-compound-example-app\node_modules\compound\lib\compound.js:165:9)
at configureApp (C:\Projects\mongoose-compound-example-app\node_modules\compound\lib\compound.js:147:5)
at CompoundServer.initCompound (C:\Projects\mongoose-compound-example-app\node_modules\compound\lib\compound.js:91:9)
at CompoundServer.init (C:\Projects\mongoose-compound-example-app\node_modules\compound\lib\server\compound.js:42:29)
at C:\Projects\mongoose-compound-example-app\node_modules\compound\lib\compound.js:61:18
at process._tickCallback (node.js:415:13)
at Function.Module.runMain (module.js:499:11)
at startup (node.js:119:16)
at node.js:903:3

As discussed in the chat, there seems to be a problem or conflict with the version of Node.js you are using.
Compound's package.json says that it expects Node.js 0.8.0 or higher. You mentioned that it works in 0.9, but not in 0.10. This is likely a bug, as the odd-numbered versions of Node are typically the unstable versions before the later even number stable releases.
I recommend posting a reproducible example on the bug tracker for Compound, and possibly Node.js if you can narrow it down to a Node issue.

Related

Can't properly install hardhat using Powershell! Persistent Error HH12: Trying to use a non-local installation of Hardhat, which is not supported

Below is a short list of my setup until I stumble upon the HH12 Hardhat Error that I keep getting:
mkdir wave (Name of my directory)
cd wave
npm init -y
npm install —save-dev hardhat
npx hardhat
Choose sample project
6a. Hardhat project root (Select)
6b. Add .gitignore
Say yes to everything
install the remaining dependencies: npm install --save-dev #nomiclabs/hardhat-waffle ethereum-waffle chai #nomiclabs/hardhat-ethers ethers
npx hardhat accounts (to see all the different accounts)...
...And then it fails here! An HH12 Hardhat Error Message: "Hardhat is not installed or installed globally. You tried to run Hardhat from a global installation or not installing it at all. This is not supported. Please install Hardhat locally using npm or Yarn, and try again." (https://hardhat.org/errors/) [BTW, these 2 lines are the ONLY docs on this error on Hardhat!].
Any suggestions?
I have tried the following possible 'fixes' to sidestep this error but to no avail:
Updating most current version of node
Restarting my PC (About 17 X now as of this writing)
Using GitBash (Instead of Powershell)
Asking mods in Hardhat Discord (None) and other Discords
Opening the Hardhat docs (And the Tutorials!!) for answers... None!
StackExchange - There's literally only 1 other person who ALSO had this problem here! But the answers here are not the solution. (Have DMd that person but no reply as of yet).
So can anyone out there help?
I believe I finally figured out the solution (at least what worked for me):
I dropped back 2 directory levels from where I was for my root project and started again there.
I updated my Node version to 16.

What is preventing eslint from installing based on my error code?

I am following a Udemy course and the first app we are building through Atom is called albums. I have installed linter and linter-eslint in Atom, but running this code:
npm install --save-dev eslint-config-rallycoding
leads to an incomplete install.
My first line reads:
deprecated eslint-plugin-class-property#1.1.0: please use eslint-plugin-babel and babel/semi
But the second line of my log reads:
#babel/plugin-check-constants#7.0.0-beta.38 requires a peer of #babel/core#7.0.0-beta.38 but none is installed. You must install peer dependencies yourself.
So after that, every line starts off with SKIPPING OPTIONAL DEPENDENCY.
So I am just trying to see what I may be missing or if this even is a problem?

`ReferenceError: Meteor is not defined` in `meteor-client.js` Angular-Meteor Project

After an npm install which triggered meteor-client bundle during postinstall, I am receiving this new error in the browser console:
"ReferenceError: Meteor is not defined
at Object.eval (webpack-internal:///../../../../meteor-client.js:32502:3)
at eval (webpack-internal:///../../../../meteor-client.js:32507:30)
at Object.../../../../meteor-client.js (http://localhost:4200/vendor.bundle.js:1395:1)
at __webpack_require__ (http://localhost:4200/inline.bundle.js:55:30)
at eval (webpack-internal:///../../../../../clients/browser/main.ts:3:72)
at Object.../../../../../clients/browser/main.ts (http://localhost:4200/main.bundle.js:424:1)
at __webpack_require__ (http://localhost:4200/inline.bundle.js:55:30)
at Object.0 (http://localhost:4200/main.bundle.js:439:18)
at __webpack_require__ (http://localhost:4200/inline.bundle.js:55:30)
at webpackJsonpCallback (http://localhost:4200/inline.bundle.js:26:23)"
```
Triggered at:
if (Package.reload) {
Meteor._reload.onMigrate(function () {
return [false];
});
}
This behavior occurs with:
#angular/cli: both 1.6.3 & 1.6.6
meteor-client-bundler: 0.3.0
Meteor: both 1.6.0.1 & 1.6.1
I had the same issue, and downgrade as John mentioned worked for me.
If you are wondering how to downgrade your meteor app follow the instructions bellow that I've taken from how do I install a previous version of meteor JS?
1) Go to your project root folder
2) Run meteor update --release x.y.z
Where x.y.z is the desired version, for example 1.6.0
Might be related to this issue with a normal angular-meteor setup? It seems like the Meteor version 1.6.0.1 is crashing the meteor-angular setup. I was testing both project setups, with and without AngularCLI, and experienced exactly the errors described here and at angular-meteor issues.
However, resetting the project to Meteor 1.6 worked for me in both cases.

React Native _weakMap2 error

I just updated to React Native 0.21, but I am getting an error when I require Parse:
var Parse = require('parse/react-native').Parse;
The error I get is:
undefined is not a constructor (evaluating 'new _weakMap2.default()')
I don't believe it has to do with Parse though, as searching the directory, the 'weakMap2' reference is only found inside the react-proxy package.
Has anyone else experienced this error or found a workaround? Thanks!
This should be fixed in react-proxy#1.1.7.
(Don’t use 2.x, it’s not related to React Native at all currently!)
You can run npm install react-proxy#1.1.7 so NPM updates it locally. If you are using npm#2.x, you would need to run npm install react-proxy#1.1.7 inside node_modules/react-native/node_modules/react-transform-hmr or something like this—check where it is installed and make sure it’s 1.x but up to date.
Don't really know the issue but running Parse JS SDK as version 1.6.14 works for me. Have the same error as you when running latest 1.7.1. Hard to trace the error.
npm i parse#1.6.14 --save
I forced react-proxy to version 2.0.1 and the error is now gone for me.

"cannot find module" when installing npm modules on windows

I am new to NodeJS. I am trying to use npm on Windows 8.
I have installed using chocolatey, cinst nodejs.install (version 0.10.17). I installed as administrator (and would prefer to run npm as a normal user).
Node itself seems to be working, I can use the REPL to run simple programs.
If I try to install something using npm, I get cannot find module:
> node npm install express
module.js:340
throw err;
^
Error: Cannot find module 'C:\Users\Klas\Documents\My Dropbox\mina egna\tech\node\webserver\npm'
at Function.Module._resolveFilename (module.js:338:15)
at Function.Module._load (module.js:280:25)
at Function.Module.runMain (module.js:497:10)
at startup (node.js:119:16)
at node.js:901:3
I have read the answers on Nodejs cannot find installed module on Windows? but unfortunately it is still unclear to me what I have to do.
I have tried setting NODE_PATH:
In trying to follow this answer, I have tried setting it to C:\Users\Klas\AppData\Roaming\npm\node_modules (but I had to create both the npm and the subfolder node_modules myself)
I have tried creating a folder c:\node\node_module (according to this advice, even though the installation did not even create a c:\node folder) and setting it to that.
I have tried setting it to C:\Program Files\nodejs\node_modules\npm\node_modules (which did exist after installation)
I have also tried to create a node_modules folder below the current working directory. As I understand it that is where local npm will be installed?
None of these helped. So it seems to me that setting NODE_PATH is not the solution?
Using the -g flag makes no difference (I would prefer not to use it).
I get the same error both as normal user and as administrator (I would prefer to be a normal user).
I get the same error no matter where I execute the command, except when I do it in C:\Program Files\nodejs, where I get
basedir=`dirname "$0"`
^
SyntaxError: Unexpected token ILLEGAL
at Module._compile (module.js:439:25)
Not using windows, but I'm pretty sure it's just npm install express on windows too.

Resources