Skip to content
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

TypeError: Cannot read properties of null (reading 'resolve_defines') when using pattern option #41

Open
pandabrand opened this issue Jun 5, 2024 · 0 comments

Comments

@pandabrand
Copy link

I am using uglifyjs-folder in my npm scripts, when using the pattern option I get this error:

TypeError: Cannot read properties of null (reading 'resolve_defines')
    at Compressor.compress (/Volumes/Hobo/Blueshoon/recruitwell/dev/recruitwell-theme/node_modules/uglifyjs-folder/node_modules/terser/dist/bundle.min.js:18408:29)
    at Object.minify (/Volumes/Hobo/Blueshoon/recruitwell/dev/recruitwell-theme/node_modules/uglifyjs-folder/node_modules/terser/dist/bundle.min.js:30339:12)
    at module.exports (/Volumes/Hobo/Blueshoon/recruitwell/dev/recruitwell-theme/node_modules/uglifyjs-folder/index.js:83:39)
    at main (/Volumes/Hobo/Blueshoon/recruitwell/dev/recruitwell-theme/node_modules/uglifyjs-folder/cli.js:27:22)
    at Object.<anonymous> (/Volumes/Hobo/Blueshoon/recruitwell/dev/recruitwell-theme/node_modules/uglifyjs-folder/cli.js:42:1)
    at Module._compile (node:internal/modules/cjs/loader:1254:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1308:10)
    at Module.load (node:internal/modules/cjs/loader:1117:32)
    at Module._load (node:internal/modules/cjs/loader:958:12)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12)

here is the command I'm running:

"minify-timesheet-js": "cross-env-shell uglifyjs-folder ${npm_package_config_src_timesheet_plugins} ${npm_package_config_src_timesheet_components} ${npm_package_config_src_timesheet}/timesheet.js --config terser.config.json --pattern \"${npm_package_config_src_timesheet_plugins}/vue-3-prod.js,${npm_package_config_src_timesheet_plugins}/vue-3-datepicker.js,${npm_package_config_src_timesheet_plugins}/vue-3-modal.js,${npm_package_config_src_timesheet_plugins}/vue-3-moment.js\" --output ${npm_package_config_dist}/timesheet.js"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant