Following these instructions Traditional Sites | Edgio Documentation and running the following commands
npm i -g @layer0/cli
npm create layer0-app@latest
cd l0trad
layer0 dev
produces the following error output
Starting Layer0 in development mode with caching disabled…
WARNING in DefinePlugin
Conflicting values for ‘process.env.NODE_ENV’
ERROR in ./src/browser.ts
Module build failed (from ./node_modules/ts-loader/index.js):
Error: Could not load TypeScript. Try installing withyarn add typescript
ornpm install typescript
. If TypeScript is installed globally, try usingyarn link typescript
ornpm link typescript
.
at Object.loader (/Users/howard.ross/Repos/l0trad/node_modules/ts-loader/dist/index.js:18:18)
ERROR in ./src/service-worker.ts
Module build failed (from ./node_modules/ts-loader/index.js):
Error: Could not load TypeScript. Try installing with `yarn add typescript` or `npm install typescript`. If TypeScript is installed globally, try using `yarn link typescript` or `npm link typescript`.
at Object.loader (/Users/howard.ross/Repos/l0trad/node_modules/ts-loader/dist/index.js:18:18)
webpack compiled with 2 errors and 1 warning
ERROR in ./src/shoppingFlowRouteHandler.ts 5:13
Module parse failed: Unexpected token (5:13)
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders
| import { injectBrowserScript } from '@layer0/starter'
|
const handler: RouteHandler = async ({ cache, removeUpstreamResponseHeader, proxy }) => {
| cache(CACHE_PAGES)
| removeUpstreamResponseHeader(‘set-cookie’) // The presence of a set-cookie header would prevent the response from being cached, so ensure set-cookie headers are removed.
webpack compiled with 1 error
error Error: Module parse failed: Unexpected token (5:13)
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders
| import { injectBrowserScript } from '@layer0/starter
const handler: RouteHandler = async ({ cache, removeUpstreamResponseHeader, proxy }) => {
| cache(CACHE_PAGES)
| removeUpstreamResponseHeader(‘set-cookie’) // The presence of a set-cookie header would prevent the response from being cached, so ensure set-cookie headers are removed.
at Object…/src/shoppingFlowRouteHandler.ts (/Users/howard.ross/Repos/l0trad/.layer0/lambda/routes.js:32457:7)
at webpack_require (/Users/howard.ross/Repos/l0trad/.layer0/lambda/routes.js:32624:42)
at /Users/howard.ross/Repos/l0trad/.layer0/lambda/routes.js:32699:83
at /Users/howard.ross/Repos/l0trad/.layer0/lambda/routes.js:32722:3
at /Users/howard.ross/Repos/l0trad/.layer0/lambda/routes.js:32725:12
at webpackUniversalModuleDefinition (/Users/howard.ross/Repos/l0trad/.layer0/lambda/routes.js:3:20)
at Object. (/Users/howard.ross/Repos/l0trad/.layer0/lambda/routes.js:10:3)
at Module._compile (internal/modules/cjs/loader.js:1137:30)
at Object.Module._extensions…js (internal/modules/cjs/loader.js:1157:10)
at Module.load (internal/modules/cjs/loader.js:985:32)