Posts

Showing posts with the label npm

Wordpress sage bootstrap not working

Image
Clash Royale CLAN TAG #URR8PPP Wordpress sage bootstrap not working I have setup a fresh wordpress installation with bedrock and I want to build a theme using the sage workflow. I've installed everything correctly and I've run a yarn build successfully. yarn build Now when I try something very simple in my body like this: <div class="container-fluid"> <row> <div class="col-md-4">col1</div> <div class="col-md-4">col2</div> <div class="col-md-4">col3</div> </row> </div> It doesn't actually seem to be working, I just get 3 divs below each other instead of in the bootstrap grid. When I inspect the element I see the correct css classes and stuff. During my setup of sage I've selected to load in Bootstrap so I am not sure why it's not working. Which framework would you like to load? [Bootstrap]: [0] None [1] Bootstrap [2] Bulma [3] F...

bash - output command that can install listed npm global packages

Image
Clash Royale CLAN TAG #URR8PPP bash - output command that can install listed npm global packages I know npm ls -g --depth=0 will produce output npm ls -g --depth=0 C:UsersleonAppDataRoamingnpm +-- create-react-app@1.5.2 +-- eslint@5.2.0 +-- prettier@1.13.7 `-- serve@9.4.0 I'm looking for a bash command that can output the following based on the above output: npm i -g create-react-app npm i -g eslint npm i -g prettier npm i -g serve 2 Answers 2 you can use the sed tool to handle this sed npm ls -g --depth=0 | sed -nE 's/^W+/npm i -g /p' It's really close, but how to produce them without the trailing @version – Leon Du 23 hours ago @version Add s/@.*//; just after the opening single quote. ...

How to reference npm'd sass files

Image
Clash Royale CLAN TAG #URR8PPP How to reference npm'd sass files If I npm install bootstrap, or npm install neat, how do I reference these in my scss files? Do I have to know the exact path in the npm_modules folder? If I try: @import "neat" or @import "bootstrap" I get an error saying it can't find the path. Is the best way to not even use npm and just download the scss files into a folder and reference it from there? By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

bash: npm: command not found in Debian 9.3

Image
Clash Royale CLAN TAG #URR8PPP bash: npm: command not found in Debian 9.3 I am using Debian 9.3. (stretch) I cannot run "npm" commands. Output for node -v node -v bash: node: command not found Output for nodejs -v nodejs -v v4.8.2 Output for npm -v npm -v bash: npm: command not found I'm a newbie on Debian and I can't understand what's happening. - I already reinstall Node.js - I already tried following the steps of the Official Page. - I already ran apt-get install npm Output E: Unable to locate package npm . - I was at Debian Testing and have the same error when I was there. apt-get install npm E: Unable to locate package npm Thanks for read and help - Melt Visit this link: stackoverflow.com/questions/18130164/… Hope that helps you – harish durga Feb 23 at 7:57 Possible duplicate of nodej...

How to import popper.js? (not with a CDN, installed with NPM)

Image
Clash Royale CLAN TAG #URR8PPP How to import popper.js? (not with a CDN, installed with NPM) I am aware there is other similar questions such as this one. However mine is quite different. I would like to know how to import Popper.js using the import directive. So far I have this on my app.js (but it does not work yet) import app.js import * as popper from 'popper.js' window.popper = popper But I have to mangle every example I find on the Internet with popper. . Moreover this include takes two lines while the traditional writing window.popper = require('popper.js') takes only one line. popper. window.popper = require('popper.js') What is the correct way to import Popper.js and other similar JS libraries? By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subje...

Laravel 5.6 - webpack: Uncaught ReferenceError: jQuery is not defined

Image
Clash Royale CLAN TAG #URR8PPP Laravel 5.6 - webpack: Uncaught ReferenceError: jQuery is not defined I got package.json: "devDependencies": { "axios": "^0.18.0", "bootstrap": "^4.1.3", "bootstrap-datepicker": "^1.7.1", "browser-sync": "^2.24.6", "browser-sync-webpack-plugin": "^2.0.1", "chart.js": "^2.7.2", "cross-env": "^5.2.0", "datatables": "^1.10.18", "easy-pie-chart": "^2.1.7", "font-awesome": "4.7.0", "fullcalendar": "^3.9.0", "jquery": "^3.3.1", "jquery-sparkline": "^2.4.0", "jvectormap": "^2.0.4", "laravel-mix": "^2.1.11", "load-google-maps-api": "^1.2.0", "lodash": "^4....

Gulp, postcss and UnCSS

