Node.js modules

#1

For now, using Node.js modules require some preparation with a laptop. You can use browserify --bare to squash all the dependencies into a file.

Open this deeplink on Safari to see an example:

playdotjs://28816c75

More context here.

0 Likes

#2

I’m getting an error when using the app url. The error says “Object bundles/28816c75| does not exist”.

0 Likes

#3

The link had a typo, try with playdotjs://28816c75 please :pray:

0 Likes

#4

Working now. Thanks for the quick response.

0 Likes

#5

Native node modules support is number one on my wish list. I’d prefer to not use my computer. But this is still excellent, and I appreciate all your hard work.

1 Like

#6

Hi mrbianhinton :wave:

I’ve just released play.js that simplifies working with dependencies among other things :slight_smile:

1 Like

#8

0 Likes

#9

Thanks for flagging, huoxiangdong. The issue has been addressed, a fix will be out soon :blush:.

0 Likes

#10

Consider adding pseudo-terminals to execute npm or something

3 Likes

#11

I bundle koa but no luck

0 Likes

#12

Hi Soydepr,

Can you please provide more details?

0 Likes

#13

Perhaps is my misunderstanding inside the folder I did browserify index.js -o bundle.js. Then move bundle.hs to folder I expected my script to run but I get requiere error

0 Likes

#14

To use modules you no longer need to use Browserify. Just declare your dependencies in package.json and tap on the “Play” button.

2 Likes

#15

Is there anything we can do to mimic the npm run environment? I can add npm as a dependency but I cannot make it run :cry: Can anyone please :pray: share with us an example of something that has the ability to run a script from package.json?

0 Likes

#16

Hi milotindragos :wave:

I’ve replied to your question here :slight_smile:.

1 Like