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

fix: node_modules sourceMaps #657

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

fix: node_modules sourceMaps #657

wants to merge 1 commit into from

Conversation

m1ga
Copy link
Contributor

@m1ga m1ga commented Aug 10, 2024

Currently if you have npm modules that have source map files compiling will fail with:

[ERROR] TypeError [ERR_INVALID_ARG_TYPE]: The "paths[1]" argument must be of type string. Received undefined
    at Object.resolve (node:path:1101:7)
    at Object.analyzeJs (/home/miga/.titanium/mobilesdk/linux/12.5.0/node_modules/node-titanium-sdk/lib/jsanalyze.js:201:26)
    at ProcessJsTask.transformAndCopy (/home/miga/.titanium/mobilesdk/linux/12.5.0/cli/lib/tasks/process-js-task.js:308:31)
    at AndroidBuilder.<anonymous> (/home/miga/.titanium/mobilesdk/linux/12.5.0/cli/lib/tasks/process-js-task.js:218:17)
    at data.result (file:///usr/local/lib/node_modules/titanium/src/cli.js:322:15)
    at new Promise (<anonymous>)
    at file:///usr/local/lib/node_modules/titanium/src/cli.js:320:26

The fix is to exclude files that are in the node_modules folder.

Test

  • create a new app ti create --alloy
  • create a app/lib folder
  • go into that folder and install e.g. underscore using npm
  • compile the app

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

Successfully merging this pull request may close these issues.

1 participant