You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# Ensure browserify is installed globally
npm i -g browserify
# Set up the project
mkdir browserify-regression &&cd browserify-regression
npm init -f
# Install version ^1.0.0
npm i eff-diceware-passphrase@^1.0.0
# Create the scriptecho'const diceware = require("eff-diceware-passphrase")\nalert(diceware.entropy(100).join(" "))'> main.js
# Create the indexecho'<script src='bundle.js'></script>'> index.html
# Create bundle
browserify main.js -o bundle.js
# Install Site.js (or serve the folder in your own favourite web server).
curl -s https://sitejs.org/install | bash
# Run Site.js on the current folder.
site
Hit https://localhost and you should see an alert with the passphrase in it.
Now, let’s try the same thing with ^3.0.0:
npm i eff-diceware-passphrase@^3.0.0
browserify main.js -o bundle.js
site
Hit https://localhost again.
What should happen
You should see the passphrase in an alert, as before.
What actually happens
You get the following error:
Uncaught TypeError: Path must be a string. Received undefined
assertPath https://localhost/bundle.js:84
dirname https://localhost/bundle.js:349
path https://localhost/bundle.js:946
load https://localhost/bundle.js:924
[15]</</< https://localhost/bundle.js:1173
[15]</< https://localhost/bundle.js:1177
[15]< https://localhost/bundle.js:1177
o https://localhost/bundle.js:1
o https://localhost/bundle.js:1
[11]< https://localhost/bundle.js:1076
o https://localhost/bundle.js:1
o https://localhost/bundle.js:1
[13]< https://localhost/bundle.js:1129
o https://localhost/bundle.js:1
o https://localhost/bundle.js:1
[7]< https://localhost/bundle.js:835
o https://localhost/bundle.js:1
o https://localhost/bundle.js:1
[5]< https://localhost/bundle.js:774
o https://localhost/bundle.js:1
r https://localhost/bundle.js:1
<anonymous> https://localhost/bundle.js:1
bundle.js:84:11
Additional information
I’ve noted the same behaviour with Snowpack (works with ^1.0.0, fails with ^3.0.0).
Attached is a diff between the working bundle generated with version ^1.0.0 and the non-working one, genereated with version ^3.0.0, in case it helps: bundle.js.diff.txt.
The text was updated successfully, but these errors were encountered:
To reproduce
Hit
https://localhost
and you should see an alert with the passphrase in it.Now, let’s try the same thing with
^3.0.0
:Hit
https://localhost
again.What should happen
You should see the passphrase in an alert, as before.
What actually happens
You get the following error:
Additional information
I’ve noted the same behaviour with Snowpack (works with ^1.0.0, fails with ^3.0.0).
Attached is a diff between the working bundle generated with version ^1.0.0 and the non-working one, genereated with version ^3.0.0, in case it helps: bundle.js.diff.txt.
The text was updated successfully, but these errors were encountered: