node-modules

Whitelist folder inside ignored folder [duplicate]

纵饮孤独 提交于 2019-12-02 07:34:11
This question already has an answer here: Git Including an arbitrarily nested subfolder when its parent has been excluded in .gitignore 2 answers I have a node.js project with some node_modules. Now a node_module was not upto expectations and I manually changed, compiled and put it back into the node_module folder. I want to add this module to the GIT, however, the node_modules are listed in my gitignore (obviously). I tried the following /node_modules !/node_modules/the_module/** But files are not showing up when doing git status Is it possible to whitelist one package inside a ignored folder

Angular 2 how to load 3rd party vendor node modules with sub dependencies angular-cli

浪尽此生 提交于 2019-12-02 07:04:41
Loading a single node module in Angular 2 an angular-cli bootstraped project is described within the wiki pretty well. Just being curious, how do I nicely load a more complex node module within a project bootstrapped with angular-cli? E.g. angular2-apollo relies on several sub-dependencies like apollo-client, graphql, lodash, ... I added the node module to angular-cli-build.js var Angular2App = require('angular-cli/lib/broccoli/angular2-app'); module.exports = function(defaults) { return new Angular2App(defaults, { vendorNpmFiles: [ '...', 'angular2-apollo/**' ] }); }; And registered the node

Tslint and node-modules errors

半城伤御伤魂 提交于 2019-12-02 04:27:54
I am having problems with running tests of angular using jasmine or cucumber or whatever framework. The app is written in angular 5 that uses typescript and generated by JHipster. The result of running tests is this and it seems to last hours and hours in cmd without any change: C:\Users\67563478\new_workspace\onconsup123\src\test\javascript\spec>yarn test yarn run v1.5.1 $ npm run lint && karma start src/test/javascript/karma.conf.js > oncosup@0.0.0 lint C:\Users\67563478\new_workspace\onconsup123 > tslint --project tsconfig.json -e 'node_modules/**' Hash: e0bdc8cc97632b01d813 Version:

Angular 2 Node Bourbon Error

微笑、不失礼 提交于 2019-12-01 22:42:15
ERROR in ./node_modules/css-loader? {"sourceMap":false,"importLoaders":1}!./node_modules/postcss- loader/lib?{"ident":"postcss","sourceMap":false}!./node_modules/sass- loader/lib/loader.js?{"sourceMap":false,"precision":8,"includePaths": []}!./src/styles.scss Module build failed: var path = require('path'); ^ Invalid CSS after "v": expected 1 selector or at-rule, was "var path = require(" in /home/dada/AngularProjects/playground2/node_modules/bourbon/index.js (line 1, column 1) Hello... I'm trying to use bourbon in my Angular 2 project but when I install the package and try to import bourbon

Angular 2 Node Bourbon Error

我们两清 提交于 2019-12-01 21:51:30
问题 ERROR in ./node_modules/css-loader? {"sourceMap":false,"importLoaders":1}!./node_modules/postcss- loader/lib?{"ident":"postcss","sourceMap":false}!./node_modules/sass- loader/lib/loader.js?{"sourceMap":false,"precision":8,"includePaths": []}!./src/styles.scss Module build failed: var path = require('path'); ^ Invalid CSS after "v": expected 1 selector or at-rule, was "var path = require(" in /home/dada/AngularProjects/playground2/node_modules/bourbon/index.js (line 1, column 1) Hello... I'm

Node module.exports returns undefined

独自空忆成欢 提交于 2019-12-01 17:52:37
I am having an issue with Node.js and module.exports . I understand that module.exports is a call to return an object, that object having whatever properties it is assigned. If I have a file structure like this: // formatting.js function Format(text) { this.text = text; } module.exports = Format; with this: // index.js var formatting = require('./formatting'); Is there a way to initialize a Format object and use it like this? formatting('foo'); console.log(formatting.text); Whenever I try to do it that way, I get an error that says formatting is not a function . I then have to do it like this:

node: could not initialize ICU (check NODE_ICU_DATA or --icu-data-dir parameters)

北城以北 提交于 2019-12-01 16:15:58
I was trying to upgrade node version on our CI environment from node 6 to node 8. I updated the full-icu version as well. the $NODE_ICU_DATA is set to /usr/lib/node_modules/full-icu but still get this error node: could not initialize ICU (check NODE_ICU_DATA or --icu-data-dir parameters) Any idea, how to fix this? You need to run npm install including the full-icu package. It's full-icu 's postinstall step which downloads the appropriate bits for the currently executing node. Note that multiple files may show up in the full-icu directory, that's OK. If you already had full-icu installed, but

Error in connecting node.js application to hive

这一生的挚爱 提交于 2019-12-01 08:11:25
I have used node-hive and thrift for connecting my node js application to hive, but none of them works. Are there any other node modules for getting connected to hive ? As node node-thrift-hive and node-hive both module are abandoned, not commit still 4 to 5 year old, I have same issue and I am using Node 0.12 and below is my solutions. Step -1: You have to setup Hiveserver2 , my hive version is 1.2 and hadoop version 2.7 https://cwiki.apache.org/confluence/display/Hive/Setting+Up+HiveServer2 If you don't want to follow Step-1 then upgrade your node js to 4.5 > and use jshs2 npm In my case I

Error in connecting node.js application to hive

喜欢而已 提交于 2019-12-01 06:03:47
问题 I have used node-hive and thrift for connecting my node js application to hive, but none of them works. Are there any other node modules for getting connected to hive ? 回答1: As node node-thrift-hive and node-hive both module are abandoned, not commit still 4 to 5 year old, I have same issue and I am using Node 0.12 and below is my solutions. Step -1: You have to setup Hiveserver2 , my hive version is 1.2 and hadoop version 2.7 https://cwiki.apache.org/confluence/display/Hive/Setting+Up

What could cause an error related to npm not being able to find a file? No contents in my node_modules subfolder. Why is that?

落花浮王杯 提交于 2019-11-30 19:16:14
I'm trying to run npm install in the angular project folder I got from ASP.NET Boilerplate and I'm getting an error that is "related to npm not being able to find a file." D:\Dev\AspNetBoilerplate\MyProject\3.5.0\angular>npm install npm WARN deprecated @types/moment@2.13.0: This is a stub types definition for Moment (https://github.com/moment/moment). Moment provides its own type definitions, so you don't need @types/moment installed! npm WARN codelyzer@3.2.2 requires a peer of @angular/compiler@^2.3.1 || >=4.0.0-beta <5.0.0 but none is installed. You must install peer dependencies yourself.