-
Notifications
You must be signed in to change notification settings - Fork 384
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Browserize.sh Error #74
Comments
Hi menja12, Rahul |
I’m attempting to create a browser sdk js file to import to my Angular 2 project. I’m not sure if I can use systemJS to load the aws iot sdk without browserizing. 0 info it worked if it ends with ok1 verbose cli [ 'C:\Program Files\nodejs\node.exe', I assumed this might be because the shell script might have been designed for linux. 0 info it worked if it ends with ok1 verbose cli [ 'node', '/usr/local/bin/npm', 'run-script', 'browserize' ] I’ve also tried running the browserify commands manually following the comments of the script, but I get stuck at the compression stage, where I’m not exactly sure which files get copied where. So I couldn’t patch the mqtt file because it didn’t exist in my browser directory. I tried manually npm installing from the browser directory, but the package.json doesn’t require mqtt, so I also tried manually copying all the modules from the modules folder but couldn’t get a working browser sdk bundle js file. Any help is greatly appreciated :) |
I've updated, and ran the script but still giving me an error. 0 info it worked if it ends with ok |
Hi @menja12, Rahul |
Makes sense. I'll give Cygwin a shot. |
I having also issue with the browserize.sh script: Procedure: After the script execution I had the following output: <note: although this errors I found a npm WARN [email protected] No description npm ERR! Linux 4.4.0-28-generic output of npm-debug.log 0 info it worked if it ends with ok |
I wan't sure which packages were required when installing Cygwin, so I installed virtualBox and ubuntu. I got the "can't browserify () because it's not a file" error too. When I tried browserize on the temperature monitor example though, it works. It appears that both AWS-SDK and AWS-IOT-SDK get included in the bundle. Also I ran npm install in the top directory and the browser directory. Not sure if that made any difference. |
@menja12 : just to make sure that I understand your reply: 1) you got it only working with the example code? 2) you had it also working with only the aws-iot-device-sdk installed which created a bundle containing also aws-sdk package? 3) You only succeeded with option (2) while running the "npm run-script ...." from the aws-iot-device-sdk directory and aws-iot-device-sdk/browser directory? |
|
Using: https://sdk.amazonaws.com/builder/js/ The iot-sdk optimisation documentation says it's possible to use custom packages with just the services you require and that the browserize.sh helper doesn't handle it. Maybe a custom browserify running is the answer for me... Will let you know if I work anything out |
Indeed... I did this first also, but I am building a prototype with Daniel Vangrieken Email : [email protected] 2016-07-20 3:00 GMT+02:00 menja12 [email protected]:
|
@menja12 I can confirm that the bundle created with a successful run : npm run-script browserize examples/browser/temperature-monitor/index.js has the same size as the bundle that I created when encountering issues. So for me this is just a confirmation that my bundle should indeed contains everything that I require. |
Hi @menja12 - I am running into the same issue on Windows. Could you tell me what packages you included in AWS builder to get AWS IoT working? Thanks. |
I included iot, and iotdata. in the aws builder. But the AWS builder iot service is limited to either a post or a get. The aws iot device sdk is a more complete solution because you can subscribe and get updates live. I still haven't got that working yet. |
Besides npm3, you must also be running linux. the browserize.sh file is the linux version of a browserize.bat so it must be run using a linux machine or cygwin which is a linux emulator for windows |
I used it with the git bash shell in Windows. |
I successfully loaded the bundle into Angular 2! Because it isn't an es6 module, it needed to be treated differently. I added some code to system js config, and a typescript definition and imported into a service typescript file. |
Hi everyone, npm ERR! Linux 3.10.0-327.el7.x86_64 npm ERR! Please include the following file with any support request: Thanks, |
Try latest npm and node version. (You must download manually 5.0 beta) |
Hi menja12,
node version: v5.9.0 it will be great if can guide me, or can you please share your browserified version of the file? Thanks, |
Try npm install in the root dir. If it doesn't work lll send you my version of file. But that solution isn't updatable |
Hello @menja12,
Please can you check if I am doing right? |
Change to ....browser-bundle.js |
Hi @ssantosh21, the browserize script expects an application as an argument. Can you try the following?
After you've run this once, the browser bundle will be located in |
Hi @gkwicker, I have tried your above mentioned steps but its still giving similar error. I'm running it on Windows PC using cygwin. Any help would be appreciated, please find the error logs below -
|
CMD script provided in v2.0.0 |
@menja12 @gkwicker : It would be a great help if you can guide me in integrating the browserified aws-iot-sdk-browser-bundle.js file into angular2 project. I have browserified aws-iot-device-sdk-js, but I have no idea of making changes to Systemjs file in angular2 and importing it to the transcript files. Thanks in Advance. |
It seems as though browserize is looking for a file in the mqtt node module, in the browser sub directory, but it isn't finding it.
I've tried running the script on windows, and Raspbian linux OS.
The text was updated successfully, but these errors were encountered: