Error installing #tensorflow/tfjs-node - tensorflow

I'm following a ML tutorial on Youtube (https://www.youtube.com/watch?v=XdErOpUzupY&index=5&list=PLoYCgNOIyGABWLy_XoLSxTVRe2bltV8GM) and I'm suppose to install #tensorflow/tfjs-node. However when I run
npm install #tensorflow/tfjs-node
I get the following error (see screencap).
I've watched the relevant files be placed into node_modules but then they immediately get uninstalled. I'm not sure where to go from here, but let me know if you need anymore info.
Cheers
Package.json
{
"name": "tfjs",
"version": "1.0.0",
"description": "",
"main": "iris.js",
"scripts": {
"start": "parcel --target=node iris.js & nodemon dist/iris.js"
},
"keywords": [],
"author": "",
"license": "ISC",
"dependencies": {
"#tensorflow/tfjs": "^0.11.7",
"#tensorflow/tfjs-node": "^0.1.7",
"nodemon": "^1.17.5",
"parcel": "^1.9.0"
}
}

Given the error screenshot of your errors, you're using node version 6 whereas tensorflowjs requires node v8.9+. Consider upgrading the version of your server node using the official website here. When you're done check the version with node -v to make sure that your version of node meets the requirements of tensorflowjs modules.

Related

How to properly install ClassPrivateProperties and ClassPrivateMethods plugins?

Hei,
I updated my npm packages, including parcel, and after the update I could not run my application anymore and keep getting the following error:
🚨 Build failed.
#parcel/transformer-js: This experimental syntax requires enabling one of the following parser plugin(s): 'classPrivateProperties, classPrivateMethods' (3:2)
My package.json looks like below:
"scripts": {
"start": "parcel index.html",
"build": "parcel build index.html"
},
"author": "Klei Rama",
"license": "ISC",
"devDependencies": {
"#babel/plugin-proposal-class-properties": "^7.13.0",
"#babel/plugin-proposal-private-methods": "^7.13.0",
"#parcel/transformer-sass": "^2.0.0-beta.2",
"parcel": "^2.0.0-beta.2",
"sass": "^1.32.8"
},
"dependencies": {
"fractional": "^1.0.0"
},
"plugins": [
"#babel/plugin-proposal-private-methods",
"#babel/plugin-proposal-class-properties"
]
}
I keep trying to delete node_modules, clear the cache, and delete package.json and then reinstall again but it does not work. I tried to use experimantal versions of parcel such as 2.0.0-beta.1 and 2.0.0-beta.2, but none of these version does not seem to work with experimental phase of babel plugins (class-properties and private-methods) (7.13.0). I was wondering if there is any certain version of babel plugins which can work either with parcel 2.0.0-beta.1 or 2.0.0-beta.2?
Hei you, install babel and the following plugins:
{
"plugins": [
"#babel/plugin-proposal-class-properties",
"#babel/plugin-proposal-private-methods"
]
}
Of course, also, to file .babelrc.

WebdriverIO : Can we push code with dependencies only installed?

I am using webdriverIO v6
I have Installed just these two packages: npm install #wdio/cli as well as webdriverio
my tests are ruining smoothly in my local.
Is this ok to push to code-repo in git, does this work in Jenkis or Azure devops?
or is is required to install the --save-dev too to work in CI tools?
{
"name": "test-package",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"wdio": "./node_modules/.bin/wdio wdio.conf.js"
},
"author": "",
"license": "ISC",
"devDependencies": {
"#wdio/allure-reporter": "^6.1.23",
"#wdio/cli": "^6.1.25",
"#wdio/local-runner": "^6.1.25",
"#wdio/mocha-framework": "^6.1.19",
"#wdio/spec-reporter": "^6.1.23",
"#wdio/sync": "^6.1.14",
"chromedriver": "^83.0.1",
"wdio-chromedriver-service": "^6.0.3",
"webdriverio": "^6.1.25"
},
"dependencies": {}
}
This is nothing specific to wdio. This is a question which has been discussed multiple times in nodejs context.
Many developers suggest not to include node_modules in the repo because of various reasons which are logical. Then there are reasons which might force you to do it. if you are doing it just to reduce the build time, be prepared for other implications. Below are links which might help you.
https://flaviocopes.com/should-commit-node-modules-git/
Should "node_modules" folder be included in the git repository

grunt-package-modules cannot install dependency of itself

I'm trying to use the npm package grunt-package-modules to gather my npm_module dependencies for a bundled deployment but ran into the error when running the command grunt packageModules:
Fatal error: Refusing to install test as a dependency of itself
This error typically occurs when the name of the project also appears in the list of dependencies in package.json as was the case here, but that does not occur in the original file or the one that is copied into the dist folder.
I was able to get this error with the simplest project setup I could create from the examples given in the grunt tutorial and the package wiki. Is there something I'm missing in setting up this plugin?
package.json
{
"name": "test",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "",
"license": "ISC",
"dependencies": {
"underscore": "^1.8.3"
},
"devDependencies": {
"grunt": "^1.0.1",
"grunt-package-modules": "^1.0.0"
}
}
Gruntfile.js
module.exports = function(grunt) {
grunt.initConfig({
packageModules: {
dist: {
src: 'package.json',
dest: 'dist'
},
}
});
grunt.loadNpmTasks('grunt-package-modules');
}
I'm on a PC and had the same thing happen on my home PC but had my co-worker run through this same setup on his mac and it worked successfully for him. Also tried updating node and npm since we had different versions with no luck.

