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
What version of the module does this affect?
3.1.4
Expected outcome
I expect the code to run without issues.
Actual outcome
I get a type error: TypeError: P.parse is not a function
Description
It seems that from version 3.1.4 it is not possible to consume the lib from Common JS code with require.
Not entirely sure if it is a bug or me missing something else. I can see that in version 3.1.4 esbuild was introduced as the bundler instead of using rollup.
Minimal reproducible test case
In a terminal (npm and node are required) run these commands in order:
mkdir test
cd test
npm init -y
npm i -E personnummer@3.1.3
echo "const P = require('personnummer');console.log(P.parse('2012121212'));" > index.js
node index
That works fine. Now:
npm i -E personnummer@3.1.4
node index
It crashes on TypeError: P.parse is not a function
The text was updated successfully, but these errors were encountered:
Context
What version of the module does this affect?
3.1.4
Expected outcome
I expect the code to run without issues.
Actual outcome
I get a type error:
TypeError: P.parse is not a function
Description
It seems that from version 3.1.4 it is not possible to consume the lib from Common JS code with
require
.Not entirely sure if it is a bug or me missing something else. I can see that in version 3.1.4 esbuild was introduced as the bundler instead of using rollup.
Minimal reproducible test case
In a terminal (npm and node are required) run these commands in order:
That works fine. Now:
It crashes on
TypeError: P.parse is not a function
The text was updated successfully, but these errors were encountered: