Visual Studio 2017: The command "gulp" exited with code 9009 - node.js

Net App and my issue is when I hit Rebuild it throws an error: Visual Studio 2017: The command "gulp" exited with code 9009
Full log you can see [here][1]
The short story:
Everything worked fine until yesterday, where I was updating python from 2.x to python3.
After that my global variable $(PATH) became instead of C:\Program Files\nodejs => C:\python39\
I edited $(PATH) and put it again C:\Program Files\nodejs into my external tools:
https://i.imgur.com/HtQkAYW.png
I also add as second location of external tools my %AppData% folder for npm as you can see on the image above. I checked that folder and there is a gulp cmd file. So it should be recognizable.
However when I hit rebuild, I still have this error as I shown from my logs.
This is my package.json file:
{
"name": "testtest",
"version": "1.0.0",
"private": true,
"scripts": {
"css": "gulp"
},
"engines": {
"node": "5.9.1",
"npm": "3.7.3"
},
"devDependencies": {
"gulp": "^3.9.1",
"gulp-concat": "^2.6.0",
"gulp-htmlclean": "^2.7.22",
"gulp-less": "^3.1.0",
"gulp-minify-css": "^1.2.4",
"gulp-sourcemaps": "^2.3.0",
"gulp-uglify": "^2.1.2",
"gulp-util": "^3.0.7",
"merge-stream": "^1.0.0"
}
}
This is mine setup of npm version from cli:
{
gulp: '3.9.1',
npm: '6.14.6',
ares: '1.16.0',
brotli: '1.0.7',
cldr: '37.0',
http_parser: '2.9.3',
icu: '67.1',
llhttp: '2.1.2',
modules: '72',
napi: '6',
nghttp2: '1.41.0',
node: '12.18.4',
openssl: '1.1.1g',
tz: '2019c',
unicode: '13.0',
uv: '1.38.0',
v8: '7.8.279.23-node.39',
zlib: '1.2.11'
}
I tried different versions of nodejs (12.x.x and 10.x.x) I have same behavior.
[1]: https://pastebin.com/4srU2yB0

Related

Webpack Errors - Cannot Resolve 'crypto', 'http', and 'https' in Vue.js

Question Background
I'm trying to add Wallet Connect to our project(Vue.js), form here: https://docs.walletconnect.com/quick-start/dapps/web3-provider, I used this command to install it.
import it in my js file
import Web3 from 'web3'
import WalletConnectProvider from '#walletconnect/web3-provider'
it shows those errors:
ERROR Failed to compile with 7 errors
These dependencies were not found:
* crypto in ./node_modules/eth-lib/lib/bytes.js, ./node_modules/web3-eth-accounts/lib/index.js and 1 other
* http in ./node_modules/xhr2-cookies/dist/xml-http-request.js
* https in ./node_modules/xhr2-cookies/dist/xml-http-request.js
To install them, you can run: npm install --save crypto http https
Try
I install those packages.
npm i crypto-browserify
npm i https-browserify
npm i stream-http
Then edit my vue.config.js files:
resolve: {
fallback: {
crypto: require.resolve('crypto-browserify'),
http: require.resolve('stream-http'),
https: require.resolve('https-browserify'),
},
},
and the errors becomes:
WebpackOptionsValidationError: Invalid configuration object. Webpack has been initialised using a configuration object that does not match the API schema.
configuration.resolve has an unknown property 'fallback'.
These properties are valid:
object { alias?, aliasFields?, cachePredicate?, cacheWithContext?, concord?, descriptionFiles?, enforceExtension?, enforceModuleExtension?, extensions?, fileSystem?, mainFields?, mainFiles?, moduleExtensions?, modules?, plugins?, resolver?, symlinks?, unsafeCache?, useSyncFileSystemCalls? }
This is my package.json file look like:
{
"dependencies": {
"#walletconnect/web3-provider": "^1.7.8",
"crypto-browserify": "^3.12.0",
"https-browserify": "^1.0.0",
"os": "^0.1.2",
"stream": "^0.0.2",
"stream-http": "^3.2.0",
"vue": "^2.6.10",
"web3": "^1.7.3",
},
"devDependencies": {
"#vue/cli-service": "^3.7.0",
"webpack": "^4.39.3",
"webpack-bundle-analyzer": "^3.6.0",
"webpack-dev-server": "^3.11.2",
"webpack-merge": "^4.2.1",
"webpack-node-externals": "^1.7.2",
"webpack-plugin-hash-output": "^3.2.1",
"webpack-spritesmith": "^1.0.1",
}
}
and my node version is v10.24.1, the version still can't be upgraded temporarily.
v10.24.1
As seen from the above, I have installed the suggested packages from the errors (crypto-browserify, stream-http, and https-browserify) and have included them in the vue.config.js.
How can I solve this?
You are using Webpack 4. The fallback option is only available from Webpack >=5.0.0 onwards.
For Webpack 4, consider using alias option.

Cannot find module '#angular/compiler' when runnig ng serve

I've updated the dependencies and since then, I've got this error message when run ng serve:
An unhandled exception occurred: Cannot find module '#angular/compiler'
Require stack:
I've tried already this solutions: Cannot find module '#angular/compiler'
But didn't work for me.
Also deleted node_modules, checkout the project again.
Is there something wrong in my dependencies or what can I do to get it running again?
This is my package.json:
{
"name": "wichteli",
"version": "0.0.0",
"scripts": {
"ng": "ng",
"start": "ng serve --host 0.0.0.0 --disable-host-check",
"build": "ng build",
"test": "ng test",
"lint": "ng lint",
"test:ci": "ng test --browsers ChromeHeadlessCI --code-coverage true --watch false",
"e2e:ci": "ng e2e --protractor-config=e2e/protractor-ci.conf.js",
"e2e": "ng e2e"
},
"private": true,
"devDependencies": {
"#angular-devkit/build-angular": "~12.0.1",
"#angular/compiler-cli": "~12.0.1",
"#types/jasmine": "~3.7.4",
"#types/node": "^15.6.0",
"codelyzer": "^6.0.2",
"jasmine-core": "~3.7.1",
"jasmine-spec-reporter": "~7.0.0",
"karma": "~6.3.2",
"karma-chrome-launcher": "~3.1.0",
"karma-coverage": "~2.0.3",
"karma-coverage-istanbul-reporter": "^3.0.3",
"karma-jasmine": "~4.0.1",
"karma-jasmine-html-reporter": "^1.6.0",
"karma-spec-reporter": "0.0.32",
"protractor": "~7.0.0",
"puppeteer": "^9.1.1",
"ts-node": "~9.1.1",
"tslint": "~6.1.0",
"typescript": "~4.2.4"
}
}
npm version output:
{
npm: '7.11.2',
node: '12.18.1',
v8: '7.8.279.23-node.38',
uv: '1.38.0',
zlib: '1.2.11',
brotli: '1.0.7',
ares: '1.16.0',
modules: '72',
nghttp2: '1.41.0',
napi: '6',
llhttp: '2.0.4',
http_parser: '2.9.3',
openssl: '1.1.1g',
cldr: '37.0',
icu: '67.1',
tz: '2019c',
unicode: '13.0'
}
ng --version output:
Angular CLI: 12.0.1
Node: 12.18.1
Package Manager: npm 7.11.2
OS: win32 x64
Angular:
...
Package Version
------------------------------------------------------
#angular-devkit/architect 0.1200.1 (cli-only)
#angular-devkit/core 12.0.1 (cli-only)
#angular-devkit/schematics 12.0.1 (cli-only)
#schematics/angular 12.0.1 (cli-only)
I've found a solution.
First, check how to update:
https://update.angular.io/?l=2&v=12.0-12.0
Was updating from 12 to 13
After this, ng serve worked more or less with a few error messages that some dependencies couldn't be resolved like #angular/core
npm install #angular/core
and for all other findings
after this, all was working again

NativeBase setup/installation error

I am trying to setup/install Native-Base in my React-Native project using the official document. But getting error every time.
Command: npm install native-base --save
Error:
npm ERR! Unexpected end of JSON input while parsing near '...yish/-/is-arrayish-0.'
npm ERR! A complete log of this run can be found in:
npm ERR! /home/abhijitsrivastava/.npm/_logs/2018-07-04T06_03_24_057Z-debug.log
System Specification:
node --version
v8.1.0
npm --version
6.0.0
react-native --version
react-native-cli: 2.0.1
react-native: 0.55.4
Machine: Ubuntu 16.04LTS
IDE: Visual Studio Code Version 1.23.0
As per the compatibility matrix every thing is looking OK. I don't know how can I fix it.
Update :
Here is my package.json file.
{
"name": "xyz",
"version": "0.0.1",
"private": true,
"scripts": {
"start": "node node_modules/react-native/local-cli/cli.js start",
"test": "jest"
},
"dependencies": {
"react": "16.3.1",
"react-native": "^0.55.4",
"react-navigation": "^2.3.1",
"redux": "^4.0.0"
},
"devDependencies": {
"babel-jest": "23.0.1",
"babel-preset-react-native": "4.0.0",
"jest": "23.1.0",
"react-test-renderer": "16.3.1"
},
"jest": {
"preset": "react-native"
}
}
I have noticed in a recent forum post where they've recommeneded to use yarn in place of npm for installing the dependencies and for creating the react native app.
Yarn: https://yarnpkg.com/en/docs/install#windows-stable
After installing yarn try issuing the below command,
yarn add native-base --save
Hope this helps!
Tried on same lines, no issues
{
"name": "NativebaseKitchenSink",
"version": "2.5.2",
"private": true,
"devDependencies": {
"babel-eslint": "7.2.3",
"eslint": "4.4.1",
"eslint-plugin-flowtype": "2.35.0",
"eslint-plugin-import": "2.7.0",
"eslint-plugin-jsx-a11y": "6.0.2",
"eslint-plugin-prettier": "2.1.2",
"eslint-plugin-react": "7.1.0",
"eslint-plugin-react-native": "3.0.1",
"flow-bin": "0.52.0",
"flow-typed": "2.1.5",
"husky": "0.14.3",
"jest": "20.0.4",
"jest-expo": "25.0.0",
"prettier": "1.5.3",
"react-test-renderer": "16.3.1"
},
"scripts": {
"start": "react-native start",
"android": "react-native run-android",
"ios": "react-native run-ios",
"test": "node node_modules/jest/bin/jest.js --watch"
},
"jest": {
"preset": "react-native"
},
"dependencies": {
"color": "1.0.3",
"lodash": "4.13.1",
"moment": "2.13.0",
"native-base": "^2.6.1",
"react": "16.3.1",
"react-native": "0.55.4",
"react-navigation": "1.5.0"
}
}
To solve this issue you can try to change your node js version
npm install native-base this is giving issue with 18.7.0 version but
change to
version 16.16.0 LTS for this it is working properly
https://nodejs.org/en/

