I am new in Sitecore JSS.
While running the following command using CMD:
npm install -g #sitecore-jss/sitecore-jss-cli
I got the following result:
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents#1.2.4
(node_modules#sitecore-jss\sitecore-jss-cli\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for
fsevents#1.2.4: wanted {"os":"darwin","arch":"any"} (current:
{"os":"win32","arch":"x64"})
#sitecore-jss/sitecore-jss-cli#9.0.6 updated 1 package in 21.068s
After that I wanted to check that JSS has been installed successfully, so I ran the following CMD command:
jss --help
but the result was:
'jss' is not recognized as an internal or external command, operable
program or batch file.
What am I missing?
Check your environment path variable.
Default the npm location on Windows is
C:\Users{user}\AppData\Roaming\npm
There you found a jss.cmd and the node_modules\#sitecore-jss folder.
To fix the "'jss' is not recognized as an internal or external command, operable program or batch file." error add the npm location to your path or shortly %AppData%\npm
To add somethings to the path go to control panel -> System and Security -> System -> Advanced System Settings then environment variables.
if you cant found the npm location try
npm config get prefix
It is an issues with NPM and this specific version of #sitecore-jss/sitecore-jss-cli#9.0.6.
It is recommanded to use yarn to fix for now. Until the next jss-cli release.
Make sure you remove (#sitecore-jss, jss and jss.cmd) from
C:\Users\{your_username}\AppData\Roaming\NPM\
Install Yarn globally : https://yarnpkg.com/lang/en/docs/install/#windows-stable
Re-install #sitecore-jss/jss-cli using Yarn
yarn global add #sitecore-jss/sitecore-jss-cli
Make jss is using it, using this command
where jss
Expected result:
C:\Users\{your_username}\AppData\Local\Yarn\bin\jss
C:\Users\{your_username}\AppData\Local\Yarn\bin\jss.cmd
if not, try to refresh you environment variables using
refreshenv
(or restart your Command Prompt)
Related
I'm trying to build an IOS app using EAS service expo, but when I try to build, there is an error while install pods on build details expo. And this is the error.
Unable to find a specification for `UMTaskManagerInterface` depended upon by `EXLocation`
I try to install pod by npm i pod-install but still get error. Is this because I build on Windows, or what should I do to fix this error? I also try to find the error in GitHub forum, and it's say adding path pod in ios/Podfile which I can't find it in my expo project. Where is ios/Podfile file located in expo project?
This is the full error
Installing pods
Using Expo modules
Auto-linking React Native modules for target `MMS`: RNCAsyncStorage, RNCCheckbox, RNDateTimePicker, RNGestureHandler, RNPermissions, RNReanimated, RNScreens, react-native-safe-area-context, and react-native-viewpager
Analyzing dependencies
Fetching podspec for `DoubleConversion` from `../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec`
Fetching podspec for `RCT-Folly` from `../node_modules/react-native/third-party-podspecs/RCT-Folly.podspec`
Fetching podspec for `glog` from `../node_modules/react-native/third-party-podspecs/glog.podspec`
Adding spec repo `trunk` with CDN `https://cdn.cocoapods.org/`
CocoaPods 1.11.2 is available.
To update use: `sudo gem install cocoapods`
For more information, see https://blog.cocoapods.org and the CHANGELOG for this version at https://github.com/CocoaPods/CocoaPods/releases/tag/1.11.2
[!] Unable to find a specification for `UMTaskManagerInterface` depended upon by `EXLocation`
You have either:
* out-of-date source repos which you can update with `pod repo update` or with `pod install --repo-update`.
* mistyped the name or version.
* not added the source repo that hosts the Podspec to your Podfile.
[stderr] [!] `<PBXResourcesBuildPhase UUID=`13B07F8E1A680F5B00A75B9A`>` attempted to initialize an object with an unknown UUID. `2EE81B3C866A4A13B6460929` for attribute: `files`. This can be the result of a merge and the unknown UUID is being discarded.
pod exited with non-zero code: 1
Edit*
i try using expo build:ios-> archive is working perfectly. why using eas build -p ios i got that error?
I am on MacOS. I am following AWS' instruction to install Elastic Beanstalk CLI,
I firstly cloned the git repo of the CLI via command :
git clone https://github.com/aws/aws-elastic-beanstalk-cli-setup.git
I secondly installed the dependent tools with command brew install zlib openssl readline,
my terminal tells me:
Basically it tells me that all those tools have already been installed and up-to-date.
From the linked instruction, in section
2.3. Troubleshooting
The MacOS part, it also suggests a command to tell Python installer where to find those tools, so I follow that instruction and run command:
CFLAGS="-I$(brew --prefix openssl)/include -I$(brew --prefix readline)/include -I$(xcrun --show-sdk-path)/usr/include" LDFLAGS="-L$(brew --prefix openssl)/lib -L$(brew --prefix readline)/lib -L$(brew --prefix zlib)/lib"
After that, I also follow the instruction to run brew info to get the latest environment variable export suggestions. e.g. brew info zlib, brew info openssl & brew info readline , and run the export command for each of them respectively.
Finally, I run the command to install the Elastic Beanstalks CLI by:
./aws-elastic-beanstalk-cli-setup/scripts/bundled_installer
But I always get the following error:
BUILD FAILED (OS X 10.15.3 using python-build 20180424)
Inspect or clean up the working tree at /var/folders/jt/ltbk7lgd3k9d_ndl4wncv0z07_g9f8/T/python-build.20200807170051.69471
Results logged to /var/folders/jt/ltbk7lgd3k9d_ndl4wncv0z07_g9f8/T/python-build.20200807170051.69471.log
Last 10 log lines:
File "/private/var/folders/jt/ltbk7lgd3k9d_ndl4wncv0z07_g9f8/T/python-build.20200807170051.69471/Python-3.7.2/Lib/ensurepip/__main__.py", line 5, in <module>
sys.exit(ensurepip._main())
File "/private/var/folders/jt/ltbk7lgd3k9d_ndl4wncv0z07_g9f8/T/python-build.20200807170051.69471/Python-3.7.2/Lib/ensurepip/__init__.py", line 204, in _main
default_pip=args.default_pip,
File "/private/var/folders/jt/ltbk7lgd3k9d_ndl4wncv0z07_g9f8/T/python-build.20200807170051.69471/Python-3.7.2/Lib/ensurepip/__init__.py", line 117, in _bootstrap
return _run_pip(args + [p[0] for p in _PROJECTS], additional_paths)
File "/private/var/folders/jt/ltbk7lgd3k9d_ndl4wncv0z07_g9f8/T/python-build.20200807170051.69471/Python-3.7.2/Lib/ensurepip/__init__.py", line 27, in _run_pip
import pip._internal
zipimport.ZipImportError: can't decompress data; zlib not available
make: *** [install] Error 1
Exiting due to failure
Why it complains about zlib still even I did everything like the instruction said? How to correctly install the EB CLI ?
The Prerequisites section says that you should use Xcode on Mac to install zlib:
Xcode openssl zlib readline
Your description does not mention meeting the Prerequisites required for EBCLI:
Python, which the EBCLI Installer depends on, requires the following prerequisites for each operating system.
Therefore, it its possible that you haven't used Xcode to install required dependencies.
I have installed 'amplify-cli'. When I type 'amplify configure', I get the error message:
'amplify is not recognized as an internal or external command, operable program or batch file'.
Please share your platform. Are you developing on Linux, Windows (Powershell), or Linux on Windows (WSL/Ubuntu)?
Did you install the CLI globally?
Try this:
npm install -g #aws-amplify/cli
And see if that works. If the global install fails, you can try running this per an Amplify developer:
npm install -g #aws-amplify/cli --unsafe-perm=true
Edit: since you're on Windows, it's possible the CLI wasn't added to your $PATH variable. You can fix it by seeing this Github issue.
To solve this, simply edit a PATH key under system Environment Variables and add a new path pointing to amplify:
C:\Users\{UserName}\AppData\Roaming\npm\amplify.cmd
If you have globally installed amplify/cli then you should find two files named amplify and amplify.cmd in the above mentioned npm directory.
Under same circumstances I run all the suggested solutions on Windows 10 machine (64 bit). None of them seemed to do the trick.
I got a more specific error:
..... cannot be loaded because running scripts is disabled on this
system .... + CategoryInfo : SecurityError: (:) [],
PSSecurityException
+ FullyQualifiedErrorId : UnauthorizedAccess
The issue appears due to Windows PowerShell execution policies. Eventually, I managed to amend it by applying the following:
C:\Windows\System32>powershell Set-ExecutionPolicy -Scope CurrentUser RemoteSigned
Above solutions didn't work for me, I had to run this instead of 'amplify init':
C:\Users{UserName}\AppData\Roaming\npm\amplify init
I had the same issue and my problem was because I was trying to install it using
yarn global add #aws-amplify/cli
Apparently, it doesn't work when it is installed with yarn it has to be npm. It's funny because there are no errors shown. There might be a fix to it maybe someone can look into that.
If you are on windows platform avoid using the global(-g) flag from your npm command. Install Amplify CLI with below npm command.
npm install #aws-amplify/cli
It worked for me.
Error:
amplify : The term 'amplify' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again. le program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:1
amplify init
CategoryInfo : ObjectNotFound: (amplify:String) [], CommandNotFoundException
FullyQualifiedErrorId : CommandNotFoundException
Try this for windows:
Step 1:
npm install -g #aws-amplify/cli --unsafe-perm=true
Step 2:
npm config get prefix
Step 3:
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser
you must run this code on PowerShell not a cmd.
I had the same issue
For Windows, try the below command to install Amplify CLI
$ curl -sL https://aws-amplify.github.io/amplify-cli/install-win -o
install.cmd && install.cmd
$ amplify configure
for more info on installation follow the link
https://docs.amplify.aws/cli/start/install/
I'm trying to build c++ project.
When I run the make command in terminal it works,
but when I do it through Jenkins, it shows me a message that files are missing.
What can be the problem, and how can I solve it?
The Error:
+ make
make -f enclave_lib.mk SGX_DEBUG=1
make[1]: Entering directory '/home/yoni/Documents/private_ledger-tp/CryptoLib'
mt19937ar.c:44:19: fatal error: stdio.h: No such file or directory
From your comments, the problem is that Jenkins is executed as root user, and can not find the lib stdio.h.
To fix this you can have several options:
locate stdio.h
You run this command from your user. It will give you the path to stdio.h. That you can feed in your make
sudo apt-get install build-essential
As a root user, you install build-essential. That should install this missing dependency
execute Jenkins with your privilege, not with root privilege
in your build process, connect to your account (su youruser)
It turned out that in our case it was an issue of environment variables.
What I did to solve it is
Getting the data on environment variables both from Terminal and Jenkins, and write them sorted into 2 files.
Comparing the 2 files with meld
Any variables that seemed relevant that the Terminal environment and the Jenkins didn't I placed into /etc/environment file (Jenkins takes additional environment vars from there)
env | sort > envInTerminal.txt
env | sort > envInJenkins.txt
meld envInTerminal.txt envInJenkins.txt
sudo gedit /etc/environment
I've created a GitHub repo for my simple custom recipe:
my-cookbook/
|- recipes/
|- appsetup.rb
I've added the repo to Custom Chef Recipes as https://github.com/my-github-user/my-github-repo.git
I've added my-cookbook::appsetup to the Setup "cycle".
I know it's executed, because it fails to load if I mess up the syntax.
This is my appsetup.rb:
node[:deploy].each do |app_name, deploy|
script "install_composer" do
interpreter "bash"
user "root"
cwd "#{deploy[:deploy_to]}/current"
code "curl -sS https://getcomposer.org/installer | php && php composer.phar install --no-dev"
end
end
When I log into the instance by SSH with the ubuntu user, composer isn't installed.
I've also tried the following to no avail (A nodejs install):
node[:deploy].each do |app_name, deploy|
execute "installing node" do
command "add-apt-repository --yes ppa:chris-lea/node.js && apt-get update && sudo apt-get install python-software-properties python g++ make nodejs"
end
end
Node doesn't get installed, and there are no errors in the log. The only references to the cookbook in the log just says:
[2014-03-31T13:26:04+00:00] INFO: OpsWorks Custom Run List: ["opsworks_initial_setup", "ssh_host_keys", "ssh_users", "mysql::client", "dependencies", "ebs", "opsworks_ganglia::client", "opsworks_stack_state_sync", "mod_php5_apache2", "my-cookbook::appsetup", "deploy::default", "deploy::php", "test_suite", "opsworks_cleanup"]
...
2014-03-31T13:26:04+00:00] INFO: New Run List expands to ["opsworks_initial_setup", "ssh_host_keys", "ssh_users", "mysql::client", "dependencies", "ebs", "opsworks_ganglia::client", "opsworks_stack_state_sync", "mod_php5_apache2", "my-cookbook::appsetup", "deploy::default", "deploy::php", "test_suite", "opsworks_cleanup"]
...
[2014-03-31T13:26:05+00:00] DEBUG: Loading Recipe my-cookbook::appsetup via include_recipe
[2014-03-31T13:26:05+00:00] DEBUG: Found recipe appsetup in cookbook my-cookbook
Am I missing some critical step somewhere? The recipe is clearly recognized and loaded, but doesn't seem to be executed.
(The following are fictitious names: my-github-user, my-github-repo, my-cookbook)
I know you've abandoned the cookbook but I'm almost 100% sure it's because you don't have a metadata.rb file in the root of your cookbook.
Your cookbook name should not contain a dash. I had the same problem, replacing by '_' solved it for me.
If those commands are failing silently, it could be that your use of && is obscuring a failure.
As for add-apt-repository, that is an interactive command. Try using the "--yes" option to answer yes by default, making it no longer interactive.
If you do not execute your command successfully, you will not find the files in the current directory. Check inside the last release folder to see if it had been put there.
It maybe prudent to check if you got the right directory etc setup by changing the CWD to : /tmp