App Launcher

AGS allows for a built in app launcher, removing the need for external ones like Rofi.
Is it a goal to add that feature to hyprpanel? Could easily tie it to dynamic theming.

hmm i think so. but i still prefer rofi lol. but having options for switching would be nice

Yes we really need a launcher. You could use the applauncher code from here https://github.com/Aylur/dotfiles

ags app launcher for some reason dont refresh when i install new apps. But rofi always does.

Yeah thats just how it is, you have to restart ags, you can use a keybind like ctrl+shift+r, then it will show up.

I have a working minimal solution. I myself prefer rofi

I have a working minimal solution. I myself prefer rofi

i mean well it works lol.

I tried to make a working minimal solution too
Would be nice to have it  as a dropdownmenu and a standard window, and the architecture is well designed and seems to allow that really easily.
I had some issue making the dev environment resolve typing correctly ( mostly errors when importing .js extensions in ts files ) and had to mass replace import statements, so i wont be making a PR today, but i leave the snippet here for reference
import DropdownMenu from '../shared/dropdown/index.js';
import options from 'src/options.js';
import Variable from 'astal/variable';
import { bind } from 'astal/binding';
import { RevealerTransitionMap } from 'src/lib/constants/options.js';
import { App, Gtk } from 'astal/gtk3';
import Separator from 'src/components/shared/Separator.js';
import AstalApps from 'gi://AstalApps?version=0.1'
import { icon, launchApp } from 'src/lib/utils.js';
import { Entry, EntryProps, Scrollable } from 'astal/gtk3/widget';

const apps = new AstalApps.Apps({
    nameMultiplier: 2,
    keywordsMultiplier: 2,
    executableMultiplier: 1,
    entryMultiplier: 0.5,
    categoriesMultiplier: 0.5,
});

interface ApplicationItemProps {
    app: AstalApps.Application;
    onLaunched?: () => void;
}

const ApplicationItem = ({ app, onLaunched }: ApplicationItemProps): JSX.Element => {
    return (
        <button className="notification-card" halign={Gtk.Align.FILL} valign={Gtk.Align.START} onClick={() => { launchApp(app); onLaunched?.() }}>
            <box spacing={5}>
                <icon className="notification-card-image icon" margin={5} halign={Gtk.Align.CENTER} valign={Gtk.Align.CENTER} vexpand={false} icon={icon(app.iconName)} />
                <label halign={Gtk.Align.START} valign={Gtk.Align.CENTER} label={app.name} hexpand vexpand truncate wrap />
            </box>
        </button>
    );
}

function useRef<T>() {
    let ref: T | null = null;

    return {
        set: (r: T) => { ref = r },
        get: () => ref
    }
}

function useApplicationsFilter() {
    const filter = Variable('')

    const list = bind(filter).as((f) => {
        // show all apps by default
        if (!f) return apps.get_list()
        // if the filter is a single character, show all apps that start with that character
        if (f.length === 1) return apps.get_list().filter((app) => app.name.toLowerCase().startsWith(f.toLowerCase()))
        // otherwise, do a fuzzy search (this method wont filter with a single character)
        return apps.fuzzy_query(f)
    })

    return { filter, list }
}

interface ApplicationLauncherProps {
    visible: Variable<boolean>;
    onLaunched?: () => void;
}

const SearchBar = ({ value, setup, onActivate }: { value?: Variable<string>; setup?: (self: Entry) => void; onActivate?: EntryProps['onActivate'] }) => {
    return (
        <box className="notification-menu-controls" expand={false} vertical={false}>
            <box className="menu-label-container notifications" halign={Gtk.Align.START} valign={Gtk.Align.CENTER} expand>
                <entry onActivate={onActivate} setup={setup} className="menu-label notifications" placeholderText="Filter" text={value && bind(value)} onChanged={value && ((entry) => value.set(entry.text))} />
            </box>
            <box halign={Gtk.Align.END} valign={Gtk.Align.CENTER} expand={false}>
                <Separator
                    halign={Gtk.Align.CENTER}
                    vexpand={true}
                    className="menu-separator notification-controls"
                />
                <label className="clear-notifications-label txt-icon" label="" />
            </box>
        </box>
    )
}

const ApplicationLauncher = ({ visible, onLaunched }: ApplicationLauncherProps): JSX.Element => {
    const entry = useRef<Entry>()
    const scrollable = useRef<Scrollable>()

    const { filter, list } = useApplicationsFilter()

    const onFilterReturn = () => {
        const first = list.get()[0]
        if (!first) return;
        launchApp(first)
        onLaunched?.()
    }

    // focus the entry when the menu is shown
    const onShow = () => {
        entry.get()?.grab_focus()
    }
    visible.subscribe(v => v && onShow());

    const onHide = () => {
        // clear the filter when the menu is hidden
        filter.set('')
        // TODO: reset scroll position
    }
    visible.subscribe(v => !v && onHide);

    return (
        <box className="notification-menu-content" css="padding: 1px; margin: -1px;" hexpand vexpand>
            <box className="notification-card-container menu" hexpand vexpand vertical>
                <SearchBar value={filter} setup={entry.set} onActivate={onFilterReturn} />
                <scrollable vscroll={Gtk.PolicyType.AUTOMATIC} setup={scrollable.set}>
                    <box className="menu-content-container notifications" halign={Gtk.Align.FILL} valign={Gtk.Align.START} spacing={0} vexpand vertical>
                        {list.as(apps => apps.map((app) => <ApplicationItem app={app} onLaunched={onLaunched} />))}
                    </box>
                </scrollable>
            </box>
        </box>
    )
}

/**
 * track the visibility of a window
 * this is necessary because menu are realized at startup and never destroyed
 * making onRealize and onDestroy unreliable for lifecycle management
 */
function useWindowVisibility(windowName: string) {
    const visible = Variable(!!App.get_window(windowName)?.visible);

    App.connect('window-toggled', (_, window) => {
        if (window.name !== windowName) return;
        visible.set(window.visible);
    })

    return visible;
}

export default (): JSX.Element => {
    const visible = useWindowVisibility('notificationsmenu');

    const close = () => App.get_window('notificationsmenu')?.set_visible(false);

    return (
        <DropdownMenu
            name={'notificationsmenu'}
            transition={bind(options.menus.transition).as((transition) => RevealerTransitionMap[transition])}
        >
            <ApplicationLauncher visible={visible} onLaunched={close} />
        </DropdownMenu>
    );
};

its my first time using gtk and astal, so I just replaced the notification menu implementation to quickly draft something ( new years eve tonight ) and surely made a lot of mistakes. Also, I couldnt make keyboard navigation work, even trying to use the Gtk3 ListBox and ListBoxRow. Also I didnt do any styling and just reused notification menu styles.
Anyway I hope to continue iterating on this and making a PR.
PS:

do you guys have live reload in development ?
is the .js extensions in imports mandatory for the code to build and the lsp to work in your system ?

Happy new year !


Saga not being called on react native

I have this saga-reducer-store code that should in theory fire a saga event on dispatch, but I see that no action happens at all. This code does work on react.
A related SO question is Redux saga - Worker saga not getting called on react native but the solution is outdated as take* form redux-saga is deprecated.
//rootSaga.js
import { takeEvery } from "redux-saga/effects";
export function* rootSaga() {
    yield takeEvery(LoginSagaConstants.LOGIN, userLogin)
}

//loginSaga.js
export function* userLogin(action) {
   console.log("userLogin not getting called");
   const response = yield call(LoginAPI.login, action.user);
   console.log(response);
   ...
}

//loginScreen.js
console.log("start dispatching");
dispatch({
    type: sagaConstants.LOGIN,
    user: {
        username: "username",
        password: "password",
        robottest : "robottest"
    }
});

//store.js
import {createStore, applyMiddleware, compose} from "redux";
import {createLogger} from 'redux-logger'
import createSagaMiddleware from 'redux-saga'
const initialState = {};

// import all Reducers
import {reducers} from "./reducers";

// import all Sagas
import { rootSaga } from "./sagas";

// define middlewares
let middlewares = [];

// create and add the saga middleware
const sagaMiddleware = createSagaMiddleware();
middlewares.push(sagaMiddleware);

//add the freeze and logger dev middleware
if (process.env.NODE_ENV !== 'production') {
    middlewares.push(createLogger());
}

// apply the middleware
let middleware = applyMiddleware(...middlewares);

const enhancer = compose(
    middleware
)

export default function configureStore() {
    const store = createStore(reducers, initialState, enhancer);
    // run saga middleware
    sagaMiddleware.run(rootSaga);
    return store;
}

App.js
...
import configureStore from './store'
const store = configureStore();
...
render() {
     return (
            <Provider store={store}>
                <RootStack/>
            </Provider>
        );
    }

my console only prints start dispatching and nothing else happens.

LoginSagaConstants.LOGIN and  sagaConstants.LOGIN are different

@MaxToyberman they are same, just imported differently
The issue was I was using react navigation, and the dispatch was not being passed down.... so I used the store directly, and seems to be working now....
Thanks everyone


Expo support of this package?

Hi does this package also supports expo for react native. If not, is there any other package that I should use?
I tried installing this package in expo app and faced this error.
ERROR  TypeError: undefined is not an object (evaluating '_raygun4reactnative.RaygunClient.init')
This error is located at:
in App (created by withDevTools(App))
in withDevTools(App)
in RCTView (created by View)
in View (created by AppContainer)
in RCTView (created by View)
in View (created by AppContainer)
in AppContainer
in main(RootComponent)

Hello! Sorry that this message has been unanswered for a long time, but I have added a guide to use this Raygun provider on Expo, as well as a demo project under ExpoDemo. I hope that can help to anyone looking to use the provider in Expo projects.


[AutoPR storage/resource-manager] Support for SRP BlobServiceProperties API

Created to sync https://github.com/Azure/azure-rest-api-specs/pull/4316

This PR has been merged into https://github.com/Azure/azure-sdk-for-go/pull/3207


[SPARK-27693][SQL] Add default catalog property

What changes were proposed in this pull request?
Add a SQL config property for the default v2 catalog.
How was this patch tested?
Existing tests for regressions.

@jzhuge, @mccheah, @cloud-fan, here is a PR that adds a config property to set the default v2 catalog.

Test build #105366 has started for PR 24594 at commit f4a0621.

Merged build finished. Test PASSed.

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/testing-k8s-prb-make-spark-distribution-unified/10632/
Test PASSed.

Test build #105366 has finished for PR 24594 at commit f4a0621.

This patch passes all tests.
This patch merges cleanly.
This patch adds no public classes.

Merged build finished. Test PASSed.

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/105366/
Test PASSed.

@cloud-fan, can you take a look at this? Future PRs depend on the default catalog to resolve v2 tables.

Merged build finished. Test PASSed.

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/testing-k8s-prb-make-spark-distribution-unified/10648/
Test PASSed.

Test build #105386 has started for PR 24594 at commit d8e2849.

Test build #105386 has finished for PR 24594 at commit d8e2849.