Install of jspm to ^0.16.34 has no registry property provided

I am fairly new to front end development and am working through Brian Noyes Aurelia Fundamentals course
I have installed the following;
node-v4.4.4x64
Git-2.8.2-64
Also I ran
npm install jspm --save-dev
and had this result
When I ran
npm install =g jspm gulp http-server
I got messages saying that the following are deprecated.
graceful-fs#3.0.8 and lodash#1.0.2
then when I ran
jsm init
I got an error
The package.json file is
{
"jspm": {},
"devDependencies": {
"jspm": "^0.16.34"
}
}
How do I fix this error?
Credit to user danzinator on github.
The fix:
Adding in the "registry": "npm" line to Package.json (even though the documentation says by default this registry should be used?)
{
"jspm": {
"registry": "npm",
"directories": {
"baseURL": "wwwroot",
"packages": "jspm_packages"
},
"devDependencies": {
"babel": "babel-core#^5.8.22",
"babel-runtime": "^5.8.20",
"browser-sync": "^2.9.3",
"core-js": "^1.1.0",
"gulp": "^3.9.0",
"gulp-tslint": "^3.2.0",
"jspm": "^0.16.2"
}
},
"devDependencies": {
"jspm": "^0.16.2",
"gulp": "^3.9.0",
"gulp-tslint": "^3.2.0",
"browser-sync": "^2.9.3"
}
}

Warning on node showing wrong node version. Could it cause sqlite3 Error?

When running npm install I get the warning message:
npm WARN engine module#0.0.1: wanted: {"node":">= 0.2.9 < 0.7.0"} (current: {"node":"0.12.2","npm":"2.7.4"})
But in the package.json is specified node 5.3.0 (pls. see below)
Why does the message tell me the version 0.12 when the current version is 5.3?
Could it be the case for the error with sqlite3? I get the message:
Error: Cannot find module '...\node-v47-win32-x64\node_sqlite3.node'
at Function.Module._resolveFilename (module.js:326:15)
But in fact npm intall creates me node-v14-win32-x64 not node-v47-win32-x64 directory.
{
"name": "aesku-hera",
"version": "0.0.0",
"private": true,
"scripts": {
"start": "supervisor ./bin/www"
},
"engines": {
"node": "5.3.0",
"npm": "2.7.4"
},
"dependencies": {
"body-parser": "^1.12.4",
"connect-busboy": "0.0.2",
"cookie-parser": "~1.3.5",
"debug": "~2.2.0",
"execsql": "0.0.3",
"express": "~4.12.4",
"gm": "^1.18.1",
"jade": "^1.9.2",
"jsonfile": "^2.2.3",
"module": "0.0.1",
"moment": "^2.10.3",
"morgan": "~1.5.3",
"multer": "0.1.6",
"node-hl7": "^0.1.3",
"node-json-db": "^0.6.3",
"node-mv": "^0.1.3",
"periodic-task": "^0.1.0",
"pg": "^4.4.0",
"request": "^2.58.0",
"serve-favicon": "~2.2.1",
"sqlite3": "^3.1.1",
"string": "^3.3.0"
}
}
The engines section in your package.json is just an indicator of which engine (like node) and the version your code would work on - see the documentation for more details.
It is most likely that your locally installed Node is version 0.12. You should upgrade it to 5.3.0 or higher and then try reinstalling your packages.
You can quickly verify your Node version by using the command -
node -v

Resources