- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
Hi guys,
My board is already run opkg update.
I have a problem with installing ExpressJS. First, I have some nodejs code that use Express module. So I installed the library on by system:
root@edison:~# npm install express
The installation seem to be good with no error. But when I run my project:
root@edison:/media/sdcard/SocketIO-001# node main.js (my project folder is located on the sdcard)
There is an error: Cannot find module 'express'
I think the problem is that I installed the module in the wrong place, so I change the directory to "/media/sdcard/SocketIO-001" and reinstall the module. But this time, there is a problem:
root@edison:/media/sdcard/SocketIO-001# npm install express --save
npm ERR! Linux 3.10.98-poky-edison+
npm ERR! argv "/usr/bin/node" "/usr/bin/npm" "install" "express" "--save"
npm ERR! node v4.4.3
npm ERR! npm v2.15.1
npm ERR! path ../mime/cli.js
npm ERR! code EPERM
npm ERR! errno -1
npm ERR! syscall symlink
npm ERR! Error: EPERM: operation not permitted, symlink '../mime/cli.js' -> '/media/sdcard/SocketIO-001/node_modules/express/node_modules/send/node_modules/.bin/mime'
npm ERR! at Error (native)
npm ERR! { [Error: EPERM: operation not permitted, symlink '../mime/cli.js' -> '/media/sdcard/SocketIO-001/node_modules/express/node_modules/send/node_modules/.bin/mime']
npm ERR! errno: -1,
npm ERR! code: 'EPERM',
npm ERR! syscall: 'symlink',
npm ERR! path: '../mime/cli.js',
npm ERR! dest: '/media/sdcard/SocketIO-001/node_modules/express/node_modules/send/node_modules/.bin/mime' }
npm ERR!
npm ERR! Please try running this command again as root/Administrator.
npm ERR! Please include the following file with any support request:
npm ERR! /media/sdcard/SocketIO-001/npm-debug.log
I got stuck now. Please help me. Thanks alot!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
Hi NewMech,
I would love to help you with your issue.
I think that you should run the command using the save flag:
npm install express --save
If you don't use this flag you will install you won't add it to the dependencies.
Personally, I recommend you to copy your code to the Edison and install express and run the code in the same directory, not in the SDcard.
You can also check this guide for a similar example: https://medium.com/@monkeytypewritr/control-your-intel-edison-in-realtime-with-websockets-f16e49b2b2... .pmk0001cf
I hope you find this helpful.
Regards,
-Leonardo
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
Hi NewMech,
I would love to help you with your issue.
I think that you should run the command using the save flag:
npm install express --save
If you don't use this flag you will install you won't add it to the dependencies.
Personally, I recommend you to copy your code to the Edison and install express and run the code in the same directory, not in the SDcard.
You can also check this guide for a similar example: https://medium.com/@monkeytypewritr/control-your-intel-edison-in-realtime-with-websockets-f16e49b2b2... .pmk0001cf
I hope you find this helpful.
Regards,
-Leonardo
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
Ok, the problem is now solved, But I still put my code in the sd card. It run perfectly. It's so strange that the "node_module" directory is not on the SDcard but the code still work!
Instead of using --save flag, I use: sudo npm install express --g.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
Hi NewMech,
That's great. Thank you for letting us know.
Feel free to contact us when you have issues.
Regards,
-Leonardo

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page