This patch passes all tests.
This patch merges cleanly.
This patch adds the following public classes (experimental):
class ResourceInformation(

Merged build finished. Test PASSed.

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/105386/
Test PASSed.

I've rebased and updated this to enable the tests that were ignored in #24570.

Merged build finished. Test PASSed.

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/testing-k8s-prb-make-spark-distribution-unified/10684/
Test PASSed.

Test build #105421 has started for PR 24594 at commit 03cf48b.

Test build #105421 has finished for PR 24594 at commit 03cf48b.

This patch passes all tests.
This patch merges cleanly.
This patch adds no public classes.

Merged build finished. Test PASSed.

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/105421/
Test PASSed.

@cloud-fan, any more comments? It would be great to get this in so that we can start using it.

Retest this please.

Merged build finished. Test PASSed.

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/testing-k8s-prb-make-spark-distribution-unified/10800/
Test PASSed.

Test build #105546 has started for PR 24594 at commit 03cf48b.

Thanks @dongjoon-hyun !

Test build #105546 has finished for PR 24594 at commit 03cf48b.

This patch fails due to an unknown error code, -9.
This patch merges cleanly.
This patch adds no public classes.

Merged build finished. Test FAILed.

Test FAILed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/105546/
Test FAILed.


fixed css of access pages containers

Before, the containers in the access pages would shrink size when changing the screen page. Now, their size stays static all throughout.

Do you mind taking a picture of your before and after?
This is what shows up for me. Before is current, after is your pull request. It cuts off part of the container since it's static.
Before

After

Before:

After:

Try changing the vertical height of the screen before and after

The thing is, it's technically impossible for the height to ever be that small.
Not tablets, phones, or any small screen size would ever have that type of height. They mainly have an issue with width.

Yes, it is impossible for phones/tablets/other small screens to have that height, but computers/laptops can have this height. Basically what I'm seeing is that the height of the components of our other pages stays static all throughout when you decrease the size of the screen, but it seems like the container of the forms for the access pages changes according to the height of the screen so that you can still see the fields. In these screenshots, it even cuts off in the middle of the footnote.

You also don't have to even make it that small to see that the size of the containers is being adjusted based on the height of the screen. If you look at other pages like Facebook for example, this doesn't happen - the height of the containers stays the same. Since users can just scroll through the page, the container height doesn't need to be adjusted based on screen height.

Yeah. I see it. That fixes the problem with the height. But a new problem arises with the width. Some of the text gets cut off.

@ChibiKev fixed.


Archive without retweets?

I've been poking around trying to figure out how to make it skip retweets without much success. I thought I could do it from like this:
 async renderTweet(tweet, options = {}) {
		if( isRetweet(tweet) ) {
			return "";
		}
...

But that didn't work, it still includes retweets. Any help is much appreciated!

I think you want if(this.isRetweet(tweet)) { on line 2 there

Though that would just hide them from the tweet list views, I think the individual retweet pages would still output empty files.
Try this too:
https://github.com/tweetback/tweetback/blob/7dfcdbfe261475760d53f30f9975102ae79ab3e3/tweet-pages.11ty.js#L16
permalink: data => this.isRetweet(tweet) ? false : /${data.tweet.id_str}/,

Thanks for the suggestion, I'm getting
tweet is not defined


Build error next.js 6.0.0

I just upgraded to<EMAIL_ADDRESS>I use a custom server, when I try to run dev, I get an error.
npm run dev

><EMAIL_ADDRESS>dev /Users/foo/gitlab/next-project/backend
> babel-node ./src/server.js

/Users/foo/gitlab/next-project/backend/node_modules/babel-core/lib/transformation/file/options/option-manager.js:328
        throw e;
        ^

Error: Plugin 0 specified in "/Users/foo/gitlab/next-project/backend/node_modules/next/babel.js" provided an invalid property of "default" (While processing preset: "/Users/foo/gitlab/next-project/backend/node_modules/next/babel.js")
    at Plugin.init (/Users/foo/gitlab/next-project/backend/node_modules/babel-core/lib/transformation/plugin.js:131:13)
    at Function.normalisePlugin (/Users/foo/gitlab/next-project/backend/node_modules/babel-core/lib/transformation/file/options/option-manager.js:152:12)
    at /Users/foo/gitlab/next-project/backend/node_modules/babel-core/lib/transformation/file/options/option-manager.js:184:30
    at Array.map (<anonymous>)
    at Function.normalisePlugins (/Users/foo/gitlab/next-project/backend/node_modules/babel-core/lib/transformation/file/options/option-manager.js:158:20)
    at OptionManager.mergeOptions (/Users/foo/gitlab/next-project/backend/node_modules/babel-core/lib/transformation/file/options/option-manager.js:234:36)
    at /Users/foo/gitlab/next-project/backend/node_modules/babel-core/lib/transformation/file/options/option-manager.js:265:14
    at /Users/foo/gitlab/next-project/backend/node_modules/babel-core/lib/transformation/file/options/option-manager.js:323:22
    at Array.map (<anonymous>)
    at OptionManager.resolvePresets (/Users/foo/gitlab/next-project/backend/node_modules/babel-core/lib/transformation/file/options/option-manager.js:275:20)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR<EMAIL_ADDRESS>dev: `babel-node ./src/server.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the<EMAIL_ADDRESS>dev script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR!      /Users/foo/.npm/_logs/2018-04-30T08_41_09_819Z-debug.log

UPDATE all this passed after upgrading all babel packages to v7

Now this is the new error.... See below for complete error message
ERROR  Failed to compile with 1 errors                                                                                10:32:07

 error  in ./pages/_document.js

Module build failed: Error: [BABEL] /Users/foo/gitlab/zyombo/backend/pages/_document.js: .value is not a valid Plugin property

I'm curious, which custom server are you using?

@DevSpeak express

Update: I updated all my babel dependencies and babel-node to version 7 so it passed now. But now, I get this error.
 ERROR  Failed to compile with 1 errors                                                                                10:32:07

 error  in ./pages/_document.js

Module build failed: Error: [BABEL] /Users/foo/gitlab/zyombo/backend/pages/_document.js: .value is not a valid Plugin property
    at /Users/foo/gitlab/zyombo/backend/node_modules/@babel/core/lib/config/validation/plugins.js:54:56
    at Array.forEach (<anonymous>)
    at validatePluginObject (/Users/foo/gitlab/zyombo/backend/node_modules/@babel/core/lib/config/validation/plugins.js:52:20)
    at /Users/foo/gitlab/zyombo/backend/node_modules/@babel/core/lib/config/full.js:215:53
    at cachedFunction (/Users/foo/gitlab/zyombo/backend/node_modules/@babel/core/lib/config/caching.js:42:17)
    at loadPluginDescriptor (/Users/foo/gitlab/zyombo/backend/node_modules/@babel/core/lib/config/full.js:207:10)
    at /Users/foo/gitlab/zyombo/backend/node_modules/@babel/core/lib/config/full.js:64:16
    at Array.map (<anonymous>)
    at recurseDescriptors (/Users/foo/gitlab/zyombo/backend/node_modules/@babel/core/lib/config/full.js:63:36)
    at loadFullConfig (/Users/foo/gitlab/zyombo/backend/node_modules/@babel/core/lib/config/full.js:112:6)
    at /Users/foo/gitlab/zyombo/backend/node_modules/@babel/core/lib/transform.js:28:33
    at _combinedTickCallback (internal/process/next_tick.js:131:7)
    at process._tickCallback (internal/process/next_tick.js:180:9)

 @ multi ./pages/_document.js

(node:1878) DeprecationWarning: Module.chunks: Use Module.forEachChunk/mapChunks/getNumberOfChunks/isInChunk/addChunk/removeChunk instead
> Ready on http://localhost:3000
^Cnpm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR<EMAIL_ADDRESS>dev: `babel-node ./src/server.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the<EMAIL_ADDRESS>dev script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR!      /Users/foo/.npm/_logs/2018-04-30T09_32_10_682Z-debug.log

I have this exact same issue with Babel and Next.

I'm getting ModuleBuildError: Module build failed: Error: Plugin 0 specified in "base" provided an invalid property of "value"
Using a custom server (express), withSass and TypeScript.

what about Babel config?
Examples of the scoped name change:
babel-cli -> @babel/cli
babel-core -> @babel/core
babel-preset-env -> @babel/preset-env

Yeah I have all that.

    "@babel/cli": "^7.0.0-beta.46",
    "@babel/core": "^7.0.0-beta.46",
    "@babel/plugin-proposal-export-default-from": "^7.0.0-beta.46",
    "@babel/preset-env": "^7.0.0-beta.46"

I've had the same problem since https://github.com/zeit/next.js/releases/tag/6.0.0-canary.3

please post your .babelrc, next.config.js etc. It's definitely related to which modules you're using in .babelrc, since next by itself is fully compatible with babel 7.
Also please follow the issue template when creating issues, as you can understand it's impossible to help you solve issues you're having based on: "it doesn't work, I get this error"

.babelrc
{
  "env": {
    "development": {
      "presets": [
        "next/babel",
        "@babel/preset-es2017",
        ["@babel/preset-stage-2", {
          decoratorsLegacy: true
        }],
        "@babel/preset-env",
        "@babel/preset-react",
      ],
      "plugins": [
        "@babel/plugin-proposal-class-properties",
        ["transform-inline-environment-variables", {
          "include": [
            "NODE_ENV",
            "GMAPS_API_KEY",
            "EMBED_API_KEY",
          ]
        }],
        ["inline-dotenv", {
          path: './.env'
        }],
      ]
    },
    "production": {
      "presets": [
        "next/babel",
        "@babel/preset-es2017",
        ["@babel/preset-stage-2", {
          decoratorsLegacy: true
        }],
        "@babel/preset-env",
        "@babel/preset-react",
      ],
      "plugins": [
        "@babel/plugin-proposal-class-properties",
        ["inline-dotenv", {
          path: './.env.production'
        }],
        ["transform-inline-environment-variables", {
          "include": [
            "NODE_ENV",
            "GMAPS_API_KEY",
            "EMBED_API_KEY",
          ]
        }],
      ]
    }
  }
}

next.config.js
const webpack = require('webpack');
const fs = require('fs');
const path = require('path');
const glob = require('glob');
const withPlugins = require('next-compose-plugins');
const withCSS = require('@zeit/next-css');
const optimizedImages = require('next-optimized-images');
const UglifyJsPlugin = require('uglifyjs-webpack-plugin');

module.exports = withPlugins([
    withCSS,
    optimizedImages,
  ], {
    webpack: (config, options) => {
      const {dev, isServer} = options;

      config.plugins.push(
        new UglifyJsPlugin({
          test: /\.js($|\?)/i
        }),
      );

      config.module.rules.push(
        {
          test: /\.(css|scss)/,
          loader: 'emit-file-loader',
          options: {
            name: 'dist/[path][name].[ext]'
          }
        },
        {
          test: /\.s(a|c)ss$/,
          exclude: /node_modules/,
          use: ['babel-loader', 'raw-loader', 'postcss-loader',
            { loader: 'sass-loader',
              options: {
                includePaths: ['styles', 'node_modules']
                  .map((d) => path.join(__dirname, d))
                  .map((g) => glob.sync(g))
                  .reduce((a, c) => a.concat(c), [])
              }
            }
          ],
        },
        {
          test: /\.js$/,
          enforce: 'pre',
          exclude: /node_modules/,
          loader: 'eslint-loader',
          options: {
            emitWarning: dev,
          },
        },
      )

      if (dev) {
        config.devtool = 'cheap-module-source-map';
      }

      return config;
    },
  });

In my case I believe it's related to ts-jest which uses babel 6. Just bootstraped a Next 5 from with-jest-typescript example a few days ago.

@timneutkens Sorry about that
.babelrc
{
	"presets": [
		"next/babel",
	],
	"plugins": [
		"styled-jsx/babel",
		"@babel/plugin-syntax-dynamic-import",
    	["lodash", {"id": ["lodash", "semantic-ui-react"]}]
	],
	"comments": false,
	"compact": true,
	"env": {
    	"development": {

      		"plugins": [
      			"transform-modules",
        		"react-hot-loader/babel"
      		]
    	}
  	}
}

package.json
{
  "name": "frontend-next",
  "version": "1.0.0",
  "description": "",
  "main": "index.js",
  "scripts": {
    "test": "echo \"Error: no test specified\" && exit 1",
    "dev": "babel-node ./src/server.js",
    "dev-mon": "nodemon --watch src/components ./src/server.js --exec=babel-node",
    "start": "NODE_ENV=production node  ./src/server.js",
    "build": "next build",
    "analyze": "NODE_ENV=production BUNDLE_ANALYZE=both next build",
    "analyze:browser": "NODE_ENV=production BUNDLE_ANALYZE=browser next build",
    "analyze:server": "NODE_ENV=production BUNDLE_ANALYZE=server next build"
  },
  "keywords": [],
  "author": "",
  "license": "ISC",
  "dependencies": {
    "@zeit/next-sass": "0.1.1",
    "apollo-client-preset": "^1.0.8",
    "apollo-link-context": "^1.0.8",
    "autoprefixer": "^8.4.1",
    "babel-loader": "^8.0.0-beta.2",
    "cloudinary-react": "^1.0.6",
    "compression": "^1.7.2",
    "cookie-parser": "^1.4.3",
    "cross-fetch": "^2.1.1",
    "es6-promise": "^4.2.4",
    "graphql": "^0.13.2",
    "graphql-tag": "^2.9.1",
    "immutability-helper": "^2.7.0",
    "lodash": "^4.17.10",
    "moment-mini": "^2.19.4",
    "next": "^6.0.0",
    "next-routes": "^1.4.1",
    "password-maker": "^1.1.3",
    "postcss": "^6.0.22",
    "postcss-colour-functions": "^1.5.2",
    "postcss-conditionals": "^2.1.0",
    "postcss-cssnext": "^3.0.2",
    "postcss-easy-import": "^3.0.0",
    "postcss-import": "^11.0.0",
    "postcss-loader": "^2.1.4",
    "postcss-simple-vars": "^4.1.0",
    "prop-types": "^15.6.1",
    "react": "^16.3.2",
    "react-apollo": "^2.1.3",
    "react-dates": "^16.6.1",
    "react-document-title": "^2.0.3",
    "react-dom": "^16.3.2",
    "react-fancy-button": "^1.0.5",
    "react-icons-kit": "^1.1.3",
    "react-redux": "^5.0.7",
    "react-redux-loading-bar": "^4.0.4",
    "react-redux-snackbar": "^1.1.0",
    "react-toastify": "^4.0.0-rc.5",
    "react-validify": "^4.0.0",
    "redux": "^4.0.0",
    "redux-promise-middleware": "^5.1.1",
    "redux-thunk": "^2.2.0",
    "semantic-ui-css": "^2.3.1",
    "semantic-ui-react": "^0.79.1",
    "tailwindcss": "^0.5.2",
    "universal-cookie": "^2.1.2"
  },
  "devDependencies": {
    "@babel/cli": "^7.0.0-beta.46",
    "@babel/core": "^7.0.0-beta.46",
    "@babel/node": "^7.0.0-beta.46",
    "@babel/plugin-syntax-dynamic-import": "^7.0.0-beta.46",
    "@babel/preset-env": "^7.0.0-beta.46",
    "@zeit/next-bundle-analyzer": "^0.1.1",
    "babel-plugin-lodash": "^3.3.2",
    "babel-plugin-transform-modules": "^0.1.1",
    "classnames": "^2.2.5",
    "emit-file-loader": "0.0.1",
    "extract-text-webpack-plugin": "^3.0.2",
    "node-sass": "^4.9.0",
    "nodemon": "^1.17.2",
    "react-hot-loader": "^4.1.2",
    "redux-devtools-extension": "^2.13.2",
    "redux-logger": "^3.0.6",
    "sass-loader": "^6.0.7",
    "style-loader": "^0.20.3",
    "styled-jsx": "^2.2.6",
    "styled-jsx-css-loader": "^0.3.0",
    "uglifyjs-webpack-plugin": "^1.2.5",
    "webpack-bundle-analyzer": "^2.11.1"
  },
  "peerDependencies": {
    "node-sass": "^4.7.2"
  }
}

next.config.js
const withBundleAnalyzer = require("@zeit/next-bundle-analyzer");
const { BundleAnalyzerPlugin } = require("webpack-bundle-analyzer");

const withCSS = require('@zeit/next-css')
const UglifyJSPlugin = require('uglifyjs-webpack-plugin')
const getRoutes = require('./src/routes')

const ExtractTextPlugin = require('extract-text-webpack-plugin')
const ExtractVendorCSS = new ExtractTextPlugin('static/vendor.css')
const util = require('util')

const webpack = require('webpack')
const path = require('path')

module.exports = withBundleAnalyzer( withCSS({

	cssLoaderOptions: {

		importLoaders: 1,
	},
	analyzeServer: ["server", "both"].includes(process.env.BUNDLE_ANALYZE),
  	analyzeBrowser: ["browser", "both"].includes(process.env.BUNDLE_ANALYZE),
  	bundleAnalyzerConfig: {
	    server: {
	    	analyzerMode: 'static',
	    	reportFilename: '../../bundles/server.html'
	    },
	    browser: {
	    	analyzerMode: 'static',
	    	reportFilename: '../bundles/client.html'
	    }
  	},

	webpack(config, options) {

		if( process.env.NODE_ENV == 'production') {

			config.plugins.push(
				new UglifyJSPlugin
				)
		}

		config.module.rules.push( {
			test: /\.scss$/,
			use: ExtractVendorCSS.extract({
				use: [
				{
					loader: 'css-loader',
					options: {
						importLoaders: 1
					}
				},
				'sass-loader'
				]
			}),
			include: /node_modules/
		} );

		//Exclude Semantic UI from css build
		config.module.rules.forEach( rule => {

			if( String(rule.test).match(/\.css/) ){

				rule.exclude = [ /semantic-ui-css/, /react-fancy-button/, /react-dates/, /react-toastify/ ]
			}
		})

		config.module.rules.push({

	        test: /\.css$/,
	        use: [
	        {
	        	loader: 'emit-file-loader',
	            options: {
	            	name: 'dist/[path][name].[ext]',
	            },
	        },
	        {
	            loader: 'babel-loader',
	            options: {
	              babelrc: false,
	              extends: path.resolve(__dirname, './.babelrc'),
	            },
	        },
	        'styled-jsx-css-loader',
	        {
				loader: 'postcss-loader',
				options: {
			    	ident: 'postcss',
			    	plugins: (loader) => [
			      		require('autoprefixer')(),
			      		require('cssnano')({
				            discardComments: { removeAll: true },
				        })
			   		]
			  	}
			}
	        ],
	        include: [ /semantic-ui-css/]
	    });

	    config.module.rules.push( {
			test: /\.css$/,
			use: ExtractVendorCSS.extract({
				use: [

				'css-loader'
				]
			}),
			include: [ /react-fancy-button/, /react-dates/, /react-toastify/ ]
		} );

		config.plugins.push( ExtractVendorCSS );

		config.plugins.push( new webpack.IgnorePlugin(/^\.\/locale$/, /moment$/) )

		config.output.publicPath = 'http://localhost:3000/'

		//console.log( util.inspect(config , false, null) );

		return config
	},
	exportPathMap: getRoutes,
	useFileSystemPublicRoutes: false
}))

@paschaldev if you define settings per environment using env in your .babelrc, you should put all config inside env, and duplicate the config for each environment (except for the differences of course). For example, here's mine:
{
  "env": {
    "development": {
      "presets": ["next/babel"],
      "plugins": [
        ["styled-components", { "ssr": true, "displayName": true, "preprocess": false }],
        ["inline-react-svg"]
      ]
    },
    "production": {
      "presets": ["next/babel"],
      "plugins": [
        ["styled-components", { "ssr": true, "displayName": false, "preprocess": false }],
        ["inline-react-svg"]
      ]
    },
    "test": {
      "presets": [["next/babel", { "preset-env": { "modules": "commonjs" } }]],
      "plugins": [
        ["styled-components", { "ssr": true, "displayName": false, "preprocess": false }],
        ["inline-react-svg"]
      ]
    }
  }
}

Yes, it's ugly, but it works.

There's a lot of things i'm not understanding from your .babelrc 🤔
{
	"presets": [
		"next/babel",
	],
	"plugins": [
		"styled-jsx/babel",
		"@babel/plugin-syntax-dynamic-import",
    	["lodash", {"id": ["lodash", "semantic-ui-react"]}]
	],
	"comments": false,
	"compact": true,
	"env": {
    	"development": {

      		"plugins": [
      			"transform-modules",
        		"react-hot-loader/babel"
      		]
    	},
    	"production": {

      		"plugins": [
      			"transform-modules",
        		"react-hot-loader/babel"
      		]
    	},
    	"test": {

      		"plugins": [
      			"transform-modules",
        		"react-hot-loader/babel"
      		]
    	},
  	}
}

Why are you adding "react-hot-loader/babel", it's part of next/babel.
Same for "styled-jsx/babel", it's included in Next.js by default.
transform-modules stops webpack from codesplitting, making your bundles very big.
@babel/plugin-syntax-dynamic-import => dynamic imports are supported in next.

So you can literally remove the whole "env" block 👌🕵, if it still persists you'll have to check if "lodash" supports babel 7.

@timneutkens Thanks for the info. I was browsing the next.js source files minutes ago and discovered that also.
This is what my updated .babelrc looks like
{
	"presets": [
		"next/babel",
	],
	"plugins": [

	],
	"comments": false,
	"compact": true,
}

Stripped down everything but I still get the same error
 ERROR  Failed to compile with 1 errors                                                 12:11:05 AM

 error  in ./pages/_document.js

Module build failed: Error: [BABEL] /Users/ezeugwupaschal/Documents/Gitlab/zyombo/backend/pages/_document.js: .value is not a valid Plugin property
    at /Users/ezeugwupaschal/Documents/Gitlab/zyombo/backend/node_modules/@babel/core/lib/config/validation/plugins.js:54:56
    at Array.forEach (<anonymous>)
    at validatePluginObject (/Users/ezeugwupaschal/Documents/Gitlab/zyombo/backend/node_modules/@babel/core/lib/config/validation/plugins.js:52:20)
    at /Users/ezeugwupaschal/Documents/Gitlab/zyombo/backend/node_modules/@babel/core/lib/config/full.js:215:53
    at cachedFunction (/Users/ezeugwupaschal/Documents/Gitlab/zyombo/backend/node_modules/@babel/core/lib/config/caching.js:42:17)
    at loadPluginDescriptor (/Users/ezeugwupaschal/Documents/Gitlab/zyombo/backend/node_modules/@babel/core/lib/config/full.js:207:10)
    at /Users/ezeugwupaschal/Documents/Gitlab/zyombo/backend/node_modules/@babel/core/lib/config/full.js:64:16
    at Array.map (<anonymous>)
    at recurseDescriptors (/Users/ezeugwupaschal/Documents/Gitlab/zyombo/backend/node_modules/@babel/core/lib/config/full.js:63:36)
    at loadFullConfig (/Users/ezeugwupaschal/Documents/Gitlab/zyombo/backend/node_modules/@babel/core/lib/config/full.js:112:6)
    at /Users/ezeugwupaschal/Documents/Gitlab/zyombo/backend/node_modules/@babel/core/lib/transform.js:28:33
    at _combinedTickCallback (internal/process/next_tick.js:131:7)
    at process._tickCallback (internal/process/next_tick.js:180:9)

 @ multi ./pages/_document.js

(node:589) DeprecationWarning: Module.chunks: Use Module.forEachChunk/mapChunks/getNumberOfChunks/isInChunk/addChunk/removeChunk instead
> Ready on http://localhost:3000

This is my _document.js file
import Document, { Head, Main, NextScript } from 'next/document'

import 'react-fancy-button/dist/FancyButton.scss'

export default class MyDocument extends Document {

    static async getInitialProps(ctx) {
        const initialProps = await Document.getInitialProps(ctx)
        return { ...initialProps }
    }

    render () {
        return (
            <html>
                <Head>
                    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0" />
                    <link rel='stylesheet' href='/_next/static/vendor.css' />
                    <link rel='stylesheet' href='/_next/static/style.css' />
                    <link href="https://fonts.googleapis.com/css?family=Montserrat:100,300,400,500,700,900" rel="stylesheet" />
                    <link href="https://fonts.googleapis.com/css?family=Quicksand:300,400,500,700" rel="stylesheet"/>
                </Head>
                <body>
                    <Main />
                    <NextScript />
                </body>
            </html>
            )
    }
}

Happened to me too, but only when running the tests (using jest).
Reproducible on https://github.com/GabrielDuarteM/portfolio, just run yarn add next to install the latest next version and run yarn test to run the tests.
The complete error log can be seen on this Travis build
yarn start and yarn build is running fine, only yarn test throws that error.
package.json
{
  "name": "portfolio",
  "version": "1.0.0",
  "main": "index.js",
  "author": "Gabriel Duarte<EMAIL_ADDRESS>(https://github.com/GabrielDuarteM/)",
  "license": "MIT",
  "scripts": {
    "start": "next src",
    "start:prod": "next start src -p $PORT",
    "prebuild": "rimraf src/out",
    "build": "next build src && yarn export && cp src/root/* src/out",
    "export": "next export src",
    "deploy": "yarn build && netlify deploy",
    "deploy:staging": "yarn deploy -e staging",
    "test": "jest",
    "lint": "yarn eslint src/**/*.js",
    "ci": "yarn build && yarn test && yarn lint"
  },
  "dependencies": {
    "next": "^6.0.0",
    "react": "^16.3.2",
    "react-dom": "^16.3.2"
  },
  "devDependencies": {
    "babel-eslint": "^8.2.3",
    "babel-preset-env": "^1.6.1",
    "enzyme": "^3.3.0",
    "enzyme-adapter-react-16": "^1.1.1",
    "eslint": "4.19.1",
    "eslint-config-airbnb": "16.1.0",
    "eslint-config-prettier": "^2.9.0",
    "eslint-plugin-import": "2.11.0",
    "eslint-plugin-jsx-a11y": "6.0.3",
    "eslint-plugin-prettier": "^2.6.0",
    "eslint-plugin-react": "7.7.0",
    "jest": "^22.4.3",
    "prettier": "^1.12.1",
    "rimraf": "^2.6.2",
    "sw-precache-webpack-plugin": "^0.11.5"
  }
}

.babelrc
{
  "env": {
    "production": {
      "presets": [
        [
          "env",
          {
            "modules": false,
            "useBuiltIns": true,
            "targets": {
              "browsers": "> 5%"
            }
          }
        ],
        "next/babel"
      ]
    },
    "development": {
      "presets": [
        [
          "env",
          {
            "modules": false,
            "useBuiltIns": true,
            "targets": {
              "browsers": "> 5%"
            }
          }
        ],
        "next/babel"
      ]
    },
    "test": {
      "presets": [["next/babel", { "preset-env": { "modules": "commonjs" } }]]
    }
  }
}

next.config.js
const SWPrecacheWebpackPlugin = require("sw-precache-webpack-plugin")

module.exports = {
  exportPathMap: function() {
    return {
      "/": { page: "/" },
      "/about": { page: "/about" },
    }
  },
  excludeFile: str => /\*.{spec,test}.js/.test(str),
  webpack: config => {
    config.plugins.push(
      new SWPrecacheWebpackPlugin({
        verbose: true,
        staticFileGlobsIgnorePatterns: [/\.next\//],
        runtimeCaching: [
          {
            handler: "networkFirst",
            urlPattern: /^https?.*/,
          },
        ],
      }),
    )

    return config
  },
}

Also experiencing this
package.json
{
  "name": "application",
  "version": "1.0.0",
  "description": "",
  "main": "index.js",
  "scripts": {
    "dev": "next",
    "build": "next build",
    "start": "next start",
    "test": "jest --no-cache",
    "test:debug": "jest --debug",
    "test:verbose": "jest --verbose",
    "test:watch": "jest --watch",
    "test:coverage": "jest -- --coverage --no-cache",
    "test:coverage:view": "jest -- --coverage --no-cache && open coverage/lcov-report/index.html",
    "lint": "eslint .",
    "storybook": "start-storybook -s . -p 6006",
    "build-storybook": "build-storybook",
    "analyze": "export ANALYZE=true && next"
  },
  "dependencies": {
    "classnames": "^2.2.5",
    "es6-promise": "^4.2.4",
    "isomorphic-unfetch": "^2.0.0",
    "js-cookie": "^2.2.0",
    "jsonwebtoken": "^8.2.1",
    "jss": "^9.8.1",
    "material-ui": "^1.0.0-beta.42",
    "moment": "^2.22.1",
    "next": "6.0.0",
    "next-redux-saga": "^2.0.1",
    "next-redux-wrapper": "^1.3.5",
    "prop-types": "^15.6.1",
    "react": "^16.3.2",
    "react-dom": "^16.3.2",
    "react-iframe": "^1.1.0",
    "react-jss": "^8.4.0",
    "react-popper": "^0.10.1",
    "react-redux": "^5.0.6",
    "redux": "^4.0.0",
    "redux-devtools-extension": "^2.13.2",
    "redux-form": "^7.3.0",
    "redux-saga": "^0.16.0",
    "webpack-bundle-analyzer": "^2.11.1"
  },
  "devDependencies": {
    "@babel/core": "^7.0.0-beta.46",
    "@babel/preset-env": "^7.0.0-beta.46",
    "@storybook/addon-actions": "^3.4.3",
    "@storybook/addon-links": "^3.4.3",
    "@storybook/addon-storyshots": "^3.4.3",
    "@storybook/addons": "^3.4.3",
    "@storybook/react": "^3.4.3",
    "@zeit/next-sass": "^0.1.2",
    "babel-loader": "^8.0.0-beta.2",
    "enzyme": "^3.3.0",
    "enzyme-adapter-react-16": "^1.1.1",
    "eslint": "^4.19.1",
    "eslint-config-airbnb": "^16.1.0",
    "eslint-plugin-import": "^2.11.0",
    "eslint-plugin-jest": "^21.15.1",
    "eslint-plugin-jsx-a11y": "^6.0.3",
    "eslint-plugin-react": "^7.7.0",
    "jest": "^22.4.3",
    "jest-cli": "^22.4.3",
    "node-sass": "^4.9.0",
    "react-addons-test-utils": "^15.6.2",
    "react-test-renderer": "^16.3.2",
    "webpack": "^3.11.0",
    "webpack-bundle-size-analyzer": "^2.7.0"
  }
}

.babelrc
{
  "presets": [
    "next/babel",
    "@babel/preset-env"
  ]
}

next.config.js
const withSass = require('@zeit/next-sass')

module.exports = withSass({
  cssModules: true,
})

Continued looking at this this morning.  I threw together this super simple example app which for me reproduces the error every time.
https://github.com/ljanssen5/next-test
While playing around with this, I noticed that if I remove the devDependency of @babel/core or babel-loader, everything works fine.  If they are both there though, the error occurs.  So not positive what the issue is exactly yet, but it seems to me that babel-loader 8.0.0-beta.2 and @babel/core 7.0.0-beta.46 are not jiving.

I was finally able to get past this issue.  However my solution may not work for all.  The app I am working on has a very simple babel setup as seen below.
{
  "presets": [
    "next/babel",
    "@babel/preset-env"
  ]
}

Once I realized that next was already taking care of babel/preset-env, I realized I didnt need to be using a custom babelrc at all or installing any babel packages in my packages.json.  After cleaning out the packages.json of babel packages and deleting .babelrc, I am back in business.
I don't believe this solution is going to work for everyone as I assume some are going to need to use custom .babelrc, but thought I'd share in case others find themselves in a similar boat as I was.

So lets first start with explaining that you should never add @babel/preset-env or babel-preset-env to your .babelrc, since it breaks code splitting with webpack.
Instead you can provide options to next/babel:
{
  "presets": [
    ["next/babel", {
	 "preset-env": {
       "targets": {
         "browsers": "> 5%"
       }
     }
	}]
  ]
}

Also when providing options don't set modules: true since that breaks code splitting too.
Besides that try running https://github.com/babel/babel-upgrade to upgrade your .babelrc, it takes care of most of the modules that have to be upgraded.

@GabrielDuarteM to fix babel-jest install: "babel-core": "7.0.0-bridge.0"

Guys thanks for the help so far. Thank you @timneutkens for the tips.
@ljanssen5 your solution worked for me.
I realized the only thing I needed from babel was @babel/node, so I removed the all other babel related plugins and packages I don't use and everything works perfectly. I'll close this now.

@timneutkens I did move the env part to next/babel config, and installed "babel-core": "7.0.0-bridge.0", but now the error is another one. When I run the tests, all of them fail with the following error:
<project root>\jest.setup.js:1
    ({"Object.<anonymous>":function(module,exports,require,__dirname,__filename,global,jest){import { configure } from "enzyme"
                                                                                ^

    SyntaxError: Unexpected token {

      at ScriptTransformer._transformAndBuildScript (node_modules/jest-runtime/build/script_transformer.js:316:17)

@GabrielDuarteM, in that case you need to do this:
{
  "env": {
    "test": {
      "presets": [["next/babel", {"preset-env": {"modules": true}}]]
    }
  }
}

And use NODE_ENV=test when running tests.

It definitely looks like it's not applying the modules transformation though 🤔

Facing the same problem, here is my .babelrc:
{
  "presets": ["next/babel", "@babel/preset-flow"],
  "plugins": [
    ["styled-components", { "ssr": true, "displayName": true, "preprocess": false }],
    [
      "module-resolver",
      {
        "root": ["./web"],
        "alias": {
          "~": "./web"
        }
      }
    ]
  ],
  "env": {
    "development": {
      "plugins": ["inline-dotenv"]
    },
    "production": {
      "plugins": ["transform-inline-environment-variables"]
    }
  }
}

From my earlier comment:

Besides that try running babel/babel-upgrade to upgrade your .babelrc, it takes care of most of the modules that have to be upgraded.

If that doesn't work it could be that one of the modules might be outdated, one that I know supports babel 7 on the latest version is styled-components.
So that leaves module-resolver, inline-dotenv and transform-inline-environment-variables.
Also make sure when using "env" you put everything inside env, instead of having a global list (that's something that also changed if I remember correctly).

I'm having this issue too. To create an app reproducing the problem I just merely need to create a new app based off the with-jest example in this very repo:
yarn create next-app --example with-jest with-jest-app
cd with-jest-app
yarn
yarn test

However, yarn dev works flawlessly.

I'm switching back to 5 due to the .value is not a valid Plugin property in development mode with a custom (express) server. Tried all the suggestions here with no success :(

I am also getting that error:
Module build failed: Error: [BABEL] /Users/foo/gitlab/zyombo/backend/pages/_document.js: .value is not a valid Plugin property
It appears somehow linked to @babel/core -- it only appears after I explicitly install it. Here's my package.json (I don't get the error with this list of dependencies):
{
  "name": "future-test",
  "version": "1.0.0",
  "description": "",
  "main": "index.js",
  "scripts": {
    "dev": "next",
    "build": "next build && next export",
    "start": "next start"
  },
  "author": "",
  "license": "ISC",
  "dependencies": {
    "@babel/preset-env": "^7.0.0-beta.46",
    "@babel/preset-react": "^7.0.0-beta.46",
    "@zeit/next-less": "^0.2.0",
    "babel-plugin-inline-dotenv": "^1.1.2",
    "babel-plugin-transform-inline-environment-variables": "^0.4.1",
    "less": "^2.7.3",
    "next": "^6.0.0",
    "react": "^16.3.2",
    "react-dom": "^16.3.2"
  }
}

As I describe here, it seems to be a babel6/7 clash: https://github.com/zeit/next.js/issues/4239#issuecomment-386450100

<EMAIL_ADDRESS>uses 7.0.0-beta.42.
From my debugging it seems that the babel-loader in Next.js's default config has two plugins.
https://github.com/zeit/next.js/blob/canary/server/build/webpack.js#L18-L19
They are ConfigItems which are created by Next.js upfront for caching/performance purposes.
It is the .value being read on these ConfigItems that is causing the error during validation.
@babel/core#createConfigItem is used to create the ConfigItems.
Maybe the version differences are responsible? Maybe there were changes made to the createConfigItem api?
...maybe I am on the wrong track too. It's very tricky to figure out what is going on.

We are having this same issue.

As I mentioned in the other similar thread https://github.com/zeit/next.js/issues/4239#issuecomment-386450100, I can at least confirm that forcing beta.42 (I did it via yarn resolutions) does allow everything to work.

For the people getting the
<project root>\jest.setup.js:1
    ({"Object.<anonymous>":function(module,exports,require,__dirname,__filename,global,jest){import { configure } from "enzyme"
                                                                                ^

    SyntaxError: Unexpected token {

      at ScriptTransformer._transformAndBuildScript (node_modules/jest-runtime/build/script_transformer.js:316:17)

error, my recommendation would be to install babel-jest. At least in my tests, it appears to be installed in the wrong place, making Jest unable to load it properly.
If you're seeing the error

Plugin 0 specified in "/node_modules/next/babel.js" provided an invalid property of "default" (While processing preset: ...

As mentioned above, you are using a combination of Babel 6 and Babel 7.
As for

.value is not a valid Plugin property

I personally have not been able to reproduce it yet. If someone could make an example repository that I can clone, I'd be happy to take a look.

Also, I insist, this issue should not be closed. The author of the issue closed it after the issue was "fixed" by a recommendation that was later deemed not convenient.
And also, as an additional reason to reopen this issue, the with-jest and with-jest-typescript examples in this very repo are having this issue, as I mentioned before.

Update: this seems to be related to the fact that jest is not yet fully compatible with babel 7. There are some instructions here that supposedly make it all work, but I tried it and it does not.

In your yarn.lock file you can find things that are using babel 6 modules by searching for babel-, but this can be really annoying.
With regard to testing, I'm using jest and babel-jest at 23.0.0-beta.0 and they work fine with babel 7.
You can also go down the resolution forcing path in package.json:
  "resolutions": {
    "@babel/core": "7.0.0-beta.42",
    "@babel/polyfill": "7.0.0-beta.42",
    "@babel/preset-env": "7.0.0-beta.42",
    "@babel/plugin-proposal-class-properties": "7.0.0-beta.42",
    "@babel/plugin-proposal-object-rest-spread": "7.0.0-beta.42",
    "@babel/plugin-proposal-optional-catch-binding": "7.0.0-beta.42",
    "@babel/plugin-transform-runtime": "7.0.0-beta.42",
    "@babel/preset-env": "7.0.0-beta.42",
    "@babel/preset-react": "7.0.0-beta.42",
    "@babel/preset-typescript": "7.0.0-beta.42",
    "@babel/runtime": "7.0.0-beta.42",
    "babel-jest": "23.0.0-beta.0",
    "jest": "23.0.0-beta.0"
  }

This may be more than you need but it does a pretty good job of making sure other babel-7-compatible libs don't wreck your repo.

Some info to get Babel 7 to work...
http://artsy.github.io/blog/2017/11/27/Babel-7-and-TypeScript/

@billnbell to be clear, I got typescript to work with babel 7 and next 6. The problem I am having is only with tests and jest. yarn dev works, my web app works. It's yarn test the one that throws the error shown in the output in my earlier comment.
I ended up going back to next v5.1.0, which immediately solves the problem. I'm not saying it's next's fault, but apparently, other libs are creating conflict by not being fully ready to work alongside babel 7.

@gnapse check out the updated version of with-jest (updated earlier today).

Also for everyone posting their .babelrc/package.json with @babel/preset-env or preset-env in it. Please read this comment: https://github.com/zeit/next.js/issues/4227#issuecomment-385688144

I am getting this too
_document.js: .value is not a valid Plugin property

at Array.forEach ()
at validatePluginObject (/Users/billbell/v/cf-v2/next-frontend/node_modules/@babel/core/lib/config/validation/plugins.js:50:20)
at /Users/billbell/v/cf-v2/next-frontend/node_modules/@babel/core/lib/config/full.js:206:53
at cachedFunction (/Users/billbell/v/cf-v2/next-frontend/node_modules/@babel/core/lib/config/caching.js:40:17)
at loadPluginDescriptor (/Users/billbell/v/cf-v2/next-frontend/node_modules/@babel/core/lib/config/full.js:198:10)
at /Users/billbell/v/cf-v2/next-frontend/node_modules/@babel/core/lib/config/full.js:54:16
at Array.map ()
at recurseDescriptors (/Users/billbell/v/cf-v2/next-frontend/node_modules/@babel/core/lib/config/full.js:53:36)
at loadFullConfig (/Users/billbell/v/cf-v2/next-frontend/node_modules/@babel/core/lib/config/full.js:103:6)
at /Users/billbell/v/cf-v2/next-frontend/node_modules/@babel/core/lib/transform.js:26:33
at process._tickCallback (internal/process/next_tick.js:150:11)
@ multi ./pages/_document.js
And my .babelrc
{
"presets": [
"next/babel"
],
"plugins": []
}

I could only fix it with: Commenting out if (validator)
function validatePluginObject(obj) {
  Object.keys(obj).forEach(function (key) {
    var validator = VALIDATORS[key];
    //if (validator) validator(key, obj[key]);else throw new Error("." + key + " is not a valid Plugin property");
  });
  return obj;
}

@billnbell please provide a full reproduction repository.

https://github.com/psycura/with-apollo-next
Here you can find the repository with same issue

Could you run npm ls @babel/core and let me know the result?

My guess is what is happening is that you have two copies of @babel/core, one of which is used by Next, and one of which is used by babel-loader, and right now the logic expects them to me the same instance because Next creates the config item, but then passes it off to babel-loader.

Hi @GabrielDuarteM I've just solved probably the same issue like yours, after changing the babel-core to the supported version which is 7.0.0-bridge.0, the next thing you need to do is to change the _modules_ value to anything you want except true, because it doesnt accept true value anymore. Since this error told me so Invariant Violation: [BABEL] /Users/mokapos/node/next-blog/jest.setup.js: Invalid Option: The 'modules' option m ust be either 'false' to indicate no modules, or a         module type which can be be one of: 'commonjs' (default), 'amd', 'umd', 'systemjs'. (While processing: "/Use rs/mokapos/node/next-blog/node_modules/next/babel.js$0")
Finally your .babelrc pretty much would be like "test": {             "presets": [["next/babel", {"preset-env": {"modules": true}}]]         }

@loganfsmyth this if the result of
npm ls @babel/core
$ npm ls @babel/core
<EMAIL_ADDRESS>D:\Sites\training\test\with-apollo-next
`--<EMAIL_ADDRESS>

My guess is what is happening is that you have two copies of @babel/core, one of which is used by Next, and one of which is used by babel-loader, and right now the logic expects them to me the same instance because Next creates the config item, but then passes it off to babel-loader.

Is this an api issue, or is @babel/core used as a singleton to store state?

Here is my own .babelrc
{
  "env": {
    "development": {
      "presets": ["next/babel"],
      "plugins": [
        "@babel/plugin-transform-flow-strip-types"
      ]
    },
    "production": {
      "presets": ["next/babel"],
      "plugins": [
        "@babel/plugin-transform-flow-strip-types"
      ]
    },
    "test": {
      "presets": [
        [
          "next/babel", {
            "preset-env": {
              "modules": "commonjs"
            }
          }
        ]
      ],
      "plugins": [
        "@babel/plugin-transform-flow-strip-types"
      ]
    }
  }
}

package.json (sample, with Next 6)
"devDependencies": {
        "@babel/core": "^7.0.0-beta.46",
        "@babel/plugin-transform-flow-strip-types": "^7.0.0-beta.46",
        "babel-core": "^7.0.0-bridge.0",
        "babel-eslint": "^8.2.2",
        "babel-jest": "^22.4.3"
}

Stack trace:
Error in ./pages/index.js

Module build failed: Error: [BABEL] /Users/pierre/dev/swica-chatbot/pages/index.js: .value is not a valid Plugin property
    at /Users/pierre/dev/swica-chatbot/node_modules/@babel/core/lib/config/validation/plugins.js:54:56
    at Array.forEach (<anonymous>)
    at validatePluginObject (/Users/pierre/dev/swica-chatbot/node_modules/@babel/core/lib/config/validation/plugins.js:52:20)
    at /Users/pierre/dev/swica-chatbot/node_modules/@babel/core/lib/config/full.js:215:53
    at cachedFunction (/Users/pierre/dev/swica-chatbot/node_modules/@babel/core/lib/config/caching.js:42:17)
    at loadPluginDescriptor (/Users/pierre/dev/swica-chatbot/node_modules/@babel/core/lib/config/full.js:207:10)
    at /Users/pierre/dev/swica-chatbot/node_modules/@babel/core/lib/config/full.js:64:16
    at Array.map (<anonymous>)
    at recurseDescriptors (/Users/pierre/dev/swica-chatbot/node_modules/@babel/core/lib/config/full.js:63:36)
    at loadFullConfig (/Users/pierre/dev/swica-chatbot/node_modules/@babel/core/lib/config/full.js:112:6)
    at /Users/pierre/dev/swica-chatbot/node_modules/@babel/core/lib/transform.js:28:33
    at _combinedTickCallback (internal/process/next_tick.js:131:7)
    at process._tickCallback (internal/process/next_tick.js:180:9)

it is somewhat frustrating to see this issue "closed" when a lot of people are being affected by this problem :(

@DevSpeak I'm using Hapi so I don't think the issue lies here.

@JasonJJFS @KeitIG Please check that you don't have multiple versions of @babel/core. Next uses<EMAIL_ADDRESS>and your deps need to as well.

@vjpr
I've brought those into line,
`
├──<EMAIL_ADDRESS>├─┬<EMAIL_ADDRESS><EMAIL_ADDRESS>│ └──<EMAIL_ADDRESS>extraneous
└─┬<EMAIL_ADDRESS>└──<EMAIL_ADDRESS>`
However unfortunately I still am seeing
Module build failed: Error: [BABEL] /Users/jason/WebstormProjects/route-tracker-site/pages/api/v1/track/index.js: .value is not a valid Plugin property

@vjpr even by forcing exact versions, I get the same error, but I am not sure if they are using the same package:
➜  chatbot git:(master) ✗ npm ls @babel/core
<EMAIL_ADDRESS>/Users/pierre/dev/swica-chatbot
├──<EMAIL_ADDRESS>└─┬<EMAIL_ADDRESS>  └──<EMAIL_ADDRESS>

@KeitIG
Same here.

@KeitIG
Try blowing your node_modules away and reinstalling. I now have another issue but the original issues seems to have gone .......

So I forced beta42 deps, nuked node_modules and used yarn instead of npm (v6), and it's working fine again. W-T-F.
There is sth wrong with npm deps resolution.

OK @vjpr Many thanks, that was the core issue.
@KeitIG
What I've discovered:

Don't use .babelrc use .babelrc.json instead
Make sure all @babel/* libs are in line, the same versions

FYI my .babelrc.js looks like this
`const env = {
VERSION: require('./package').version
}
module.exports = {
"presets": [["next/babel", {"preset-env": {"modules": "commonjs"}}]],
"plugins": [["transform-define", env]]
}`

@JasonJJFS Thx, Man! now build process is ok.
But stuck in another error:
Decorating class property failed. Please ensure that transform-class-properties is enabled.
Error: Decorating class property failed. Please ensure that transform-class-properties is enabled.
    at _initializerWarningHelper (D:\Sites\training\test\with-apollo-next\.next\dist\bundles\pages\signup.js:679:9)
    at new signup (D:\Sites\training\test\with-apollo-next\.next\dist\bundles\pages\signup.js:732:14)
    at processChild (D:\Sites\training\test\with-apollo-next\node_modules\react-dom\cjs\react-dom-server.node.development.js:2082:14)
    at resolve (D:\Sites\training\test\with-apollo-next\node_modules\react-dom\cjs\react-dom-server.node.development.js:2048:5)
    at ReactDOMServerRenderer.render (D:\Sites\training\test\with-apollo-next\node_modules\react-dom\cjs\react-dom-server.node.development.js:2333:22)
    at ReactDOMServerRenderer.read (D:\Sites\training\test\with-apollo-next\node_modules\react-dom\cjs\react-dom-server.node.development.js:2307:19)
    at renderToString (D:\Sites\training\test\with-apollo-next\node_modules\react-dom\cjs\react-dom-server.node.development.js:2679:25)
    at renderPage (D:\Sites\training\test\with-apollo-next\node_modules\next\dist\server\render.js:277:26)
    at Function.getInitialProps (pages/_document.js:7:0)
    at _callee$ (D:\Sites\training\test\with-apollo-next\node_modules\next\dist\lib\utils.js:111:30)
    at tryCatch (D:\Sites\training\test\with-apollo-next\node_modules\regenerator-runtime\runtime.js:62:40)
    at Generator.invoke [as _invoke] (D:\Sites\training\test\with-apollo-next\node_modules\regenerator-runtime\runtime.js:296:22)
    at Generator.prototype.(anonymous function) [as next] (D:\Sites\training\test\with-apollo-next\node_modules\regenerator-runtime\runtime.js:114:21)
    at step (D:\Sites\training\test\with-apollo-next\node_modules\next\node_modules\@babel\runtime\helpers\asyncToGenerator.js:12:30)
    at _next (D:\Sites\training\test\with-apollo-next\node_modules\next\node_modules\@babel\runtime\helpers\asyncToGenerator.js:27:9)
    at D:\Sites\training\test\with-apollo-next\node_modules\next\node_modules\@babel\runtime\helpers\asyncToGenerator.js:34:7

and my .bablrc.js:
module.exports= {
    "presets": [
        "next/babel",
        [
            "@babel/preset-stage-0",
            {
                "decoratorsLegacy": true
            }
        ]
    ],
    "plugins": [
        "transform-decorators-legacy",
        "inline-react-svg",
        [
            "transform-assets-import-to-string",
            {
                "baseDir": "static",
                "baseUri": "/"
            }
        ],
        [
            "emotion",
            {
                "inline": true
            }
        ]
    ]
};

Got past the .value error using the tips mentioned above by  @JasonJJFS and @vjpr:

Used yarn
Manually changed all babel dependencies to beta.42
Still using mentioned babelrc

But now running into: Error: The default export is not a React Component in page: "/"
😓At this rate, I'll probably will wait until actual babel RC release before trying to upgrade to next 6.

@jarib What is in your src/polyfills.js?

I have a fork that support beta.46 including external configs working. See<EMAIL_ADDRESS>

@jarib That sounds like a caching issue. Try delete node_modules/.cache after every change you make.

@psycura
Are you using yarn? Try it with yarn. I also had the same issue.

For me the solution was to install babel-loader@7. I inspected the @babel/core/lib/config/validation/plugins.js module and the value coming into L86 was very off.
ConfigItem {
  value: [Function: plugin],
  options: undefined,
  dirname: '/home/gnagatomo/workspace/frontend',
  name: undefined,
  file: undefined }
ConfigItem {
  value: [Function],
  options: undefined,
  dirname: '/home/gnagatomo/workspace/frontend',
  name: undefined,
  file: undefined }

That's when it hit me that maybe the loader was incompatible. Downgrading babel-loader to 7 was the only change needed to correct the issue for me.
I think a migration guide is strongly needed for a better user experience, because the release notes doesn't help at all when looking for breaking changes.

@guilhermehn what do you mean? can you show your package.json ?
Downgrading babel-loader to 7 ? Huh? babel 7 is the latest version. babel 6 would be a downgrade.

@joaovieira did you solved this issues with ts-jest?

@billnbell next@6 uses babel-loader@8 https://github.com/zeit/next.js/blob/canary/package.json#L68

@KillerCodeMonkey no, sorry. Didn't have much time, so I decided it was better to rollback to v5 for now. It just seems we need to force the other projects to update to a beta version of babel...? 😓 See https://github.com/kulshekhar/ts-jest/issues/495

@JasonJJFS Yes, i`m using Yarn.

@vjpr Right, my polyfill issue was simply a caching issue. The real culprit was my use of https://github.com/survivejs/webpack-merge in next.config.js. After removing it the error is gone.

@psycura  it sounds like a config issue with your transform-class-properties, check the babel docs

I was facing the same issue, i removed all the babel dependencies and .babelrc, nuked node_modules, a fresh install and everything works fine.

Next also uses babel internally so we don't need that.

@avaneeshtripathi you don't need to install babel by yourself, next already uses it's own next/babel preset. See https://github.com/zeit/next.js/#customizing-babel-config (next/babel preset source)

I got the same issue here, but interestingly enough, after I adjusted my custom webpack configuration, it went away.
The context is this. I fresh-started a new project using Next.js 6 few days ago, for which I could see what code change introduced the problem. It's kind of weird, but I never took care of Babel versions I depend on. The issue happened only after I customized webpack configuration using next.config.js. My suspect was webpack-merge, and after manually implementing the merge, build started to work again.
I didn't inspect further, but if someone uses a kind of the library, I think just not using it might help. (webpack-merge has no Babel dependency!)
Hope someone find the exact cause of this problem.

npm i babel-loader@7 --save-dev fixed it for me.

For me, this same error resulted from an issue with yarn.
The following steps resulted in the error below:

Deleting node_modules
Installing dependencies with yarn or yarn install
Starting my app using package.json script for node/server.js gave me the error:
`ERROR  Failed to compile with 1 errors

error  in ./pages/_document.js
Module build failed: Error: [BABEL] [...]/pages/_document.js: .value is not a valid Plugin property`
Replacing step 2 with npm install enabled me to start my app without any issues though.
To get yarn back in working order, I simply uninstalled and reinstalled yarn globally. Now, running yarn to install these dependencies works just fine and I don't get this error.
Hopefully that will help someone else here.

For the ones having issues with ts-jest, there's a PR open to fix it (https://github.com/kulshekhar/ts-jest/pull/512). Though, I've since moved to the next version of next-typescriptwhich just uses babel. This allows to switch to babel-jest instead of ts-jest which is compatible with Next 6. All happy now!

@joaovieira thanks for your response. i changed my project, but the tests are failing when i am using JavaScript variables in the styles.
like
background-color: ${gray};

my test-presets:
"presets": [["next/babel", { "preset-env": { "modules": "commonjs" } }], "@zeit/next-typescript/babel"]

@wilsonpage fixed it for me too, thanks.
also nuked and node_modules and reinstalled.

@KillerCodeMonkey Sorry, I'm using CSS modules.. but tried Styled JSX with interpolation quickly and it didn't cause any compilation error. Don't know if the output is correct though (I see a bunch of jsx-* class names in the snapshots, but don't know if the CSS value is correct). My babel test preset is like that too.

@joaovieira might it possible to show me your jest.config, please?

sure
const TEST_REGEX = '(/__tests__/.*|\\.test)\\.tsx?$';

module.exports = {
  setupFiles: ['<rootDir>/jest.setup.js'],
  moduleFileExtensions: ['ts', 'tsx', 'js', 'json'],
  snapshotSerializers: ['enzyme-to-json/serializer'],
  testPathIgnorePatterns: ['<rootDir>/app/.next/', '<rootDir>/node_modules/'],
  testRegex: TEST_REGEX,
  transform: {
    '^.+\\.tsx?$': 'babel-jest',
  },
  moduleNameMapper: {
    '\\.(jpg|jpeg|png|gif|webp|svg)$': 'identity-obj-proxy',
    '\\.(css|scss)$': '<rootDir>/app/.jest/cssMock.js',
  },
};

where cssMock is an updated version of identity-obj-proxy for es modules - but does not affect you.
I'm on Next 6.0.2.

Installing "babel-loader": "8.0.0-beta.3" fixed it for me.

None of these suggestions work for me. We need to use typescript.
package.json:
"dependencies": {
"@babel/cli": "^7.0.0-beta.42",
"@babel/preset-env": "^7.0.0-beta.42",
"@babel/preset-react": "^7.0.0-beta.42",
.babelrc.js
const env = {
  VERSION: require('./package').version
}

module.exports = {
  "presets": [["next/babel", {"preset-env": {"modules": "commonjs"}}]],
  "plugins": [["transform-define", env],
    "@babel/plugin-proposal-object-rest-spread",
      ["module-resolver", {
      "root": ["/Users/billbell/v/cf-v2/next-admin"],
      "alias": {
        "~": "././core/components",
        "^": "./core/styles",
        "@": "./core",
        "$": "./"
      }
    }]
  ]
}

And next.config.js
const glob = require('glob')
const withTypeScript = require('next-awesome-typescript')

const tsOptions = {}

module.exports = withTypeScript(tsOptions, {
  webpack (cfg) {
    cfg.plugins = cfg.plugins.filter(plugin => {
      if (plugin.constructor.name === 'UglifyJsPlugin') {
        return false
      } else {
        return true
      }
    })
    cfg.module.rules.push({
      test: /pages.*\.test\.+(js|jsx|ts|tsx)$/,
      loader: 'ignore-loader'
    })
    return cfg
  },
  exportPathMap () {
    const pathMap = {}
    glob.sync('pages/**/*.js', {ignore: 'pages/_document.js'}).forEach(s => {
      const path = s.split(/(pages|\.)/)[2].replace(/^\/index$/, '/')
      pathMap[path] = {page: path}
    })
    return pathMap
  }
})

Getting
/Users/billbell/v/cf-v2/next-admin/core/components/Editor/TextEditor.tsx: .value is not a valid Plugin property

I got the same error after upgrade existing project.
The error can be reproduced with very simple custom server setup
Still can not find the solution
package.json
{   "name": "next2",   "version": "1.0.0",   "description": "",   "main": "index.js",   "scripts": {   	"dev": "babel-node index.js",     "test": "echo \"Error: no test specified\" && exit 1"   },   "author": "",   "license": "MIT",   "dependencies": {     "express": "^4.16.3",     "next": "^6.0.3",     "react": "^16.4.0",     "react-dom": "^16.4.0"   },   "devDependencies": {     "@babel/cli": "^7.0.0-beta.49",     "@babel/core": "^7.0.0-beta.49",     "@babel/node": "^7.0.0-beta.49",     "@babel/preset-es2015": "^7.0.0-beta.49"   } }
.babelrc
{ 	"presets": ["@babel/es2015", "next/babel"] }
index.js
`import express from 'express'
import next from 'next'
const dev = process.env.NODE_ENV !== 'production'
const app = next({ dev })
const handle = app.getRequestHandler()
app.prepare()
.then(() => {
const server = express()
server.get('*', (req, res) => {
	return handle(req, res)
})

server.listen(3333, err => {
	if(err) throw err
	console.log('> Ready on http://localhost:3333')
})

})
.catch(err => {
console.error(err.stack)
process.exit(1)
})`
pages/index.js
export default () => ( 	<div>This is Index</div> )
And the result after npm run dev
` ERROR  Failed to compile with 1 errors                                                                                10:48:19
error  in ./pages/index.js
Module build failed: Error: [BABEL] /Users/art/app_react/next2/pages/index.js: .value is not a valid Plugin property
at Object.keys.forEach.key (/Users/art/app_react/next2/node_modules/@babel/core/lib/config/validation/plugins.js:52:56)
at Array.forEach ()
at validatePluginObject (/Users/art/app_react/next2/node_modules/@babel/core/lib/config/validation/plugins.js:50:20)
at instantiatePlugin (/Users/art/app_react/next2/node_modules/@babel/core/lib/config/full.js:201:55)
at cachedFunction (/Users/art/app_react/next2/node_modules/@babel/core/lib/config/caching.js:32:19)
at loadPluginDescriptor (/Users/art/app_react/next2/node_modules/@babel/core/lib/config/full.js:192:10)
at config.plugins.map.descriptor (/Users/art/app_react/next2/node_modules/@babel/core/lib/config/full.js:68:16)
at Array.map ()
at recurseDescriptors (/Users/art/app_react/next2/node_modules/@babel/core/lib/config/full.js:67:38)
at loadFullConfig (/Users/art/app_react/next2/node_modules/@babel/core/lib/config/full.js:100:6)
at process.nextTick (/Users/art/app_react/next2/node_modules/@babel/core/lib/transform.js:28:33)
at _combinedTickCallback (internal/process/next_tick.js:131:7)
at process._tickCallback (internal/process/next_tick.js:180:9)
@ multi ./pages/index.js
ModuleBuildError: Module build failed: Error: [BABEL] /Users/art/app_react/next2/pages/index.js: .value is not a valid Plugin property
at Object.keys.forEach.key (/Users/art/app_react/next2/node_modules/@babel/core/lib/config/validation/plugins.js:52:56)
at Array.forEach ()
at validatePluginObject (/Users/art/app_react/next2/node_modules/@babel/core/lib/config/validation/plugins.js:50:20)
at instantiatePlugin (/Users/art/app_react/next2/node_modules/@babel/core/lib/config/full.js:201:55)
at cachedFunction (/Users/art/app_react/next2/node_modules/@babel/core/lib/config/caching.js:32:19)
at loadPluginDescriptor (/Users/art/app_react/next2/node_modules/@babel/core/lib/config/full.js:192:10)
at config.plugins.map.descriptor (/Users/art/app_react/next2/node_modules/@babel/core/lib/config/full.js:68:16)
at Array.map ()
at recurseDescriptors (/Users/art/app_react/next2/node_modules/@babel/core/lib/config/full.js:67:38)
at loadFullConfig (/Users/art/app_react/next2/node_modules/@babel/core/lib/config/full.js:100:6)
at process.nextTick (/Users/art/app_react/next2/node_modules/@babel/core/lib/transform.js:28:33)
at _combinedTickCallback (internal/process/next_tick.js:131:7)
at process._tickCallback (internal/process/next_tick.js:180:9)
at runLoaders (/Users/art/app_react/next2/node_modules/webpack/lib/NormalModule.js:195:19)
at /Users/art/app_react/next2/node_modules/loader-runner/lib/LoaderRunner.js:364:11
at /Users/art/app_react/next2/node_modules/loader-runner/lib/LoaderRunner.js:230:18
at context.callback (/Users/art/app_react/next2/node_modules/loader-runner/lib/LoaderRunner.js:111:13)
at /Users/art/app_react/next2/node_modules/babel-loader/lib/index.js:98:23
at /Users/art/app_react/next2/node_modules/babel-loader/lib/cache.js:120:25
at /Users/art/app_react/next2/node_modules/babel-loader/lib/transform.js:8:72
at process.nextTick (/Users/art/app_react/next2/node_modules/@babel/core/lib/transform.js:31:14)
at _combinedTickCallback (internal/process/next_tick.js:131:7)
at process._tickCallback (internal/process/next_tick.js:180:9)

Disposing inactive page(s): /`

@supadits Remove all these dev dependencies and run npm install again, It should work.
"@babel/cli": "^7.0.0-beta.49",
    "@babel/core": "^7.0.0-beta.49",
    "@babel/node": "^7.0.0-beta.49",
    "@babel/preset-es2015": "^7.0.0-beta.49"

@paschaldev But then the server code can not have import statement which is used everywhere in current project (and planning to upgrade to 6.0). In addition to that is also async/await.

@supadits Next.JS has all these already setup / figured out. You don't need them explicitly. I don't have any in my package.json and I use next 6.
I used to have the same errors like you until I removed the babel dependencies. It will work fine

I still also have the same Issue
Error: Plugin 0 specified in "/usr/src/app/node_modules/next/babel.js" provided an invalid property of "default" (While processing preset: "/usr/src/app/node_modules/next/babel.js")

Repo: https://github.com/schoenwaldnils/blog/tree/greenkeeper/next-6.0.3
.babelrc
{
  "presets": [
    "next/babel"
  ],
  "plugins": [
    "inline-react-svg",
    [ "styled-components", {
      "ssr": true,
      "displayName": true,
      "preprocess": false
    }],
    [ "transform-define", "./env-config.js" ]
  ]
}

Sadly I'm stuck there :/

I got this to work finally! next - v6.0.3.
Basically:

rm -rf node_modules
rm -rf .next
rm package-lock.json
npm i
rm .babelrc

We are switching to .babelrc.js - it is easier to manage and works.
Every change you make do those 5 steps.  Do not use ^ or ~ for the babel stuff, since it will upgrade you to .49 and that will not work. Also some modules 42, 44 etc will not work. Make sure all are 42.
I noticed that you need to delete package-lock.json and then run npm i to fix it.
To run my tests:

To test prod mode:
NODE_ENV=production npx next build, then NODE_ENV=production npx node index OR NODE_ENV=production npx next if you are not using the index.js way. We use Node to set routes, etc.

To test running in browser with webpack:
NODE_ENV=development npx node index or NODE_ENV=development npx next

NODE_ENV=production BABEL_ENV=test npx jest  -- that is to test using jest

package.json parts:
  "dependencies": {
    "@babel/cli": "7.0.0-beta.42",
    "@babel/core": "7.0.0-beta.42",
    "@babel/plugin-proposal-object-rest-spread": "7.0.0-beta.42",
    "@babel/preset-env": "7.0.0-beta.42",
    "@babel/preset-react": "7.0.0-beta.42",
    "@zeit/next-typescript": "^1.0.1",
     "next": "~6.0.3",
      "jest": "^22.4.3",
      "ts-jest": "^22.4.5",
       "ts-loader": "^3.5.0",
 "devDependencies": {
    "@babel/core": "7.0.0-beta.42",
    "@babel/plugin-proposal-class-properties": "7.0.0-beta.42",
    "apollo-link-schema": "^1.1.0",
    "babel-core": "^7.0.0-bridge.0",
    "babel-eslint": "^7.2.3",
    "babel-jest": "^22.4.4",
    "babel-plugin-add-module-exports": "^0.2.1",
    "babel-preset-es2015": "^6.24.1"
}

Later in package.json setup jest:
    "transform": {
      "^.+\\.tsx?$": "babel-jest",
      "^.+\\.jsx?$": "babel-jest"
    },
    "testRegex": "(/__tests__/.*(\\.|/)(test|spec))\\.(jsx?|tsx?)$",
    "testPathIgnorePatterns": [
      "/.next/",
      "/node_modules/"
    ],
    "moduleFileExtensions": [
      "ts",
      "tsx",
      "js",
      "jsx",
      "json",
      "node"
    ],
    "moduleNameMapper": {
      "\\~(.*)$": "<rootDir>/core/components/$1",
      "\\^(.*)$": "<rootDir>/core/styles/$1",
      "@(?!babel|rules)(.*)$": "<rootDir>/core/$1",
      "\\$(.*)$": "<rootDir>/$1"
    },
    "setupTestFrameworkScriptFile": "<rootDir>/tests/setupTestFrameworkScript.js",
    "coverageDirectory": "<rootDir>/coverage/",
    "coveragePathIgnorePatterns": [
      "/node_modules/",
      "/.next/",
      "/coverage/"
    ],
    "setupFiles": [
      "<rootDir>/tests/setupTests.js"
    ],
    "globals": {
      "ts-jest": {
        "useBabelrc": true
      }
    }

next.config.js
const glob = require('glob')
const withTypeScript = require('@zeit/next-typescript')
const webpack = require('webpack')

module.exports = withTypeScript({
  webpack (config, options) {
    console.log(options)
    const { isServer } = options

    config.plugins = config.plugins.filter(plugin => {
      if (plugin.constructor.name === 'UglifyJsPlugin') {
        return false
      } else {
        return true
      }
    })
    if (isServer === false) {
      config.plugins.push(
        new webpack.IgnorePlugin(/(worker-farm|fsevents|readline|express)/)
      )
      config.plugins.push(
        new webpack.IgnorePlugin(/node_modules\/worker-farm\/lib\/fork\.js/)
      )
      config.node = {fs: 'empty', 'express': 'empty', 'module': 'empty'}
    }
    config.module.rules.push({
      test: /\.+(js|jsx|ts|tsx)$/,
      exclude: /node_modules/,
      use: {loader: 'babel-loader'}
    })
    config.module.rules.push({
      test: /pages.*\.test\.+(js|jsx|ts|tsx)$/,
      loader: 'ignore-loader'
    })
    console.log(config)
    return config
  },
  exportPathMap () {
    const pathMap = {}
    glob.sync('pages/**/*.js', {ignore: 'pages/_document.js'}).forEach(s => {
      const path = s.split(/(pages|\.)/)[2].replace(/^\/index$/, '/')
      pathMap[path] = {page: path}
    })
    return pathMap
  }

})```

And .babelrc.js

```const path = require('path');

console.log('next.config.js --->', path.resolve('./'))

module.exports = {
  "env": {
    "test": {
      "presets": ["@babel/preset-env", "next/babel", "@zeit/next-typescript/babel"],
      "plugins": [
        "@babel/plugin-proposal-object-rest-spread",
        ["module-resolver", {
          "root": [path.resolve('./')],
          "alias": {
            "\\~": "./core/components",
            "\\^": "./core/styles",
            "\\@": "./core",
            "\\$": "./"
          }
        }]
      ]
    },
    "production": {
      "presets": ["next/babel", "@zeit/next-typescript/babel"],
      "plugins": [
        ["module-resolver", {
          "root": [path.resolve('./')],
          "alias": {
            "\\~": "./core/components",
            "\\^": "./core/styles",
            "\\@": "./core",
            "\\$": "./"
          }
        }]
      ]
    },
    "development": {
      "presets": ["next/babel", "@zeit/next-typescript/babel"],
      "plugins": [
        ["module-resolver", {
          "root": [path.resolve('./')],
          "alias": {
            "\\~": "./core/components",
            "\\^": "./core/styles",
            "\\@": "./core",
            "\\$": "./"
          }
        }]
      ]
    }
  }
}```

@banyawat Doesn't next build use webpack too?

i same  issue
`
{
"presets": [
"next/babel"
],
"plugins": [
["transform-define", "./env-config.js"],
]
}
`

@khacthanh244
You should use commonjs modules in .babelrc.js. Don't forget to update babel-plugin-transform-define to 1.3.0
// .babelrc.js
const env = require("./env-config.js");

module.exports = {
  presets: ["next/babel"],
  plugins: [["transform-define", env]]
};

We were suffering "works on my machine" syndrome and for us it was as simple as deleting node_modules and reinstalling dependencies with a newer version of yarn.

@timneutkens There is a lot of duplicated effort as people individually discover forcing resolutions in yarn (and even having to switch to yarn), and unfortunately most of this knowledge is held in this closed thread. Are there plans to update next6 to a later babel beta version in order to fix this problem (outside of the forks like https://github.com/zeit/next.js/issues/4227#issuecomment-387446918, which I suppose could've been a PR)? Or is the official plan to wait until babel 7 full release unless a good PR comes in?

Hey @billnbell is your working next6/typescript monorepo available to see anywhere? I have a next5/typescript monorepo but trying to migrate to next6 and not having much luck.

I'm running a custom Express server too, and I placed all the server code under ./server, and like @banyawat, I added a .babelrc file directly under the ./server folder, and I was able to run babel-node server/index.js. The .babelrc file just contains the env preset.
// ./server/.babelrc

{
  "presets": ["env"]
}

In my case, the problem is:

If you use babel-node command, you need to install @babel/node, previously we don't have this because it is inside babel-cli
All babel related packages, change to become<EMAIL_ADDRESS>(except for plugins in my case)
Preset in .babelrc update from "[preset-name]" to become "@babel/[preset-name]"

This is how my preset looks like now:
"presets": [
    "next/babel",
    "@babel/preset-react",
    ["@babel/preset-env", {
      "targets": {
        "browsers": ["last 2 versions"]
      }
    }],
    ["@babel/preset-stage-1", {
      "decoratorsLegacy": true
    }]
  ],

Now everything works fine in Next 6.1.1 🎉

I have simply this:
{
  "presets": ["next/babel"]
}

...and even that fails. If I have no .babelrc then things are great, but I need to get my unit tests transpiling.

facing same issue,
babelrc
{   "presets": [     "env",     "next/babel",     "stage-2",     "es2015"],   "plugins": [     [       "module-resolver",       {         "root": ["./"]       }     ]   ],   "env": {     "development": {       "presets": ["next/babel"]     },     "production": {       "presets": ["next/babel"]     },     "test": {       "presets": [["next/babel", { "preset-env": { "modules": "commonjs" } }]]     }   } }
dependencies (from package.json)
 "@material-ui/core": "^1.5.1",     "@zeit/next-css": "^0.2.0",     "@zeit/next-sass": "^0.2.0",     "babel-loader": "^7.1.5",     "babel-preset-env": "^1.7.0",     "enzyme": "^3.4.4",     "enzyme-adapter-react-16": "^1.2.0",     "babel-core": "7.0.0-bridge.0",     "babel-jest": "22.4.3",     "babel-plugin-module-resolver": "^3.1.1",     "jest": "^23.5.0",     "react-test-renderer": "^16.4.2",     "react-addons-test-utils": "^15.6.2",     "file-loader": "^2.0.0",     "isomorphic-unfetch": "^2.1.1",     "next": "^6.1.1",     "node-sass": "^4.9.3",     "postcss-css-variables": "^0.9.0",     "postcss-loader": "^3.0.0",     "raw-loader": "^0.5.1",     "react": "^16.4.2",     "react-dom": "^16.4.2",     "react-redux": "^5.0.7",     "redux": "^4.0.0",     "redux-devtools-extension": "^2.13.5",     "redux-logger": "^3.0.6",     "redux-thunk": "^2.3.0",     "semantic-ui-css": "^2.3.3",     "semantic-ui-react": "^0.82.3",     "url-loader": "^1.1.1"
error

FAIL  components/GraphComponent/GraphComponent.spec.js
● Test suite failed to run

Plugin 0 specified in "/Users/prashanthnaika/Documents/Projects/tweettraders-ui/node_modules/next/babel.js" provided an invalid property of "default" (While processing preset: "/Users/prashanthnaika/Documents/Projects/tweettraders-ui/node_modules/next/babel.js")

  at Plugin.init (node_modules/jest-config/node_modules/babel-core/lib/transformation/plugin.js:131:13)
      at Array.map (<anonymous>)
      at Array.map (<anonymous>)

The only way I could make it work was by running https://github.com/babel/babel-upgrade which upgrades any babel transformations you're using.
And I changed my .babelrc file:
{
  "presets": ["@babel/env", "next/babel"]
}

Please read my earlier comment: https://github.com/zeit/next.js/issues/4227#issuecomment-385688144

@timneutkens I have a question. then how can I use es6 in my custom server?

There's 2 options:

you don't, there's really no need to transpile it if you're using the custom server correctly (just implementing routing / caching)

you put the server into a separate directory server add a server/.babelrc and let babel compile using that.

@timneutkens How can I verify if code splitting with Webpack is broken in my project?

I think it's getting a bit far from the original issue report. A lot of persons have subscribed to this issue, so if you could open specific issues for specific problems... 🙌 and keep this thread for the problem described in message #1 :)

Moved my questions to https://spectrum.chat/next-js


kata-containers should be at the same level

We don't mention this that kata-containers repository should be at the same level as CAA repository in the Azure documentation. We should do that.
Or we completely switch to building from a docker image. But I wonder how the az login will work from the CI 🤔.

Or we completely switch to building from a docker image.

I'd say this is a good idea. Having two ways to do something often leads to situations where things only work/are tested on one way.

Or we completely switch to building from a docker image.

I'd say this is a good idea. Having two ways to do something often leads to situations where things only work/are tested on one way.

I agree. Just that when we use the local credentials of the az cli we may have to mount ~/.azure directory so that packer can use that.

Why can't we mount the env variables into the container instead, as we already do in the current container building workflow?

Why can't we mount the env variables into the container instead, as we already do in the current container building workflow?

We can expose it like that. What about the way in which local credential support is needed? When we don't create a service principal but use the local credentials that user already has, fetched via az login, packer can use them to do the build. We are adding support for that feature here: https://github.com/confidential-containers/cloud-api-adaptor/pull/973.
This is also a desirable feature for the Azure provider CI for CAA. There we are not creating any service principal we are using managed identity. So we don't have any "secrets". But the gh action for azure login does some magic and fetches the credentials and saves it locally in the ~/.azure directory. Now the packer running inside the container may not have access to this folder, so we should make this accessible to the container.


Participating to a benchmark

Hi @Ethosa,
Would you like to participate to https://github.com/the-benchmarker/web-frameworks ?
Regards,

Yeap


feat: [v0.8-develop, experimental] multi-validation in calldata

Motivation
As described in https://github.com/erc6900/resources/issues/4, supporting multiple validation functions at once has been a long-standing goal of ERC-6900.
Proposed Solution
This PR implements the first suggestion described in the issue above, implementing a new native function called executeWithValidation(FunctionReference validation, bytes calldata data).
Note that this does not implement the function executeWithContext, where additional data can be made available to validation plugins, because the current validation interface does not support out-of-band extra data, beyond what's in the user operation for UO validation and calldata for RT validation.
Account behavior changes:

Validation is now an enumerable set, rather than a single field.

Internal installation functions are updated to add and remove from the set.
The manifest format stays the same in this PR.

When the function executeWithValidation is put into userOp.callData, user op validation will rely on the provided validation function, if it is installed and made available to the actual execution function selector being called within the data parameter.
When the function executeWithValidation is called directly, runtime validation will rely on the provided validation function, if it is installed and made available to the actual execution function selector being called within the data parameter.
Then, executeWithvalidation forwards the call in data to itself with a self-call (not self-delegatecall).
To correctly implement this functionality, this PR also changes account behavior with self-calls: now, if the call is from self, runtime validation will be bypassed (validation is assumed to have passed in a different context).

This is necessary to support multi-validation for native functions if we don't implement an internal switching function and make all functions public. Doing this would involve a large account code change and overhead to implementers, particularly for semi-modular accounts, so I don't prefer it as a solution.
Note that this changes the security properties of validation over execute and executeBatch - no change is made to those functions here, if we wish to pursue this form of multi-validation, we will have to address that eventually.

The account loupe is updated to add a function that supports retrieving all possible applicable validation functions for a selector.
This PR does not change how pre-validation hooks are assigned, they remain associated with the execution selector. For reasons outlined below, I believe this needs to change, but this PR does not do that yet.
Add a test to show switching between multiple installed validation functions: MultiValidation.t.sol.

Additional discussion
Reasons for choosing a calldata-based encoding of validation selection

If we wish to support switching validation methods with a user-specified field for runtime validation, the switching logic must exist in calldata, because other user operation fields are not present when directly calling the account.

Ramifications of choosing calldata to specify validation switching

While we can support switching validation methods for runtime validation, we likely also want to support calling functions via runtime validation without wrapping the call in the executeWithValidation function format.
The reason calling functions without nesting them into the data field of executeWithValidation is useful, is that this is how we make use of contract interfaces that the account supports through execution function. I.e. in tests, we may wrap the account with a different interface like SingleOwnerPlugin(account1).transferOwnership(...), or frontends may use the plugin abi to generate function calls on the account.
To support those "direct call" flows, we must have a "default validator" to use for validation when the validation-switching function is not used.

In other words, runtime validation + execution functions implementing interaces necesitate a "default validation" to exist.

Note that this is a "default validation" in a different sense than https://github.com/erc6900/resources/issues/37 describes: the issue describes the ability for validation to apply over some number of execution functions, despite not manually being added to each. In this PR, I used "default validation" to refer to which validation to run when one isn't manually specified via executeWithValidation.
In the implementation of this PR, the first validation added for an execution function becomes the default. The behavior gets weird with the OZ enumerbleset if the first added one is removed and others exist. If we wish to pursue this mechanism for validation switching, we will need to expose setting this field to the end user somehow.

Ramifications of multi-validation in general

You can't install two instances of the same plugin twice, if they define any execution functions. This happens because, upon trying to install the second instance, they will have two definitions for execution functions, and collisions are not permitted for execution functions.

See the test cases in MultiValidation.t.sol: we have to define a new version of SingleOwnerPlugin with the execution function names changed: transferOwnership -> transferOwnership2, owner -> owner2.
Does this warrant breaking the invariant previously established where we assert "target of execute/executeBatch is not a plugin?
Should the decision to install execution function handlers be user-controlled, as part of https://github.com/erc6900/resources/issues/9?

Pre-validation hooks are currently associated to selectors. Question: should they be associated with selectors, validation functions, or validation functions + selectors?

If we continue associating them only with a selector, then a single pre-validation hook would apply over multiple validation types. If the pre-validation hook reads from something like userOp.signature, then it could break composability.
If we attach it to both selector + validation functions, and the intent of the pre-validation hook is to limit the capabilities of a given validation function, then the pre-validation hook can be bypassed whenever the validation function is added to a new function via a dependency.

(this is also the most gas-expensive option)

This leaves associating pre-validation hooks with validation functions directly as the last remaining option. Generally, I think this makes the most sense - the combination of N pre-validation hooks plus 1 validation function logically makes up 1 "unit", regardless of the action being validated.

This does still have some degree of composability risk: if the pre-validation hook is inspecting the contents of calldata, and the validation function it is attached to gets added to an execution function that it is unaware of the calldata encoding for, then it must deny execution, otherwise risk a breach of access control.

If we support installing the same validation function multiple times, with different pre-validation hooks and domain of access, this problem can be avoided.

This pattern is also difficult to use with the current install flow, if the pre-validation hook defining plugin is intended to be composable. The mechanism used for composability right now is dependencies, but only of a fixed number. To allow associating pre-validation hooks with an arbitrary number of validation functions, possibly including validation functions defined later, would require a different model of install state than what we currently have.

Does multi-validation necessitate creating specializations of hooks that only apply to specific validation functions? Previously, there was an invariant held that 1 exec selector had 1 validation function, which influenced stateful hook design.

Conclusion
Doing multi-validation while supporting runtime validation in its current form introduces some added complexities that we had previously not discovered: the requirement to put validation selection into calldata, which itself leads to an additional requirement of having a default validation per selector. We may want to consider changing how we handle runtime validation to make multi-validation support easier.
Additionally, multi-validation introduces association complexities to pre-validation hooks, regardless of the switching mechanism chosen. Pre-validation hooks make the most sense to be associated with validation functions, rather than execution selectors; however, doing so is difficult with the current parameter format for installPlugin dependencies, and requires changes there as well.
And finally, the use of execution functions as the exclusive way to do for plugin state management makes it impossible to install two instances of the same validation plugin at the same time. This is a big composability break, and we should consider removing the check in standard execute functions to be non-plugin contracts.

Awesome I like it!! I wonder if we should perhaps embed the concept of the default validation function a bit deeper into the standard, i.e. it is not implicitly specified by being the first entry in the list, but explicitly through a new storage field in the SelectorData struct for each selector. This way we would avoid weirdnesses with the EnumerableSet` for the validation functions (e.g. in case we are uninstalling the current default validation function, the lastly added validation function would automatically become the new default validation function).
If we would also add a new native function updateDefaultValidationFunction(bytes4 selector, FunctionReference validationFunction)to set the default validation function for a selector, we could also explicitly handle some edge cases. E.g. users could be required to replace the current default validation function before the plugin providing the current default validation function can be uninstalled. This could be achieved by having some counter for each plugin to track for how many instances default validation function it provides, similarly to the PluginData.dependentCount.
Perhaps the standard default validation function for function selectors a plugin introduces can be specified by the plugin manifest. Also, in case a plugin installs the first validation function, e.g. for a native selector on initial configuration, it could be automatically promoted to the default validation function.
The EnumerableSet validations could then also only contain non-default validation functions, while the default one is stored in the SelectorData.defaultValidationFunction.
Could flesh this out more, but for now wondering if I’m heading towards over-engineering it or if I’m being reasonable here.

Also, as far as I'm seeing it, the security implications do not just affect execute() and executeBatch(), but also executeFromPluginExternal() and all plugins that can theoretically call the account itself. A check for  (target == address(this)) is missing in the reference implementation's version of executeFromPluginExternal() 👀

Closing, superseded by #62.


Don't infer 'dynamic' on accessors in extensions of ObjC classes.

Instead, propagate the decision from the associated storage decl (var or subscript), using the mechanisms that are already in place.
rdar://problem/29741743

@swift-ci Please test