copyFiles causing error: ERROR in unable to locate...
See original GitHub issueI have been using serverless-bundle for a while now without any issues. Suddenly, when removing my node_modules folder and running npm install
, I am now getting an error. Please see my output below when running serverless offline. I get the same error when running serverless deploy
.
Serverless: Invoke offline
Serverless: Invoke webpack:validate
Serverless: Using configuration:
{
"packager": "npm",
"packagerOptions": {},
"webpackConfig": "node_modules\\serverless-bundle/src/webpack.config.js",
"includeModules": {
"forceExclude": [
"aws-sdk"
],
"forceInclude": null,
"packagePath": "package.json"
},
"keepOutputDirectory": false
}
Serverless: Removing C:\Users\Stewart\Desktop\Crux Projects Local\Achievement Awards Group\BountiXP Platform\serverless-api\billing\services\billing-address-api\.webpack
Serverless: Bundling with Webpack...
Serverless: Webpack watch invoke: HASH NEW=cf04d716104492eaef2a CUR=null
LOG from copy-webpack-plugin
<e> unable to locate "C:\Users\Stewart\Desktop\Crux Projects Local\Achievement Awards Group\BountiXP Platform\serverless-api\billing\services\billing-address-api\sql\*" at "C:\Users\Stewart\Desktop\Crux Projects Local\Achievement Awards Group\BountiXP Platform\serverless-api\billing\services\billing-address-api\sql\*"
+ 7 hidden lines
ERROR in unable to locate "C:\Users\Stewart\Desktop\Crux Projects Local\Achievement Awards Group\BountiXP Platform\serverless-api\billing\services\billing-address-api\sql\*" at "C:\Users\Stewart\Desktop\Crux Projects Local\Achievement Awards Group\BountiXP Platform\serverless-api\billing\services\billing-address-api\sql\*"
Here is my package.json:
{
"name": "billing-address-api",
"version": "0.1.0",
"description": "bountixp billing-address api",
"main": "handler.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "bountixp",
"license": "ISC",
"devDependencies": {
"serverless-bundle": "^3.2.1",
"serverless-offline": "^6.8.0"
}
}
Here is my serverless.yml:
service: billing-address-api
plugins:
- serverless-bundle
- serverless-offline
custom:
bundle:
linting: false
copyFiles: # Copy any additional files to the generated package
- from: 'sql/*'
to: './'
provider:
name: aws
stage: ${opt:stage, 'dev'}
region: eu-west-1
runtime: nodejs12.x
functions:
...
I have tried downgrading to v3.0.0. I’ve tried removing my package-lock.json file. No changes have been made to my config since it was previously working, only the npm install
, so my thoughts are it must be a dependency package issue of some sort. The issue is only on Windows: Windows 10 Version 1903 (OS Build 18362.1139). Works fine on Ubuntu. Issue can be replicated on my developer’s PC too.
Issue Analytics
- State:
- Created 3 years ago
- Reactions:2
- Comments:6 (2 by maintainers)
Top Results From Across the Web
Error when trying to copy an empty folder with webpack
However this fails when the assets folder is empty: ERROR: unable to locate ... If I add one file to assets folder i...
Read more >"Cannot find the item" when trying to copy files to thumb drive
Original Title: With some USB thumbdrives & Windows Vista or 7, copying larger files gets a "Cannot find this item" error, telling me...
Read more >CopyFiles task fails on linux when source tree includes a ...
##[error]Unhandled: Failed find: ENOENT: no such file or ... Dangling symlinks will not cause errors when listing files or checking file ...
Read more >Fix Unspecified Error When Copying File or Folder ... - EaseUS
Just follow this page and find solutions to fix 'Error Copying ... If you cannot copy files to a destination spot on Windows...
Read more >cp - Copy files and objects | Cloud Storage - Google Cloud
This causes everything nested under gs://my-bucket/data to be downloaded into dir ... If an error occurs, continue attempting to copy the remaining files....
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
The issue is a posix/win32 path problem.
There is no fix from the author yet, so I’m currently using a self-authored patch with patch-package.
Here is my patch: serverless-bundle+5.5.0.patch
Note that I’m using version 5.5.0.
I ran into this issue this morning. Any progress or discoveries about it?