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
Uncaught ReferenceError: require is not defined
at jsdelivr-header.js:1:1
where said contains this content:
/**
* Minified by jsDelivr using UglifyJS v3.0.24.
* Original file: /npm/fs-js@1.0.6/index.js
*
* Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files
*/
test.js
var fs = require('fs-js');
var ckpdf = fs.open('/js/browserjs_test.txt', 'r', (err,fd) => {
console.log(fd);
});
source, fs.min.js
var fs=require("fs");module.exports=fs;
//# sourceMappingURL=fs.js.map
map, fs.js.map
{"version":3,"sources":["jsdelivr-header.js","/npm/fs-js@1.0.6/index.js"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA,ACNA,IAAI,GAAK,QAAQ,MAEjB,OAAO,QAAU","file":"/npm/fs-js@1.0.6/index.js","sourceRoot":"","sourcesContent":["/**\n * Minified by jsDelivr using UglifyJS v3.0.24.\n * Original file: /npm/fs-js@1.0.6/index.js\n * \n * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files\n */\n","var fs = require('fs');\r\n\r\nmodule.exports = fs;"]}
The text was updated successfully, but these errors were encountered:
package
https://www.npmjs.com/package/fs-js?activeTab=code
I downloaded source and map from :
https://cdn.jsdelivr.net/npm/fs-js@1.0.6/index.min.js
https://cdn.jsdelivr.net/sm/371e7d4afc5f7cd968f336bfe709890d019ca103eb9566a6ff3639d97efcefe0.map
I used browserify to create bundle
$ browserify -r fs-js ./fs.min.js > fsbund.js
in browser there is window on-load function to load all files, i.e. istart test.js when everything is loaded:
<script type="text/javascript" src="/js/fs.min.js"></script> <script type="text/javascript" src="/js/fsbund.js"></script> <script type="text/javascript" src="/js/test.js"></script>I am getting error,
where said contains this content:
test.js
source, fs.min.js
map, fs.js.map
The text was updated successfully, but these errors were encountered: