-
Notifications
You must be signed in to change notification settings - Fork 417
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
V3.0.0 #175
V3.0.0 #175
Conversation
* Make processed input path absolute When using the invoke local command with the --path (-p) flag, relative file paths will not be found because serverless will end up looking in the build directory later on. So, this commit ensures that the path is absolute, ensuring it will be found, even if the path was relative. Couldn't think of a good name for the function. Also, I'm not sure that this should go in the utils file. Happy to make revisions! * Move execution building out of utils * Add lib/makePathOptionAbsolute.js
This allows CI/CD package/deploy on different servers using the generated artifacts.
Hi Frank, { Error: Cannot find module '/<project_path_redacted>/.webpack/handler'
at Function.Module._resolveFilename (module.js:469:15)
at Function.Module._load (module.js:417:25)
at Module.require (module.js:497:17)
at require (internal/module.js:20:19)
at AwsInvokeLocal.invokeLocalNodeJs (/usr/lib/node_modules/serverless/lib/plugins/aws/invokeLocal/index.js:156:33)
at AwsInvokeLocal.invokeLocal (/usr/lib/node_modules/serverless/lib/plugins/aws/invokeLocal/index.js:114:19)
at AwsInvokeLocal.tryCatcher (/usr/lib/node_modules/serverless/node_modules/bluebird/js/release/util.js:16:23)
at Promise._settlePromiseFromHandler (/usr/lib/node_modules/serverless/node_modules/bluebird/js/release/promise.js:512:31)
at Promise._settlePromise (/usr/lib/node_modules/serverless/node_modules/bluebird/js/release/promise.js:569:18)
at Promise._settlePromise0 (/usr/lib/node_modules/serverless/node_modules/bluebird/js/release/promise.js:614:10)
at Promise._settlePromises (/usr/lib/node_modules/serverless/node_modules/bluebird/js/release/promise.js:693:18)
at Async._drainQueue (/usr/lib/node_modules/serverless/node_modules/bluebird/js/release/async.js:133:16)
at Async._drainQueues (/usr/lib/node_modules/serverless/node_modules/bluebird/js/release/async.js:143:10)
at Immediate.Async.drainQueues (/usr/lib/node_modules/serverless/node_modules/bluebird/js/release/async.js:17:14)
at runCallback (timers.js:672:20)
at tryOnImmediate (timers.js:645:5)
at processImmediate [as _immediateCallback] (timers.js:617:5) code: 'MODULE_NOT_FOUND'
} My module.exports = {
entry: './handler.js',
target: 'node',
module: {
loaders: [{
test: /\.js$/,
loaders: ['babel-loader'],
include: __dirname,
exclude: /node_modules/,
},
{
test: /\.json$/,
loader: 'json-loader'
},
{
test: /\.yaml$/,
loader: "file-loader"
}]
},
}; Note that the same project works with v2.2.0 and I'm looking forward to v3.0.0! |
@cwaltken-edrans Hi Clemens, Thanks for giving the v3 a try 👍 I had the issue just today too, and already fixed it in the That branch will be merged soon to v3.0.0 and is currently rebased, so it reflects the most current v3 version. BTW: You should use dynamic entries in your webpack.conf - simplifies configuration ;-):
|
P.S:: Using automatic entry resolution as described in the docs or exporting the module I get a type error from serverless:
I'll try out the new branch now. |
That is strange. Can you put a simple sample project somewhere (maybe gist or github) with that the dynamic entry issue is reproducible? |
@cwaltken-edrans If you encounter something that's not working you can open an issue (just prefix it with V3:). Then we can try to solve them individually 😃 . |
Support individual packaging with multi-compile
* Change CWD before local invoke and restore it afterwards * Adapted unit tests * Renamed module
* Update packExternalModules.js * Update package.json
Support transient dependencies when bundling (whitelisting) node modules
Use path where needed to make unit tests on Windows pass.
What did you implement:
This PR merges the v3.0.0 branch to master as soon as it is stabilized.
Feel free to test this branch - this will help to make sure that it works properly.
As soon as all features have been merged, the V3.0.0 branch will be published as prerelease for testing.
Closes #181
Closes #120
Closes #173
Closes #117
Closes #116
Closes #108
Relates to #60
Closes #151
Closes #152
Contained PRs
#161 , #153 , #177