I'm using yeoman to scaffold a backbone app with the generator-backbone, however, everytime I run yo backbone, it ends up with this messages:
I'm all done. Running bower install for you to install the required dependencies. If this fails, try running the command yourself.
I'm all done. Running bower install & npm install for you to install the required dependencies. If this fails, try running the command yourself.
npm WARN package.json webdev#0.0.0 No description
npm WARN package.json webdev#0.0.0 No repository field.
npm WARN package.json webdev#0.0.0 No README data
And then, my directory is empty. There is no scaffold whatsoever.
The steps I took were this:
Create a directory: mkdir test
cd into test: cd test
run the generator: yo backbone
I don´t know what else to do, my directory always appears empty!
I tried to follow the same steps as you described but not able to reproduce the issue.
But you can try reinstalling generator-backbone.
npm cache clean
npm install -g generator-backbone#0.2.2
Please lemme know if you face the same issue after these steps.
Related
I am receiving an error while trying to use Typescript with my existing expo project.
While following the docs, I created a tsconfig.json file in the project root.
When running expo start, I am prompted to install the typescript dependencies. However, after these are successfully installed (tick message appears in console: √ Installed typescript#~4.3.5, #types/react#~17.0.21, #types/react-native#~0.67.6), I receive the following error:
It looks like you're trying to use TypeScript but don't have the required dependencies installed.
Please install #types/react by running:
yarn add --dev #types/react#~17.0.21
If you're not using TypeScript, please remove the TypeScript files from your project and delete the tsconfig.json.
error Command failed with exit code 1.
After following the instructions and running the yarn add .... command, I keep seeing the same error message.
I have tried deleting the node_modules folder and package-lock.json file to no avail. I have also tried following this answer.
Any assistance would be appreciated, thank you.
Seems to be a bug. It works if I install #types/react on the specific version that Expo requests (17.0.21).
yarn add --dev #types/react#17.0.21
Just re-install expo-cli npm install -g expo-cli.
I don't know which of the following worked, but I ran the following commands and the problem went away.
sudo npm install -g expo-cli
sudo npm install -g #types/react
sudo npm install -g #types/react-native
sudo npm install -g typescript
yarn add expo-cli
solved for me.
I had the same issue. I resolved it by :
1- delete the node_modules.
2- update expo to the latest version using npm i -g expo-cli
hope this will help someone
if you installed #types/react remove that from your dev dependencies
I have created an npm package which has a lot of dependencies, but when I test my app with npm install -g ./ the app gets added in the global npm directory but without the node-modules folder. Thus when the app is run through the terminal, although the app is recognized, it doesn't work because none of the dependency is installed.
How can I make sure to make app installs node-modules when its published in the npm registry
If I install the node-modules independently on the project folder by doing npm install, the app works. I don't want the user to install the packages independently. What I am expecting is the full installation of the app and the required dependencies only with npm install -g my_package
I have also used yarn as the package manager, and the dependencies are listed under "dependencies" in package.json file. The "bin" field in the package.json file points to our app, which can also be run as node bin/index.js. This app is also recognized by the terminal, the only problem is the dependencies
I think you can use this command npm install --save then it might work.
Every time I try running npm start on a new project I keep on getting this error. Does anyone know or have any idea how to fix this??
There might be a problem with the project dependency tree. It is
likely not a bug in Create React App, but something you need to fix
locally.
The react-scripts package provided by Create React App requires a
dependency:
"babel-jest": "^26.6.0"
Don't try to install it manually: your package manager does it
automatically. However, a different version of babel-jest was detected
higher up in the tree:
D:\node_modules\babel-jest (version: 24.9.0)
Manually installing incompatible versions is known to cause
hard-to-debug issues.
If you would prefer to ignore this check, add
SKIP_PREFLIGHT_CHECK=true to an .env file in your project. That will
permanently disable this message but you might encounter other issues.
To fix the dependency tree, try following the steps below in the exact
order:
Delete package-lock.json (not package.json!) and/or yarn.lock in your project folder.
Delete node_modules in your project folder.
Remove "babel-jest" from dependencies and/or devDependencies in the package.json file in your project folder.
Run npm install or yarn, depending on the package manager you use.
In most cases, this should be enough to fix the problem. If this has
not helped, there are a few other things you can try:
If you used npm, install yarn (http://yarnpkg.com/) and repeat the above steps with it instead.
This may help because npm has known issues with package hoisting which may get resolved in future versions.
Check if D:\node_modules\babel-jest is outside your project directory.
For example, you might have accidentally installed something in your home folder.
Try running npm ls babel-jest in your project folder.
This will tell you which other package (apart from the expected react-scripts) installed babel-jest.
If nothing else helps, add SKIP_PREFLIGHT_CHECK=true to an .env file
in your project. That would permanently disable this preflight check
in case you want to proceed anyway.
P.S. We know this message is long but please read the steps above :-)
We hope you find them helpful!
npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR!
react-portfolio#0.1.0 start: react-scripts start npm ERR! Exit
status 1 npm ERR! npm ERR! Failed at the react-portfolio#0.1.0 start
script. npm ERR! This is probably not a problem with npm. There is
likely additional logging output above.
npm ERR! A complete log of this run can be found in: npm ERR!
C:\Users\smaso\AppData\Roaming\npm-cache_logs\2021-01-26T22_50_48_484Z-debug.log
I also face this problem. Simple solution of this problem is:
1)create .env file.
2) add SKIP_PREFLIGHT_CHECK=true in the file.
3) npm start
If this fails to work, create a .env file in the root directory of your project and add the following line
SKIP_PREFLIGHT_CHECK=true
just go to your project's root directory and delete node_module folder and npm start your project.
Delete and redownload node modules and run application again
To fix the dependency tree, try following the steps below in the exact order:
Delete package-lock.json (not package.json!) and/or yarn.lock in your project folder.
Delete node_modules in your project folder.
Remove "babel-jest" from dependencies and/or devDependencies in the package.json file in your project folder.
Run npm install or yarn, depending on the package manager you use.
In most cases, this should be enough to fix the problem.
If this has not helped, there are a few other things you can try:
If you used npm, install yarn (http://yarnpkg.com/) and repeat the above steps with it instead.
This may help because npm has known issues with package hoisting which may get resolved in future versions.
Check if ./babel-jest is outside your project directory.
For example, you might have accidentally installed something in your home folder.
Try running npm ls babel-jest in your project folder.
This will tell you which other package (apart from the expected react-scripts) installed babel-jest.
Seems like you created the react project using create-react-app and installed jest using the following command.
yarn add --dev jest babel-jest #babel/preset-env #babel/preset-react react-test-renderer
But in the documentation it says just to run the following command if you are using create-react-app
yarn add --dev react-test-renderer
[See the documentation][1]https://jestjs.io/docs/tutorial-react
This worked for me.
I used the following command to uninstall jest npm uninstall jest in the root project folder (not the client) and then used the react scripts start command npm start and it worked
removing jest.config.js and uninstall ts-jest solved my problem
I have a asp.net core react app and using webpack for bundling .I have installed required dependencies but when build application it shows an error.
How could i resolve this error.
I have installed required dependencies so many times done npm cache clean and restarted a machine.still its showing not installed in vs solution explorer.
webpack installed in requied folder.
IN vs solution
when try to restore package inside solution explorer,its not installed.
webpack-cli is missing
You doing wrong in your npm install
Should be this command for global
npm i -g webpack-cli
or this command for local
npm i -D webpack-cli
You can not mix up between -D -g flag
If that didn't work for you try to right click on that package and click restore
Update:
Try to delete package-lock.json then run npm i -D webpack-cli again
I just want to install socket.io to my project which is located on 3.chat folder. But when I run following command it shows following Warnings.And its not created a node_modules directory inside my project folder. How to fix this?
C:\Users\Nuwanst\Documents\NodeJS\3.chat>npm install socket.io
C:\Users\Nuwanst
`-- socket.io#2.0.3
npm WARN enoent ENOENT: no such file or directory, open 'C:\Users\Nuwanst\package.json'
npm WARN Nuwanst No description
npm WARN Nuwanst No repository field.
npm WARN Nuwanst No README data
npm WARN Nuwanst No license field.
If you already have package-lock.json file just delete it and try again.
Have you created a package.json file? Maybe run this command first again.
C:\Users\Nuwanst\Documents\NodeJS\3.chat>npm init
It creates a package.json file in your folder.
Then run,
C:\Users\Nuwanst\Documents\NodeJS\3.chat>npm install socket.io --save
The --save ensures your module is saved as a dependency in your package.json file.
Let me know if this works.
Make sure you are on the right directory where you have package.json
You need to make sure that the package.json file exist in the app directory. Run this command where package.json file exists.
For more explanation, I run npm start in c:\selfPractice, but my package.json is in c:\selfPractice\frontend. When I switch to c:\selfPractice, it works.
NOTE: if you are experiencing this issue in your CI pipeline, it is usually because npm runs npm ci instead of npm install. npm ci requires an accurate package-lock.json.
To fix this, whenever you are modifying packages in package.json (e.g. moving packages from devDependencies to Dependencies like I was doing) you should regenerate package-lock.json in your repository by running these commands locally, and then push the changes upstream:
rm -rf node_modules
npm install
git commit package-lock.json
git push
If your folder already have package.json
Then,
Copy the path of package.json
Open terminal
Write:
cd your_path_to_package.json
Press ENTER
Then Write:
npm install
This worked for me
finally, I got a solution if you are getting:-
**npm WARN tar ENOENT: no such file or directory,.......**
then it is no issue of npm or its version it is os permission issue to resolve this you need to use below command:-
sudo chown -R $USER:$USER *
additional
sudo chmod -R 777 *
then run:-
sudo npm i
If you're trying to npm install on a folder that's being rsync'd from somewhere else, remember to add this to your rsync --exclude
yourpath/node_modules
Otherwise, NPM will try to add node_modules and rsync will remove it immediately, causing many npm WARN enoent ENOENT: no such file or directory, open errors.
Delete package.json and package-lock.json file
Then type npm init
after that type npm install socket.io --save
finally type npm install
It works for me
update version in package.json is working for me
I just experienced this error but on looking for the answer online here on stackoverflow I found the answer in the process so I decided to share it also , If this error occurs on a react project you are working on and when you run npm start make sure to change directory into the directory that has react installed in it and it will start working
if your node_modules got installed in say /home/UserName/ like in my case,
your package-lock.json file will also be there. just delete this file, go back to your app folder and run npm init and then npm install <pkgname> (e.g express) and a new node_modules folder will be created for your.
I had this in a new project on Windows. npm install had created a node_modules folder for me, but it had somehow created the folder without giving me full control over it. I gave myself full control over node_modules and node_modules\.staging and it worked after that.
Seems you have installed express in root directory.Copy path of package.json and delete package json file and node_modules folder.
I had the same problem, I resolved by removing all insignificant lines in packages.json e only left "name", "version", "description", "devDependencies", "dependencies", "resolutions". and the error was gone.
the file path you ran is wrong. So if you are working on windows, go to the correct file location with cd and rerun from there.