glimmerjs / glimmer-experimental

A set of experimental high-level APIs built on Glimmer.js
https://glimmerjs.github.io/glimmer-experimental/
58 stars 26 forks source link

Fresh app from blueprint doesn't build #108

Open knownasilya opened 3 years ago

knownasilya commented 3 years ago

Created a new app using the blueprint, and get this error on npm start. Using Node 12.22.1

➜  cogs git:(master) ✗ yarn start
yarn run v1.22.4
$ webpack-dev-server
ℹ 「wds」: Project is running at http://localhost:8080/
ℹ 「wds」: webpack output is served from /
ℹ 「wds」: Content not from webpack is served from /Users/iradchenko/sandbox/cogs/dist
✖ 「wdm」: Hash: 11a881d98d1e79d394b5
Version: webpack 4.46.0
Time: 1653ms
Built at: 04/27/2021 3:45:01 PM
               Asset       Size  Chunks             Chunk Names
       app.bundle.js    405 KiB     app  [emitted]  app
          index.html  535 bytes          [emitted]  
  public/favicon.png   2.04 KiB          [emitted]  
  public/logo192.png   5.96 KiB          [emitted]  
  public/logo512.png     17 KiB          [emitted]  
public/manifest.json  488 bytes          [emitted]  
   public/robots.txt   51 bytes          [emitted]  
     tests.bundle.js    406 KiB   tests  [emitted]  tests
    tests/index.html  377 bytes          [emitted]  
