Comments (6)
Ok so I have fixed all these problems, and just so people know what they need to do if they get any of these issues, here they are:
If you get a bunch of package errors, it probably is that your NPM and Node versions are way out of date.
To update them, look at this website: https://www.digitalocean.com/community/tutorials/how-to-install-node-js-on-an-ubuntu-14-04-server
The commands I used were the following:
sudo apt-get update
sudo apt-get install build-essential libssl-dev
curl https://raw.githubusercontent.com/creationix/nvm/v0.16.1/install.sh | sh
source ~/.profile
nvm ls-remote
This last command gives you a list of node versions, grab the last one and run this to install it:
nvm install X.XX.XX
Check your node version with
node -v
and make sure that it is the one you just installed.
If it isn't, you can use nvm ls
to look at the versions and nvm alias default X.XX.XX
to set it. I also dide node alias default X.XX.XX
because I am a noob and don't know what I am doing.
then run nvm use default
to make sure you are using the default.
Then.... run these commands...
npm install express
npm install -g express
npm link express
At this point, you should be good to get past the npm install
command.
Then you might run into the error I posted above about memory limits. This seemed to only be and issue because I did not have a swap file and only 723mb memory available. To fix this, I looked at this page:
https://www.digitalocean.com/community/tutorials/how-to-add-swap-on-ubuntu-14-04
Basically, you need to create the swap file and activate it. To do so, run these commands:
sudo fallocate -l 4G /swapfile
ls -lh /swapfile
(response should be -rw-r--r-- 1 root root 4.0G Apr 28 17:19 /swapfile)
sudo chmod 600 /swapfile
ls -lh /swapfile
(response should be -rw------- 1 root root 4.0G Apr 28 17:19 /swapfile)
sudo mkswap /swapfile
response should be something like:
"Setting up swapspace version 1, size = 4194300 KiB
no label, UUID=e2f1e9cf-c0a9-4ed4-b8ab-714b8a7d6944"
sudo swapon /swapfile
sudo swapon -s
Response should be something like:
"Filename Type Size Used Priority
/swapfile file 4194300 0 -1"
Now, to make the swap permanent, you need to add the following line to the bottom of /etc/fstab
/swapfile none swap sw 0 0
Then you are done!
from refire-forum.
Seems to be an issue with this line in /usr/share/npm/lib/cache.js:
var tagged = data["dist-tags"][npm.config.get("tag")]
Looks like for some of the packages, data['dist-tags']['latest'] is not defined?
from refire-forum.
Hi, I think it's because you're running quite old version of npm, it seems you have npm version 1.3.10 when latest version is 5.4.2.
See this thread for similar errors, they suggest updating npm running npm install npm -g
.
I'd also recommend updating your node.js at the same time, version 0.10.25 is really old as well, it's missing Promise
and other useful new ES6 features.
from refire-forum.
Thanks a lot. I have literally never used node and was just trying to through together a forum for a proof of concept. Good to know my node and npm are way out of date.
from refire-forum.
I got this other error which I am hoping you know what to do about. Seems to be a memory error, so maybe I need to run the npm run build on a machine with more memory?
npm run build
[email protected] build /var/www/html/forum
npm run clean && npm run build:webpack && npm run build:rules && npm run html
[email protected] clean /var/www/html/forum
rimraf dist
[email protected] build:webpack /var/www/html/forum
NODE_ENV=production webpack --config webpack.config.prod.js
<--- Last few GCs --->
[19104:0x2807870] 32280 ms: Scavenge 556.8 (615.7) -> 556.8 (615.7) MB, 640.1 / 9.0 ms allocation failure
[19104:0x2807870] 32963 ms: Scavenge 556.8 (615.7) -> 556.8 (615.7) MB, 662.2 / 8.7 ms allocation failure
[19104:0x2807870] 33614 ms: Scavenge 556.8 (615.7) -> 556.8 (615.7) MB, 631.9 / 10.2 ms allocation failure
[19104:0x2807870] 34268 ms: Scavenge 556.8 (615.7) -> 556.8 (615.7) MB, 636.6 / 8.2 ms allocation failure
<--- JS stacktrace --->
Cannot get stack trace in GC.
FATAL ERROR: SequentialMarkingDeque::EnsureCommitted Allocation failed - process out of memory
1: node::Abort() [node]
2: 0x1356bec [node]
3: v8::Utils::ReportOOMFailure(char const*, bool) [node]
4: v8::internal::V8::FatalProcessOutOfMemory(char const*, bool) [node]
5: v8::internal::SequentialMarkingDeque::StartUsing() [node]
6: v8::internal::MarkCompactCollector::MarkLiveObjects() [node]
7: v8::internal::MarkCompactCollector::CollectGarbage() [node]
8: v8::internal::Heap::MarkCompact() [node]
9: v8::internal::Heap::PerformGarbageCollection(v8::internal::GarbageCollector, v8::GCCallbackFlags) [node]
10: v8::internal::Heap::CollectGarbage(v8::internal::GarbageCollector, v8::internal::GarbageCollectionReason, char const*, v8::GCCallbackFlags) [node]
11: v8::internal::Heap::CollectAllAvailableGarbage(v8::internal::GarbageCollectionReason) [node]
12: v8::internal::Factory::NewFillerObject(int, bool, v8::internal::AllocationSpace) [node]
13: v8::internal::Runtime_AllocateInNewSpace(int, v8::internal::Object**, v8::internal::Isolate*) [node]
14: 0x69f93046fd
Aborted
npm ERR! code ELIFECYCLE
npm ERR! errno 134
npm ERR! [email protected] build:webpack: NODE_ENV=production webpack --config webpack.config.prod.js
npm ERR! Exit status 134
npm ERR!
npm ERR! Failed at the [email protected] build:webpack 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! /home/ubuntu/.npm/_logs/2017-10-03T13_03_15_019Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 134
npm ERR! [email protected] build: npm run clean && npm run build:webpack && npm run build:rules && npm run html
npm ERR! Exit status 134
npm ERR!
npm ERR! Failed at the [email protected] build 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! /home/ubuntu/.npm/_logs/2017-10-03T13_03_15_044Z-debug.log
from refire-forum.
This is what I have for memory on the machine:
KiB Mem: 1016292 total, 292320 used, 723972 free,
from refire-forum.
Related Issues (20)
- ERROR in ./~/react-tap-event-plugin/src/TapEventPlugin.js HOT 2
- SSR + Next.js? HOT 1
- How can it be hosted in Firebase Host? HOT 5
- email and password login HOT 1
- Command: npm run build error
- Size of project with node modules is too high HOT 1
- about adding admin users HOT 2
- Admin user added but not showing when logged in HOT 2
- Set database path from config HOT 1
- Suggestion : Custom Auth Service
- Issues Deploying HOT 2
- Material-UI instead of Elemental-UI
- npm run build failed (both CMD and POWERSHELL) HOT 2
- Dont have admin features HOT 32
- [Feature Request] 404 redirects HOT 2
- Why html is not working HOT 4
- Further development HOT 4
- firebase connection issue
- firebase issue
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from refire-forum.