react-native rnpm windiows throws error

I am trying to build sample UWP app using react-native. Here is my package.JSON.
` {
"name": "netizen_uwp",
"version": "0.0.1",
"private": true,
"scripts": {
"start": "node node_modules/react-native/local-cli/cli.js start"
},
"dependencies": {
"react": "15.2.0-rc.1",
"react-native": "0.29.0-rc.0",
"react-native-windows": "0.29.0-rc.0"
},
"main": "index.android.js",
"devDependencies": {
"rnpm-plugin-windows": "^0.1.1"
},
"author": "",
"license": "ISC",
"description": ""
}`
When i run >rnpm windows,I am getting attached error even all my react/react-native/react-native-windows modules are latest.
Can some one help me here?
This is a general problem with react-native-windows being a plugin. We're always slightly behind the release train for react-native. You could have solved this problem using the --windowsVersion flag, as in:
rnpm windows --windowsVersion 0.29.0-rc.0
Also, as of react-native#>=0.31, you no longer need to use the rnpm global command line, and instance just use the command "react-native windows".

NPM - How to fix "No readme data"

I have a simple package.json:
{
"name": "camapaign",
"version": "0.0.1",
"scripts": {
"start": "node app.js"
},
"engines": {
"node": "0.10.15",
"npm": "1.3.5"
},
"repository": {
"type": "svn",
"url": ""
}
}
When I execute "npm install" i get the following warning which I would like to fix:
"npm WARN package.json camapaign#0.0.1 No readme data."
I have tried adding "README.md" & "readme.txt" to the same dir as the package but with no joy. What am I missing?
Simply adding a README.md file will not fix it, you should write something inside it; at least the project title and a brief description is good for people! But for NPM, one byte may be enough...
Doing so should stop showing the warnings.
Also, when you read that warning, ensure that the problem is not related to a 3rd party package.
Just set as private ;)
{
"name": "camapaign",
"version": "0.0.1",
"private": true,
"scripts": {
"start": "node app.js"
},
"engines": {
"node": "0.10.15",
"npm": "1.3.5"
},
"repository": {
"type": "svn",
"url": ""
}
}
Adding a README.md to your project root is the answer, but I've noticed that it takes a short while for NPM to pick up on this. Maybe a few minutes?
Add to package.json "readme": "README.md"
As of today, Apr 2017, just setting below in package.json, still works fine:
"private": true
this means its your private repository
even, with latest npm, it works fine:
npm update -g npm
> 3.10.8
my solution
npm show
npm dist-tag add
1.use npm show check the remote website deploy info.
eg.should like this:
SOME_PACKAGEs#0.3.60-beta | Proprietary | deps: 14 | versions: 289
<span style="color:red;">最新日志倒序在这里增加,注明作者+日期+功能</span>
dist
.tarball: https://registry.npmjs.org/xxx/-/xxx-0.3.60-beta.tgz
.shasum: 021e30640a62f13905b1e2b7a4facd169df46a1d
.integrity: sha512-9N4pUwwoYGNek34fCCCjURuQdx1K5VBlCWl4t1sy8wi3xul/N/TiDvjmUBF24t2Dg2fX6cFM9on+tftnVaEr7A==
.unpackedSize: 114.5 kB
dependencies:
#hanyk/rc-viewer: ^0.0.3 crypto-js: ^3.1.9-1 moment: ^2.25.3 react-dom: ^16.12.0 uuid: ^3.3.3
axios: ^0.19.0 dirty-json-ie11: ^0.0.2 query-string: ^6.9.0 react-quill: ^1.3.3 yqquill-image-drop-module: ^0.0
cookie-universal: ^2.0.16 md5: ^2.2.1 quill-delta-to-html: ^0.11.0 react-resizable: ^1.10.1
maintainers:
- jyjin <jyjin#qq.com>
- jyjin1 <jyjin1#163.com>
- jyjin2 <jyjin2#163.com>
dist-tags:
beta: 0.3.61-beta latest: 0.3.53-beta
published 26 minutes ago by jyjin1 <jyjin1#163.com>
2.npm dist-tag add [PACKAGE_NAME]#[VERSION]
and then update lasest 0.3.53-beta to 0.3.61-beta
npm dist-tag add SOME_PACKAGE#0.3.61-beta
3.npm show check agin
same to step 1
go back to your npm package site, all have refreshed!
Wish to helps, thanks~
[One Chinese Teach]希望对您有帮助,谢谢~