I am trying to install bootstrap in my app directory on my Mac. I have tried tips from different topics trying to solve this problem but something is different with my problem it seems.
Below are the commands that i put in the command line and the errors that it spits out.
Jains-iMac:conFusion thejains$ bower init
? name conFusion
? description Website for an awesome restaurant
? main file index.html
? what types of modules does this package expose?
? keywords conFusion, Fusion Restaurant
? authors Mayank Jain
? license MIT
? homepage
? set currently installed components as dependencies? Yes
? add commonly ignored files to ignore list? Yes
? would you like to mark this package as private which prevents it from being accidentally published to the registry? Yes
{
name: 'conFusion',
description: 'Website for an awesome restaurant',
main: 'index.html',
moduleType: [],
keywords: [
'conFusion',
'Fusion',
'Restaurant'
],
authors: [
'Mayank Jain'
],
license: 'MIT',
homepage: '',
private: true,
ignore: [
'**/.*',
'node_modules',
'bower_components',
'test',
'tests'
]
}
? Looks good? Yes
Jains-iMac:conFusion thejains$ bower install bootstrap -S
bower bootstrap#* not-cached git://github.com/twbs/bootstrap.git#*
bower bootstrap#* resolve git://github.com/twbs/bootstrap.git#*
bower bootstrap#* ECMDERR Failed to execute "git ls-remote --tags --heads git://github.com/twbs/bootstrap.git", exit code of #69 Agreeing to the Xcode/iOS license requires admin privileges, please re-run as root via sudo.
Additional error details:
Agreeing to the Xcode/iOS license requires admin privileges, please re-run as root via sudo.
Jains-iMac:conFusion thejains$ bower install twitter
bower twitter#* not-cached git://github.com/twbs/bootstrap.git#*
bower twitter#* resolve git://github.com/twbs/bootstrap.git#*
bower twitter#* ECMDERR Failed to execute "git ls-remote --tags --heads git://github.com/twbs/bootstrap.git", exit code of #69 Agreeing to the Xcode/iOS license requires admin privileges, please re-run as root via sudo.
Additional error details:
Agreeing to the Xcode/iOS license requires admin privileges, please re-run as root via sudo.
P.S. I have tried changing the permissions with sudo chown and also bower clean cache. they didn't work.
Related
For example, I installed tailwind CSS via npm by npm init && npm install tailwindcss. After that, I make a script in package.json like "build-css": "tailwindcss build src/styles.css -o public/styles.css"(I just copy-paste it from stuckoverflow). Now focus on -o, how a developer knows there is a -o option available for tailwind. I checked node-module/tailwindcss/script/build.js but there is no such thing that I currently understand( I mean, I found 0 clue). Pls give light on it. Do we have some standardization or unwritten rule that creator of npm package follow?
The scripts field in your package.json defines commands that are run with npm run in the context of npm. This allows you to use the command-line interface that are provided by different npm packages, without installing them globally. Many of these CLIs also expose a --help flag, or a help command.
To run the CLI from a npm package not installed globally, you may need to use npx. In your case, you can run:
npx tailwindcss
which tells you that there is a help command that gives you more information.
$ npx tailwindcss
tailwindcss 2.1.2
Usage:
tailwind <command> [options]
Commands:
help [command] More information about the command.
init [file] Creates Tailwind config file. Default: tailwind.config.js
build <file> [options] Compiles Tailwind CSS file.
If you are comfortable reading the source code in your node_modules folder, you can also find more information about these commands and the code that runs. To find where the CLI is defined, you can check node_modules/tailwindcss/package.json, which defines a bin key. In this case, it shows that the tailwindcss command comes from lib/cli.js. While the code is transformed, you can poke around and find lib/cli/commands/build.js, which contains the options for the build command.
const options = [{
usage: '-o, --output <file>',
description: 'Output file.'
}, {
usage: '-c, --config <file>',
description: 'Tailwind config file.'
}, {
usage: '--no-autoprefixer',
description: "Don't add vendor prefixes using autoprefixer."
}];
If the package is open source, you may be able to find the original, untransformed source online. In Tailwind's case, they have a Github repo where you can view the raw source for the build command.
I published a package via Github's package manager, and it seemed to work. It appears on the repo's web page and on my profile page. When I run
npm install #franklinharvey/time-remaining#1.0.0
locally it works, but when I try it in a new environment such as Replit or CodeSandbox it does not appear. It also does not appear on npmjs.com
Here are some config files
.npmrc
registry=https://npm.pkg.github.com/franklinharvey
.yarnrc
"#franklinharvey:time-remaining" "https://npm.pkg.github.com"
package.json (partial)
"name": "#franklinharvey/time-remaining",
"publishConfig": {
"registry": "https://npm.pkg.github.com"
},
"repository": {
"url": "git#github.com:franklinharvey/time-remaining.git"
}
.npmignore
.gitignore
src/
*.log
*.tsbuildinfo
package-lock.json
yarn.lock
coverage
node_modules
Our company also publishes its npm packages via github. Your post gave me an idea, and it fixed the issue on our end.
In a nutshell, I think you need both a fuller .npmrc where you're trying to download the package and not succeeding (containing the registry info as below); as well as to do an npm login if your package is private.
My .npmrc:
#my-company-s-npm-account:registry=https://npm.pkg.github.com/
//npm.pkg.github.com/:_authToken=[GITHUB_AUTH_TOKEN_HERE_WITHOUT_BRACKETS]
registry=https://registry.npmjs.org/
Hope this fixes your issue.
If you can't add an .npmrc or do an npm login where you're trying to install it, and your package is private, I'm not sure how to help.
I want to create React Native Application using WebStorm. but some errors occurs while doing it.
/usr/local/bin/node /usr/local/lib/node_modules/react-native-cli/index.js init untitled
yes
prompt: Directory untitled already exists. Continue?: (no) yes
This will walk you through creating a new React Native project in /Users/sinamnouri/ReactNative/untitled
Using yarn v1.16.0
Installing react-native...
yarn add v1.16.0
error An unexpected error occurred: "EACCES: permission denied, scandir '/Users/sinamnouri/.config/yarn/link'".
info If you think this is a bug, please open a bug report with the information provided in "/Users/sinamnouri/ReactNative/untitled/yarn-error.log".
info Visit https://yarnpkg.com/en/docs/cli/add for documentation about this command.
Error: Command failed: yarn add react-native --exact
at checkExecSyncError (child_process.js:616:11)
at execSync (child_process.js:652:15)
at run (/usr/local/lib/node_modules/react-native-cli/index.js:294:5)
at createProject (/usr/local/lib/node_modules/react-native-cli/index.js:249:3)
at /usr/local/lib/node_modules/react-native-cli/index.js:217:7
at /usr/local/lib/node_modules/react-native-cli/node_modules/prompt/lib/prompt.js:316:32
at /usr/local/lib/node_modules/react-native-cli/node_modules/async/lib/async.js:142:25
at assembler (/usr/local/lib/node_modules/react-native-cli/node_modules/prompt/lib/prompt.js:313:9)
at /usr/local/lib/node_modules/react-native-cli/node_modules/prompt/lib/prompt.js:322:32
at /usr/local/lib/node_modules/react-native-cli/node_modules/prompt/lib/prompt.js:597:5 {
status: 1,
signal: null,
output: [ null, null, null ],
pid: 16730,
stdout: null,
stderr: null
}
Command `yarn add react-native --exact` failed.
Done
it looks like it's about permission, how can I handle permission in WebStorm.
You can't handle permissions in WebStorm (and this actually has nothing to do with the IDE). Such errors usually mean that the .config folder in your HOME is not owned by you, so you have no permissions to write to it. Check if your user (the one you run WebStorm with) has the right privileges in ~/.config, and give it the needed permissions ( sudo chown -R $USER:$GROUP ~/.config )
I have a react component project created with nwb. I'm using Travis and semantic-release to make the releases.
But now, when I publish a new version, the package published from Travis is almost empty, and only have three files: README, LICENSE and package.json.
My .travis.yml configuration...
sudo: false
language: node_js
cache:
directories:
- ~/.npm
notifications:
email: false
node_js:
- '8'
before_install:
- npm install npm codecov.io coveralls
after_success:
- cat ./coverage/lcov.info | ./node_modules/codecov.io/bin/codecov.io.js
- cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js
- npm run travis-deploy-once "npm run semantic-release"
branches:
only:
- master
The travis build looks ok and I can't see any errors. It discovers the new version and publish it, but just publish those three files.
The public Github repository is this...
https://github.com/rigobauer/react-abc2svg
... and you can check the travis build here...
https://travis-ci.org/rigobauer/react-abc2svg/jobs/332199646
If I set a version number manually in package.json and run npm publish in my computer, then the package is published correctly.
I've tried cleaning npm caches, reinstalling all dependencies, recreating .travis.yml using semantic-release-cli setup, etc. But I always get the same result. When I try to upgrade or install the package in another project, the directory in node_modules only have those three files.
Any idea of where could be the problem?
UPDATED: I've recreated the project from scratch with nwb, reinstalling dependencies, etc. And I have the same problem.
UPDATED 2: I have the list of directories configured in package.json like this...
"files": [
"css",
"es",
"lib",
"umd"
]
... but I've also tried creating a .npmignore file. The problem persists.
Got it! Thanks to the semantic-release guys, I realize that I have to manually indicate to Travis to run my build script (generated with nwb). So just changing this to .travis.yml make it work...
.......
after_success:
- cat ./coverage/lcov.info | ./node_modules/codecov.io/bin/codecov.io.js
- cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js
- npm run build
- npm run travis-deploy-once "npm run semantic-release"
........
I thought that Travis was doing that automatically, because I have another component project made using the exactly same process, and that package was ok (and that's what was driving me crazy). After reading their answer, I re-check everything and realize that the I made the first publish of that package manually, and after that I incorporate semantic-release. The thing is that the next commits weren't related to feature or fix, so semantic-release doesn't generate a new release, and the original package was still there.
In case someone encounter the same type of issue, here is the Git issue with the answer: https://github.com/semantic-release/semantic-release/issues/615
I've found this in the Travis docs, maybe you should add the skip_cleanup: true option to your travis.yml (just a guess)
I'm new to Chef and followed this tutorial (http://www.opinionatedprogrammer.com/2011/06/chef-solo-tutorial-managing-a-single-server-with-chef/) in which I created 4 files: install.sh, solo.json, solo.rb and default.rb. (default.rb is under the directory coobooks/zombie/recipes/ and all other files are under a top level chef directory). I ran the install.sh script which basically installs ruby and chef and then issues "chef-solo -c solo.rb -j solo.json" but got this error:
"ERROR: Cookbook npm not found. If you're loading npm from another cookbook, make sure you configure the dependency in your metadata."
I think I'm incorrectly referencing the npm package or including a particular node package (Mocha) the wrong way. Can anyone please give me any guidance on this error? Thanks.
My default.rb file:
package 'nodejs'
package 'npm'
include_recipe "npm"
npm_package "default" do
enable true
end
npm_package "mocha#1.17.1"
My solo.json file:
{
"run_list": [ "recipe[npm]", "recipe[zombie::default]" ]
}
You need to an the npm cookbook to the cookbooks/ directory. You can grab it from here
Btw, that tutorial is great, helps lay down a lot of the fundamental understanding of the chef ecosystem.