I am getting the below error
[ERROR] ENOENT: no such file or directory, open '/vercel/path0/src/js/external-script.js' [plugin angular-script-global]
angular.json
"scripts": [
"./node_modules/bootstrap/dist/js/bootstrap.bundle.min.js",
"./src/js/external-script.js"
]
local build works.
First move the "external-script.js" to the assets
or public
folder.
Then make sure you have that folder added to the assets
array of angular.json.
"assets": ["/src/assets"],
This will ensure your script is discoverable when angular builds the application.
Then Reference that file from the scripts array of angular.json.
"scripts": [
"./node_modules/bootstrap/dist/js/bootstrap.bundle.min.js",
"./src/assets/external-script.js"
]