Sorry, unsure which repo this issue would belong to, given the number of plugins in use.
Trying to use the combination of plugins:
Typescript needs to come before chrome.
Webpack needs to come after chrome.
However, webpack needs to come before Typescript otherwise webpack config isn't copied during serverless offline
The webpack plugin could not find the configuration file at: C:\Users\XXX\Desktop\project-name\.build\webpack.config.js
For bug reports:
For feature proposals:
const path = require('path');
const slsw = require('serverless-webpack');
const webpack = require('webpack');
module.exports = {
entry: slsw.lib.entries,
target: 'node',
resolve: {
extensions: ['.json', '.js', '.jsx', '.ts', '.tsx'],
alias: {
puppeteer: require.resolve('puppeteer/node6/lib/Puppeteer'),
symlinks: 'true',
},
},
node: {
__dirname: true,
},
output: {
libraryTarget: 'commonjs',
path: path.join(__dirname, '.webpack'),
filename: '[name].js',
},
externals: ['aws-sdk', 'puppeteer/node6/lib/Puppeteer'],
module: {
rules: [
{
test: /\.ts(x?)$/,
loader: 'ts-loader',
},
],
},
plugins: [
new webpack.optimize.LimitChunkCountPlugin({
maxChunks: 1,
}),
],
};
Serverless-Webpack Version you're using:
"serverless-offline": "^4.1.4",
"serverless-webpack": "^5.2.0",
"serverless-plugin-typescript": "^1.1.5",
"serverless-plugin-chrome": "^1.0.0-55",
Webpack version you're using:
"webpack": "^4.29.0"
Serverless Framework Version you're using:
"serverless": "^1.36.1",
Operating System:
OS: win32
Node Version: 8.10.0
Serverless Version: 1.36.1
Just overflew the problem (and I am not related to serverless-webpack, just a user), but: serverless-plugin-typescript has not seen major modification since quite a time and looks abandoned to me; more importantly, serverless-webpack can compile and bundle your typescript projects all by itself, there is no need for the typescript plugin, AFAICT.
perhaps the problem doesn't sit here.
Webpack plugin was fine with compiling but because I was using offline plugin, I either:
Will close the issue.
Thank you for trying to help
I am also facing the issue
These two should come in this order only, but my project is in TS, so Injecting Headless chrome to JS files fails.
Error: ENOENT: no such file or directory, link '/.build/src/api/func.js' -> '/.build/src/api/dai0bwfuzyf___func.js'
at PluginManager.invoke (/usr/local/lib/node_modules/serverless/lib/classes/PluginManager.js:372:22)
@erdahuja Did you solve that? I'm having the same problem where the ts isn't transpiled into js first. Surely it should make more sense to have the serverless-webpack plugin first? Unfortunately it then results in this error "The plugin "serverless-webpack" should appear after the "serverless-plugin-chrome" plugin in the plugin configuration section of serverless.yml."
No, Even by changing orders, some other problem appeared. I am having compatibility issues with all these working together with aws lambda and puppeteer.
@erdahuja Any update on this? I'm facing the very same issue.
Most helpful comment
No, Even by changing orders, some other problem appeared. I am having compatibility issues with all these working together with aws lambda and puppeteer.