Entrypoint app = app.bundle.js
Entrypoint tests = tests.bundle.js
[1] multi (webpack)-dev-server/client?http://localhost:8080 ./src/index.js 40 bytes {app} [built]
[2] multi (webpack)-dev-server/client?http://localhost:8080 ./tests/rendering/App.test.js 40 bytes {tests} [built]
[./node_modules/ansi-html/index.js] 4.26 KiB {app} {tests} [built]
[./node_modules/html-entities/lib/index.js] 457 bytes {app} {tests} [built]
[./node_modules/webpack-dev-server/client/index.js?http://localhost:8080] (webpack)-dev-server/client?http://localhost:8080 4.29 KiB {app} {tests} [built]
[./node_modules/webpack-dev-server/client/overlay.js] (webpack)-dev-server/client/overlay.js 3.51 KiB {app} {tests} [built]
[./node_modules/webpack-dev-server/client/socket.js] (webpack)-dev-server/client/socket.js 1.53 KiB {app} {tests} [built]
[./node_modules/webpack-dev-server/client/utils/createSocketUrl.js] (webpack)-dev-server/client/utils/createSocketUrl.js 2.91 KiB {app} {tests} [built]
[./node_modules/webpack-dev-server/client/utils/log.js] (webpack)-dev-server/client/utils/log.js 964 bytes {app} {tests} [built]
[./node_modules/webpack-dev-server/client/utils/reloadApp.js] (webpack)-dev-server/client/utils/reloadApp.js 1.59 KiB {app} {tests} [built]
[./node_modules/webpack-dev-server/client/utils/sendMessage.js] (webpack)-dev-server/client/utils/sendMessage.js 402 bytes {app} {tests} [built]
[./node_modules/webpack-dev-server/node_modules/strip-ansi/index.js] (webpack)-dev-server/node_modules/strip-ansi/index.js 162 bytes {app} {tests} [built]
[./node_modules/webpack/hot sync ^\.\/log$] (webpack)/hot sync nonrecursive ^\.\/log$ 170 bytes {app} {tests} [built]
[./src/index.js] 2.92 KiB {app} [built] [failed] [1 error]
[./tests/rendering/App.test.js] 2.92 KiB {tests} [built] [failed] [1 error]
    + 22 hidden modules

ERROR in ./src/index.js
Module build failed (from ./node_modules/babel-loader/lib/index.js):
Error: Caching was left unconfigured. Babel's plugins, presets, and .babelrc.js files can be configured
for various types of caching, using the first param of their handler functions:

module.exports = function(api) {
  // The API exposes the following:

  // Cache the returned value forever and don't call this function again.
  api.cache(true);

  // Don't cache at all. Not recommended because it will be very slow.
  api.cache(false);

  // Cached based on the value of some function. If this function returns a value different from
  // a previously-encountered value, the plugins will re-evaluate.
  var env = api.cache(() => process.env.NODE_ENV);

  // If testing for a specific env, we recommend specifics to avoid instantiating a plugin for
  // any possible NODE_ENV value that might come up during plugin execution.
  var isProd = api.cache(() => process.env.NODE_ENV === "production");

  // .cache(fn) will perform a linear search though instances to find the matching plugin based
  // based on previous instantiated plugins. If you want to recreate the plugin and discard the
  // previous instance whenever something changes, you may use:
  var isProd = api.cache.invalidate(() => process.env.NODE_ENV === "production");

  // Note, we also expose the following more-verbose versions of the above examples:
  api.cache.forever(); // api.cache(true)
  api.cache.never();   // api.cache(false)
  api.cache.using(fn); // api.cache(fn)

  // Return the value that will be cached.
  return { };
};
    at throwConfigError (/Users/iradchenko/sandbox/cogs/node_modules/@babel/core/lib/config/files/configuration.js:280:9)
    at readConfigJS (/Users/iradchenko/sandbox/cogs/node_modules/@babel/core/lib/config/files/configuration.js:198:43)
    at readConfigJS.next (<anonymous>)
    at Function.<anonymous> (/Users/iradchenko/sandbox/cogs/node_modules/@babel/core/lib/gensync-utils/async.js:16:3)
    at Generator.next (<anonymous>)
    at step (/Users/iradchenko/sandbox/cogs/node_modules/gensync/index.js:261:32)
    at evaluateAsync (/Users/iradchenko/sandbox/cogs/node_modules/gensync/index.js:291:5)
    at Function.errback (/Users/iradchenko/sandbox/cogs/node_modules/gensync/index.js:113:7)
    at errback (/Users/iradchenko/sandbox/cogs/node_modules/@babel/core/lib/gensync-utils/async.js:60:18)
    at async (/Users/iradchenko/sandbox/cogs/node_modules/gensync/index.js:188:31)
    at onFirstPause (/Users/iradchenko/sandbox/cogs/node_modules/gensync/index.js:216:13)
    at Generator.next (<anonymous>)
    at cachedFunction (/Users/iradchenko/sandbox/cogs/node_modules/@babel/core/lib/config/caching.js:58:46)
    at cachedFunction.next (<anonymous>)
    at step (/Users/iradchenko/sandbox/cogs/node_modules/gensync/index.js:269:25)
    at evaluateAsync (/Users/iradchenko/sandbox/cogs/node_modules/gensync/index.js:291:5)

ERROR in ./tests/rendering/App.test.js
Module build failed (from ./node_modules/babel-loader/lib/index.js):
Error: Caching was left unconfigured. Babel's plugins, presets, and .babelrc.js files can be configured
for various types of caching, using the first param of their handler functions:

module.exports = function(api) {
  // The API exposes the following:

  // Cache the returned value forever and don't call this function again.
  api.cache(true);

  // Don't cache at all. Not recommended because it will be very slow.
  api.cache(false);

  // Cached based on the value of some function. If this function returns a value different from
  // a previously-encountered value, the plugins will re-evaluate.
  var env = api.cache(() => process.env.NODE_ENV);

  // If testing for a specific env, we recommend specifics to avoid instantiating a plugin for
  // any possible NODE_ENV value that might come up during plugin execution.
  var isProd = api.cache(() => process.env.NODE_ENV === "production");

  // .cache(fn) will perform a linear search though instances to find the matching plugin based
  // based on previous instantiated plugins. If you want to recreate the plugin and discard the
  // previous instance whenever something changes, you may use:
  var isProd = api.cache.invalidate(() => process.env.NODE_ENV === "production");

  // Note, we also expose the following more-verbose versions of the above examples:
  api.cache.forever(); // api.cache(true)
  api.cache.never();   // api.cache(false)
  api.cache.using(fn); // api.cache(fn)

  // Return the value that will be cached.
  return { };
};
    at throwConfigError (/Users/iradchenko/sandbox/cogs/node_modules/@babel/core/lib/config/files/configuration.js:280:9)
    at readConfigJS (/Users/iradchenko/sandbox/cogs/node_modules/@babel/core/lib/config/files/configuration.js:198:43)
    at readConfigJS.next (<anonymous>)
    at Function.<anonymous> (/Users/iradchenko/sandbox/cogs/node_modules/@babel/core/lib/gensync-utils/async.js:16:3)
    at Generator.next (<anonymous>)
    at step (/Users/iradchenko/sandbox/cogs/node_modules/gensync/index.js:261:32)
    at evaluateAsync (/Users/iradchenko/sandbox/cogs/node_modules/gensync/index.js:291:5)
    at Function.errback (/Users/iradchenko/sandbox/cogs/node_modules/gensync/index.js:113:7)
    at errback (/Users/iradchenko/sandbox/cogs/node_modules/@babel/core/lib/gensync-utils/async.js:60:18)
    at async (/Users/iradchenko/sandbox/cogs/node_modules/gensync/index.js:188:31)
    at onFirstPause (/Users/iradchenko/sandbox/cogs/node_modules/gensync/index.js:216:13)
    at Generator.next (<anonymous>)
    at cachedFunction (/Users/iradchenko/sandbox/cogs/node_modules/@babel/core/lib/config/caching.js:58:46)
    at cachedFunction.next (<anonymous>)
    at step (/Users/iradchenko/sandbox/cogs/node_modules/gensync/index.js:269:25)
    at evaluateAsync (/Users/iradchenko/sandbox/cogs/node_modules/gensync/index.js:291:5)
 @ multi ./tests/rendering/App.test.js tests[0]
Child HtmlWebpackCompiler:
     2 assets
    Entrypoint HtmlWebpackPlugin_0 = __child-HtmlWebpackPlugin_0
    Entrypoint HtmlWebpackPlugin_1 = __child-HtmlWebpackPlugin_1
    [./node_modules/html-webpack-plugin/lib/loader.js!./index.html] 751 bytes {HtmlWebpackPlugin_0} [built]
    [./node_modules/html-webpack-plugin/lib/loader.js!./tests/index.html] 588 bytes {HtmlWebpackPlugin_1} [built]
ℹ 「wdm」: Failed to compile.
kapilkaisare commented 3 years ago

I'm seeing the same issue as well, using Node 14.15.5. I was able to get rid of this error by replacing the contents of my .babelrc.js with:

module.exports = function (api) {
  api.cache(true);
  return {
    presets: ['@glimmer/babel-preset', '@babel/preset-env', '@babel/preset-typescript'],
  };
};

Error:

> webpack-dev-server

ℹ 「wds」: Project is running at http://localhost:8080/
ℹ 「wds」: webpack output is served from /
ℹ 「wds」: Content not from webpack is served from /Users/kapilkaisare/GitHub/kapilkaisare/chronic/dist
✖ 「wdm」: Hash: 6c3a4fc0ba918c48e99a
Version: webpack 4.46.0
Time: 1391ms
Built at: 07/02/2021 7:06:03 PM
               Asset       Size  Chunks             Chunk Names
       app.bundle.js    406 KiB     app  [emitted]  app
          index.html  538 bytes          [emitted]
  public/favicon.png   2.04 KiB          [emitted]
  public/logo192.png   5.96 KiB          [emitted]
  public/logo512.png     17 KiB          [emitted]
public/manifest.json  491 bytes          [emitted]
   public/robots.txt   51 bytes          [emitted]
     tests.bundle.js    406 KiB   tests  [emitted]  tests
    tests/index.html  380 bytes          [emitted]
Entrypoint app = app.bundle.js
Entrypoint tests = tests.bundle.js
[1] multi (webpack)-dev-server/client?http://localhost:8080 ./src/index.js 40 bytes {app} [built]
[2] multi (webpack)-dev-server/client?http://localhost:8080 ./tests/rendering/App.test.js 40 bytes {tests} [built]
[./node_modules/ansi-html/index.js] 4.26 KiB {app} {tests} [built]
[./node_modules/html-entities/lib/index.js] 457 bytes {app} {tests} [built]
[./node_modules/webpack-dev-server/client/index.js?http://localhost:8080] (webpack)-dev-server/client?http://localhost:8080 4.29 KiB {app} {tests} [built]
[./node_modules/webpack-dev-server/client/overlay.js] (webpack)-dev-server/client/overlay.js 3.51 KiB {app} {tests} [built]
[./node_modules/webpack-dev-server/client/socket.js] (webpack)-dev-server/client/socket.js 1.53 KiB {app} {tests} [built]
[./node_modules/webpack-dev-server/client/utils/createSocketUrl.js] (webpack)-dev-server/client/utils/createSocketUrl.js 2.91 KiB {app} {tests} [built]
[./node_modules/webpack-dev-server/client/utils/log.js] (webpack)-dev-server/client/utils/log.js 964 bytes {app} {tests} [built]
[./node_modules/webpack-dev-server/client/utils/reloadApp.js] (webpack)-dev-server/client/utils/reloadApp.js 1.59 KiB {app} {tests} [built]
[./node_modules/webpack-dev-server/client/utils/sendMessage.js] (webpack)-dev-server/client/utils/sendMessage.js 402 bytes {app} {tests} [built]
[./node_modules/webpack-dev-server/node_modules/strip-ansi/index.js] (webpack)-dev-server/node_modules/strip-ansi/index.js 162 bytes {app} {tests} [built]
[./node_modules/webpack/hot sync ^\.\/log$] (webpack)/hot sync nonrecursive ^\.\/log$ 170 bytes {app} {tests} [built]
[./src/index.js] 3.12 KiB {app} [built] [failed] [1 error]
[./tests/rendering/App.test.js] 3.12 KiB {tests} [built] [failed] [1 error]
    + 22 hidden modules

ERROR in ./src/index.js
Module build failed (from ./node_modules/babel-loader/lib/index.js):
Error: Caching was left unconfigured. Babel's plugins, presets, and .babelrc.js files can be configured
for various types of caching, using the first param of their handler functions:

module.exports = function(api) {
  // The API exposes the following:

  // Cache the returned value forever and don't call this function again.
  api.cache(true);

  // Don't cache at all. Not recommended because it will be very slow.
  api.cache(false);

  // Cached based on the value of some function. If this function returns a value different from
  // a previously-encountered value, the plugins will re-evaluate.
  var env = api.cache(() => process.env.NODE_ENV);

  // If testing for a specific env, we recommend specifics to avoid instantiating a plugin for
  // any possible NODE_ENV value that might come up during plugin execution.
  var isProd = api.cache(() => process.env.NODE_ENV === "production");

  // .cache(fn) will perform a linear search though instances to find the matching plugin based
  // based on previous instantiated plugins. If you want to recreate the plugin and discard the
  // previous instance whenever something changes, you may use:
  var isProd = api.cache.invalidate(() => process.env.NODE_ENV === "production");

  // Note, we also expose the following more-verbose versions of the above examples:
  api.cache.forever(); // api.cache(true)
  api.cache.never();   // api.cache(false)
  api.cache.using(fn); // api.cache(fn)

  // Return the value that will be cached.
  return { };
};
    at throwConfigError (/Users/kapilkaisare/GitHub/kapilkaisare/chronic/node_modules/@babel/core/lib/config/files/configuration.js:323:9)
    at readConfigJS (/Users/kapilkaisare/GitHub/kapilkaisare/chronic/node_modules/@babel/core/lib/config/files/configuration.js:239:43)
    at readConfigJS.next (<anonymous>)
    at Function.<anonymous> (/Users/kapilkaisare/GitHub/kapilkaisare/chronic/node_modules/@babel/core/lib/gensync-utils/async.js:24:3)
    at Generator.next (<anonymous>)
    at step (/Users/kapilkaisare/GitHub/kapilkaisare/chronic/node_modules/gensync/index.js:261:32)
    at evaluateAsync (/Users/kapilkaisare/GitHub/kapilkaisare/chronic/node_modules/gensync/index.js:291:5)
    at Function.errback (/Users/kapilkaisare/GitHub/kapilkaisare/chronic/node_modules/gensync/index.js:113:7)
    at errback (/Users/kapilkaisare/GitHub/kapilkaisare/chronic/node_modules/@babel/core/lib/gensync-utils/async.js:71:18)
    at async (/Users/kapilkaisare/GitHub/kapilkaisare/chronic/node_modules/gensync/index.js:188:31)
    at onFirstPause (/Users/kapilkaisare/GitHub/kapilkaisare/chronic/node_modules/gensync/index.js:216:13)
    at Generator.next (<anonymous>)
    at cachedFunction (/Users/kapilkaisare/GitHub/kapilkaisare/chronic/node_modules/@babel/core/lib/config/caching.js:66:46)
    at cachedFunction.next (<anonymous>)
    at step (/Users/kapilkaisare/GitHub/kapilkaisare/chronic/node_modules/gensync/index.js:269:25)
    at evaluateAsync (/Users/kapilkaisare/GitHub/kapilkaisare/chronic/node_modules/gensync/index.js:291:5)

ERROR in ./tests/rendering/App.test.js
Module build failed (from ./node_modules/babel-loader/lib/index.js):
Error: Caching was left unconfigured. Babel's plugins, presets, and .babelrc.js files can be configured
for various types of caching, using the first param of their handler functions:

module.exports = function(api) {
  // The API exposes the following:

  // Cache the returned value forever and don't call this function again.
  api.cache(true);

  // Don't cache at all. Not recommended because it will be very slow.
  api.cache(false);

  // Cached based on the value of some function. If this function returns a value different from
  // a previously-encountered value, the plugins will re-evaluate.
  var env = api.cache(() => process.env.NODE_ENV);

  // If testing for a specific env, we recommend specifics to avoid instantiating a plugin for
  // any possible NODE_ENV value that might come up during plugin execution.
  var isProd = api.cache(() => process.env.NODE_ENV === "production");

  // .cache(fn) will perform a linear search though instances to find the matching plugin based
  // based on previous instantiated plugins. If you want to recreate the plugin and discard the
  // previous instance whenever something changes, you may use:
  var isProd = api.cache.invalidate(() => process.env.NODE_ENV === "production");

  // Note, we also expose the following more-verbose versions of the above examples:
  api.cache.forever(); // api.cache(true)
  api.cache.never();   // api.cache(false)
  api.cache.using(fn); // api.cache(fn)

  // Return the value that will be cached.
  return { };
};
    at throwConfigError (/Users/kapilkaisare/GitHub/kapilkaisare/chronic/node_modules/@babel/core/lib/config/files/configuration.js:323:9)
    at readConfigJS (/Users/kapilkaisare/GitHub/kapilkaisare/chronic/node_modules/@babel/core/lib/config/files/configuration.js:239:43)
    at readConfigJS.next (<anonymous>)
    at Function.<anonymous> (/Users/kapilkaisare/GitHub/kapilkaisare/chronic/node_modules/@babel/core/lib/gensync-utils/async.js:24:3)
    at Generator.next (<anonymous>)
    at step (/Users/kapilkaisare/GitHub/kapilkaisare/chronic/node_modules/gensync/index.js:261:32)
    at evaluateAsync (/Users/kapilkaisare/GitHub/kapilkaisare/chronic/node_modules/gensync/index.js:291:5)
    at Function.errback (/Users/kapilkaisare/GitHub/kapilkaisare/chronic/node_modules/gensync/index.js:113:7)
    at errback (/Users/kapilkaisare/GitHub/kapilkaisare/chronic/node_modules/@babel/core/lib/gensync-utils/async.js:71:18)
    at async (/Users/kapilkaisare/GitHub/kapilkaisare/chronic/node_modules/gensync/index.js:188:31)
    at onFirstPause (/Users/kapilkaisare/GitHub/kapilkaisare/chronic/node_modules/gensync/index.js:216:13)
    at Generator.next (<anonymous>)
    at cachedFunction (/Users/kapilkaisare/GitHub/kapilkaisare/chronic/node_modules/@babel/core/lib/config/caching.js:66:46)
    at cachedFunction.next (<anonymous>)
    at step (/Users/kapilkaisare/GitHub/kapilkaisare/chronic/node_modules/gensync/index.js:269:25)
    at evaluateAsync (/Users/kapilkaisare/GitHub/kapilkaisare/chronic/node_modules/gensync/index.js:291:5)
 @ multi ./tests/rendering/App.test.js tests[0]
Child HtmlWebpackCompiler:
     2 assets
    Entrypoint HtmlWebpackPlugin_0 = __child-HtmlWebpackPlugin_0
    Entrypoint HtmlWebpackPlugin_1 = __child-HtmlWebpackPlugin_1
    [./node_modules/html-webpack-plugin/lib/loader.js!./index.html] 771 bytes {HtmlWebpackPlugin_0} [built]
    [./node_modules/html-webpack-plugin/lib/loader.js!./tests/index.html] 608 bytes {HtmlWebpackPlugin_1} [built]
ℹ 「wdm」: Failed to compile.
MPParsley commented 1 year ago

Duplicate of https://github.com/glimmerjs/glimmer-experimental/issues/134

knownasilya commented 1 year ago

@MPParsley you mean that is a duplicate of this 😸

MPParsley commented 1 year ago

@MPParsley you mean that is a duplicate of this 😸

We could argue about the semantics but yes, this issue was first ;-)