I have created one yo generator and I can see the code is available in github and also showing in yo generator list.
Its working perfectly when I do npm install to download the generator code into my local machine and also when scaffold application using yo command.
Only problem is one of my file (systemjs.config.js) which is in the /generator/template folder is not getting downloaded niter from npm install nor when I scaffold application using yo command.
generator link git link to generator
command to download and scaffold from yo generator
npm install -g yo
npm install -g generator-angular2-with-router
yo angular2-with-router
The problem was occurring due to .gitingore file which was ignoring all the .js files as the project is in typescript. I was ignoring all my .js and .js.map files in my git ignore file
as systemjs.config.js file is a js file, its has been ignored by publish or something was happening with npm and it was not downloading.
Now I changed my .gitignore file and so that specific .js and .js.map file will be ignored and it resolved my problem.
Related
Following https://docs.amplify.aws/start/getting-started/installation/q/integration/react-native/#option-2-follow-the-instructions
I did:
npm install -g #aws-amplify/cli
Then followed with:
amplify configure
I have Node.js, git, and npm all installed with versions that should be compatible.
After doing amplify configure:
I receive the following error:
internal/modules/cjs/loader.js:883 throw err; ^
Error: Cannot find module
'C:\Users\Dev\AppData\Roaming\npm\node_modules\ #aws-amplify\cli\lib\run.js'
←[90m at Function.Module._resolveFilename
(internal/modules/cjs/loader.js:880:15)←[39m ←[90m at
Function.Module._load (internal/modules/cjs/loader.js:725:27)←[39m
←[90m at Function.executeUserEntryPoint [as runMain]
(internal/modules/run_main.js:72:12)←[39m ←[90m at
internal/main/run_main_module.js:17:47←[39m { code:
←[32m'MODULE_NOT_FOUND'←[39m, requireStack: [] }
I'm on Windows 10
Any help would be appreciated thanks
Edit:
Also just another note. When I try to reinstall the -g #aws-amplify/cli it says it is already installed:
Here are the first two lines:
npm ERR! code EEXIST
npm ERR! path
C:\Users\Dev\AppData\Roaming\npm\node_modules\ #aws-amplify\cli\lib\run.js
So, the paths appear to be the same.
Edit:
Although when I do cd #aws-amplify it returns:
The system cannot find the path specified.
this is after I am already successfully in the node_modules folder
And navigating into the npm folder there are three things labeled amplify. A file, Windows Command Script, and Windows PowerShell.
So has the installation process changed. Now that I've located these files how is AWS Amplify CLI supposed to work so I can set up with amplify configure
Solution:
I put this in one of the comments below but figured people may want to try this in the future if they come across the same error.
"I eventually fixed it by first editing the PATH in my system and then doing a --force reinstall of the files. My guess is something went wrong during the initial installation because it worked after I overwrote the previous files, and I noticed some of the files were missing before I did it. Not sure why it didn't work during my initial installation though."
I hope it's not too late. Have you tried:
npm install aws-amplify
Regards
I download project from github in my Termux terminal, but after download, when I pass the command "сd /*projectname*" termux said me: No such file or directory
I tried find this project in file manager in my Android, but the all folders in /com.Termux are empty.
Then I'm pass the command git clone https:/github.com/developer_name/project_name and Termux told me - destination path *projectname* already exist and is not an empty directory
Ive got 2 question
How I can open projectname in Termux?
Which full path from downloaded project from github?
use (apt-update && apt upgrade) first then other commands
I would like to create my first npmjs boiler project.
So if I were to run: npm install my-boilerplate dir it should create a new project in the dir folder with my structure.
But after a lot of research I couldn't find any description for it and i was able only able to create an npm module (not a project boilerplate/template).
Can anyone share the steps for the solution?
You sound like you're looking for something like a yeoman generator.
Generators, generically, will do what you want: create project boilerplate without themselves being the project.
Another alternative is to make it a github project and npm install from git, (as per How to install an npm package from GitHub directly?). The advantage of this over simply cloning the git project is that npm will not create a /.git repo from the project.
I have a git repo for an Ember Addon:
https://github.com/lifegadget/ui-responsive-toolbelt
It passes all unit tests. It has been published to npm as ui-responsive-toolbelt. I have used npm's "link" functionality to test locally that this "addon" (in Ember parlance) works fine in consuming application when included in the package.json file as a dependency.
Surprisingly, and I'm completely flummoxed on this, when npm installs this dependency into an Ember project directory it brings across a vast majority of the files without complaining. From NPM's perspective it appears to be a clean install. Unfortunately an addon depends heavily on it's "entry point" which is the index.js in the root directory of the repo. I have very clearly included this file in the repo but for some reason it is not being brough over!
I have tried this on two computers and three Ember projects and all have the same outcome. Please help!
the error message I get from Ember-CLI when I try to start the server with ember serve is:
The package ui-responsive-toolbelt is not a properly formatted package, we have used a fallback lookup to resolve it at /path/to/project/node_modules/ui-responsive-toolbelt. This is generally caused by an addon not having a main entry point (or index.js).
This message is repeated twice and then I get:
The ui-responsive-toolbelt addon could not be found at /path/to/project/node_modules/ui-list/node_modules/ui-responsive-toolbelt.
I confirmed that your repo looks fine
npm install ui-responsive-toolbelt does not download the index file
So the problem is that npm publish is not working properly. There is a bug filled for that. https://github.com/npm/npm/issues/5082
What you can do is publish again your addon using a recent npm version (or play with older versions) until you see that the index file is added too.
I am using appfuse-spring 2.2.snapshot artifact in my project. I am using maven is 3 .
When I run maven target 'install' every time download the same jar and dependency file.
How can I avoid to download the same files again and again.
for example
Downloading: http://oss.sonatype.org/content/repositories/appfuse-snapshots/org/appfuse/appfuse-web/2.2.2-SNAPSHOT/maven-metadata.xml
I don't want to download the jar file again.
Thanks in advance.
Why it's will download again and again? If it's always downloading maybe something is wrong because once the library is in your local repository it shouldn't need to download anything unless a dependency changes.
If you want to disable the download, use -o (offline) option in your mvn command:
mvn install -o
More: Maven Command Line Options
The problem is that you download the snapshot. Maven check a snapshot dependency each build (and if require downloads it).
Please avoid depend of snapshots.
Please find your deps in the releases repository:
https://oss.sonatype.org/content/repositories/appfuse-releases/
Old question but probably the solution would have been to check the "updatePolicy" for the repo, its possibly set to "always".