when I try to install angular-cli I see so many warnings and after this when i type
ng --version it shows :
MDSAZIDs-iMac:~ MYMAC$ ng --version
fs.js:640
return binding.open(pathModule._makeLong(path), stringToFlags(flags), mode);
^
TypeError: path must be a string or Buffer
at TypeError (native)
at Object.fs.openSync (fs.js:640:18)
at Object.fs.readFileSync (fs.js:508:33)
at Function.Version.fromProject (/usr/local/lib/node_modules/angular-cli/upgrade/version.js:87:31)
at Function.Version.isPreWebpack (/usr/local/lib/node_modules/angular-cli/upgrade/version.js:111:31)
at Function.Version.assertPostWebpackVersion (/usr/local/lib/node_modules/angular-cli/upgrade/version.js:97:18)
at /usr/local/lib/node_modules/angular-cli/bin/ng:25:15
at /usr/local/lib/node_modules/angular-cli/node_modules/resolve/lib/async.js:44:21
at ondir (/usr/local/lib/node_modules/angular-cli/node_modules/resolve/lib/async.js:187:31)
at /usr/local/lib/node_modules/angular-cli/node_modules/resolve/lib/async.js:153:39
MDSAZIDs-iMac:~ MYMAC$
I dont what is the problem can anyone tell me..????
This seems similar to the issue on ubuntu.
error while creating new project with Angular-cli
Can you post this issue on github? https://github.com/angular/angular-cli/issues
Edit:
can you try to use npm install -g webpack before installing angular-cli. (as sudo/root please)
This fixed my problem! :)
I tried in many ways but nothing was working for me then i installed windows 7 in a vertual machine and then installed latest nodejs on that windows 7 .then through npm I installed angular-cli and every thing is working well on that windows 7 :)
Upadate:
I have found this tutorial which has totaly solved my problem
https://www.youtube.com/watch?v=4mtlrXYKsZ0&index=1&list=PLrMggSuNOco6iLjrCOsO1_UKmJQosr7_g
Related
I am working in react js . While installing packages I got the following error as shown in the image. I tried many ways but nothing becomes right. How can I solve this issue?IMAGE OF ERROR
you havn't installed python yet
So install python !
Still problem persist then try
npm cache clean --force
I tried to compile the files using
npm start
but it doesn't works.
In my chrome and terminal, it says like this way.
Failed to compile
./src/index.css (./node_modules/css-loader/dist/cjs.js??ref--6-oneOf-3-1!./node_modules/postcss-loader/src??postcss!./src/index.css)
Error: No valid exports main found for 'C:\Users\Jiwoo\Desktop\movie_app_2020\node_modules\colorette'
I tried to delete folder [node_modules] and typing "npm i" but it doesn't works too.
How can I fix my error?
upgrade node.js and also remove create-react-app globally by using below command
npm uninstall -g create-react-app
and using:
npx create-react-app myapp
I am using Windows 7 and the latest working Node version is 13.6. Therefore to make it run the only option is to downgrade autoprefixer: npm i autoprefixer#9.8.0
Downgrading colorette module to 1.2.0 didn't help.
The ultimate solution is to upgrade Node, however, it's not possible on Windows 7. Alternatively, one can try to compile it on a VM or with a docker image that supports Node 14+.
For windowss 7 user who are using any of the 12+ version just download the last 13 version which is v13.14.0. Before installing this version make sure to uninstall the previous version installed.
Here's the download link
Download the .msi file instead of exe file
Hope it will work
Thanks
hope you can help. I'm trying to install mauron85 react-native-background-geolocation and when i go to link the dependencies (react-native link react-native-mauron85-background-geolocation) i keep getting 'react-native: command not found'. i've installed npm, nodejs, react native (npm install -g react-native-cli), flow, watchman and the mauron85 package. i'm running this on ubuntu and have tried on mac and getting the same error message on both. I've also tried doing the manual setup for android and this hasn't worked because I don't have some of the node modules it needs, and have tried adding the right path to my path variable, which has made no difference. Is there anything obvious I'm missing that I've forgotten to install/has anyone had a similar message before?
Thanks!
This may be just my lack of experience working with ionic 2 but I'm getting an error when tying to generate pages via the CLI.
The syntax I'm using: "ionic g page TestPage"
It returns an error (below). Does anyone know how to resolve this error? It seems the "templates" directory does not exist on my machine which I gather is why this is happening, but not sure how to get it there or fix the issue. The first part of the path does exist: C:\apps\sampleapp\node_modules\ionic-angular\, but not the "templates/page" part.
Error: ENOENT: no such file or directory, scandir 'C:\apps\sampleapp\node_modules\ionic-angular\templates\page'
at Error (native)
at Object.fs.readdirSync (fs.js:808:18)
at getTemplatesInDir (C:\Users\m411\AppData\Roaming\npm\node_modules\ionic\node_modules\#ionic\app-generator
at Generator.renderAndWriteTemplates (C:\Users\m411\AppData\Roaming\npm\node_modules\ionic\node_modules\#ion
at C:\Users\m411\AppData\Roaming\npm\node_modules\ionic\node_modules\#ionic\app-generators\index.js:25304:26
Ionic Framework Version: 2.0.0-beta.11
Ionic CLI Version: 2.1.0-beta.1
Ionic App Lib Version: 2.1.0-beta.0
OS: Windows 8.1
Node Version: v4.5.0
Downgrade your ionic version to beta 22.. I think it works by uninstalling and then updating npm just in case and then reinstalling a lower ionic version.
How do you completely remove Ionic and Cordova installation from mac?
And I would suggest trying "npm install" in the project directory after this too.
Okay, for anyone where downgrading is not an option:
The Ionic Team did some major API updates and some restructuring.
You need to follow these upgrade steps:
Sidenote: If you did uninstall and reinstall the package AND did run the command with sudo and hit the command ionic start --v2 myApp in the same terminal, then you need to update the rights in your folder with:
sudo chown -R username ./pathToAppFolder
https://github.com/driftyco/ionic/blob/master/CHANGELOG.md#steps-to-upgrade-to-rc0
npm i -g ionic#2.0.0 - Solved the issue.
Thank you.
npm i -g ionic#2.0.0-beta.37
resolved the issue for me, was previously on ionic 2.0.0 beta 11
my problem is described in the following image:
The main problem is that im getting a: Bower ENOENT no bower.json present error and as you can see in the image (second command) the file is actually present. So ive been trying to find what actually bower install does and havent found it in the NPM documentation and Git documentation as well
Also, in the research ive done some forums suggest installing bower globally and it hasnt worked
Since i've been googling for about 3 nights looking for somebody with the same problem and havent found anybody else with the problem I started wondering about if I changed any environment variable. So i uninstalled node.js and Git and then reinstalled both programs without any change in the result
Hope somebody can help me with this, thanks in advance
Bower is a package manager for HTML http://bower.io/. 'bower install' will download all the packages listed in bower.json and add them to a folder called 'bower_components'
You must have bower install globally via
npm install -g bower
To get a list of NPM packages installed successfully global use:
npm list -g
Having a look at the github issues of that Repository(Angular-phonecat) theres alot of issues related to bower(https://github.com/angular/angular-phonecat/search?q=bower&type=Issues&utf8=%E2%9C%93), which is strange because bower is not that complicated. Have you looked through any of those fixes.