Image
Clash Royale CLAN TAG #URR8PPP Gulp, postcss and UnCSS I'm trying to clean up my css and use UnCSS with gulp and Postcss. I have this: gulp.task('optim-css', function() { var stream1 = gulp.src(['dev/css/bootstrap.min.css','dev/css/custom.css']) .pipe(postcss([ rucksack() ])) .pipe(postcss(uncss({ html: ['http://localhost/olssonseder/','http://localhost/olssonseder/lyssna/','http://localhost/olssonseder/repertoar/','http://localhost/olssonseder/kontakta/','http://localhost/olssonseder/kontakta/','http://localhost/olssonseder/om-gitarren/'], ignore: [new RegExp('.b-lazy*'), new RegExp('.stickyFooter')] })) ); var stream2 = gulp.src(['dev/css/responsive-nav.css','dev/css/lity.css','dev/css/mp3-player-button.css']) return merge(stream1, stream2) .pipe(concat(...

What exactly is the the 'react-scripts start' command?

Image
Clash Royale CLAN TAG #URR8PPP What exactly is the the 'react-scripts start' command? I've been working with a React project, using react-create-app , and I have two options to start the project: react-create-app First way: npm run start with the definition at the package.json like this: npm run start package.json "start": "react-scripts start", "start": "react-scripts start", Second way: and npm start npm start What is the difference between these two commands? And what is the purpose of the react-scripts start ? react-scripts start I tried to found the definition, but I just found a package with the name, and I still don't know what is the meaning of this command. are you using create-react-app? seems like its a scripts related to that specific project – Sagiv b.g Jun 6 at 13:49 ...

How to read GitLab variables in CI/CD inside package.json

Image
Clash Royale CLAN TAG #URR8PPP How to read GitLab variables in CI/CD inside package.json I have a private-module (private npm package) reference in my package.json file. Module is hosted on the company account (GitLab platform) and we use GitLab CI/CD. private-module package.json Problem is that I need to insert access token of our repository on a place of <token> (you can see in the snippet). access token <token> I need help with figuring out how to read gitlab environment variables inside my package.json. "dependencies": { "private-module": "git+http://<username>:<token>@url.git", } I found out that it is possible to create config key in package.json and define variables there but because of security reasons our variables need to be provided during CI step. config package.json 1 Answer 1 One possible solution is using envsubst: Your pa...

Latest compatible version for npm and node

Image
Clash Royale CLAN TAG #URR8PPP Latest compatible version for npm and node I am using nodist version 0.8.8 which is the latest one. By using this I installed latest node version 10.7.0 and latest npm version 6.1.0 . I assured it by reading the following document. https://nodejs.org/en/download/releases/ Nw I surfed in google to find whether npm 6.2.0 is available? If it is I want to know the corresponding node version for it. Thanks in advance. Use appropriate tags to get help. The question is tagged in angular but related to nodejs. – Dhananjai Pai 27 mins ago 2 Answers 2 Node and npm are independent tools. You can very well install different versions of either. Use npm i -g npm@latest to get the latest npm installed with your node. use node -v and ...

Failed to exec start script - EventEmitter. (/usr/local/lib/node_modules/npm/lib/utils/lifecycle.js:279:16)

Image
Clash Royale CLAN TAG #URR8PPP Failed to exec start script - EventEmitter.<anonymous> (/usr/local/lib/node_modules/npm/lib/utils/lifecycle.js:279:16) I have installed node 8.10 and downgrade to npm 4 because i have error message with npm 5. ******************************************************************************* ERROR: npm 5 is not supported yet Then I use the command to downgrade npm npm install -g npm@4. So I create my projet $>npm install -g create-react-native-app $>create-react-native-app AwesomeProject $>cd AwesomeProject $>npm start And then I have the following error message. > AwesomeProject@0.1.0 start /private/var/root/AwesomeProject > react-native-scripts start 09:42:16: Unable to start server See https://git.io/v5vcn for more information, either install watchman or run the following snippet: sudo sysctl -w kern.maxfiles=5242880 sudo sysctl -w kern.maxfilesperproc=524288 npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! AwesomeProject...

How I Can Run NPM Commands in VSCode Terminal?

Image
Clash Royale CLAN TAG #URR8PPP How I Can Run NPM Commands in VSCode Terminal? i want to work on npm terminal in VSCode such as git and i install an extension to support NPM but didn’t work and i just got the error 'npm' is not recognized as an internal or external command,operable program or batch file. EDIT i’m already installed node.js , i’m just want to work in the regular command prompt rather than node.js cmd and i got errors but it worked well when i open cmd as an admin after adding 'C:Program Filesnodejs' to the path. now how i work with npm in cmd without open it as an admin ? i think it’s a permissions issue so if anyone help me solve it ! Install Node.js from (nodejs.org) – Alex Baban 1 hour ago Node.js tutorial in VS Code – Gino Mempin 59 mins ago ...