Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

webpack 5.0.0-beta.30 Module not found: Error: Can't resolve '../../core-js/object/define-property' #11467

Closed
noe132 opened this issue Sep 12, 2020 · 73 comments

Comments

@noe132
Copy link

noe132 commented Sep 12, 2020

Bug report

What is the current behavior?

install @babel/runtime-corejs3
for file index.js

import '@babel/runtime-corejs3/helpers/esm/defineProperty'

and run webpack ./index.js

ERROR in ./node_modules/@babel/runtime-corejs3/helpers/esm/defineProperty.js 1:0-74
Module not found: Error: Can't resolve '../../core-js/object/define-property' in 'xxx\node_modules\@babel\runtime-corejs3\helpers\esm'
 @ ./index.js 1:0-58

beta.29 is working properly on this.

but if we manually edit line 1 in file ./node_modules/@babel/runtime-corejs3/helpers/esm/defineProperty.js
from

import _Object$defineProperty from "../../core-js/object/define-property";

to

import _Object$defineProperty from "../../core-js/object/define-property.js";

and this issue goes away.

If the current behavior is a bug, please provide the steps to reproduce.

What is the expected behavior?

Other relevant information:
webpack version: 5.0.0-beta.30
Node.js version: 12.16.1
Operating System: win10 2004
Additional tools:
at the time I'm using @babel/runtime-corejs3@^7.11.2

@EvHaus
Copy link

EvHaus commented Sep 13, 2020

I'm having a very similar problem after upgrading from beta.29 to beta.30 but with this different import:

ERROR in ./node_modules/graphql/language/parser.mjs 1:0-41
Module not found: Error: Can't resolve '../jsutils/inspect' in '/Users/my_project/node_modules/graphql/language'
 @ ./node_modules/graphql-tag/src/index.js 1:13-47
 @ ./webapp/src/index.jsx 23:0-26 68:7-11

Clearing the local filesystem cache (rm -rf node_modules/.cache) didn't help. But rolling back to beta.29 worked for me as well.

@duan602728596
Copy link

I also encountered the same problem, which seems to be caused by enabling mjs experiments, and I did not find a way to close mjs experiments.

@sokra
Copy link
Member

sokra commented Sep 13, 2020

These are all the same issues. In .mjs files or .js files with a package.json with "type": "module" imports need to be fully specified. This means you need to have an extension.

That how ESM in node.js is defined, and you are opting in into this behavior by using the .mjs extension resp the field in the package.json.

We didn't enforce this behavior in previous versions while this was still experimental in node.js, but it left this status, so I feel ok with enforcing this and pointing out these incorrect packages.

You could disable that with { test: /\.m?js/, type: "javascript/auto" } in module.rules.

@ocdi
Copy link

ocdi commented Sep 14, 2020

@sokra I have extremely similar symptoms, even with the above module.rules suggestion. Rolling back to beta.29 compiles successfully

ERROR in ./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js 3:0-70
Module not found: Error: Can't resolve './unsupportedIterableToArray' in 'C:\s\node_modules\@babel\runtime\helpers\esm'

I tried various positions of adding the rule, setting type in other potential rules involving .js/typescript that might affect it, but none solved this module not found issue.

I suspect babel need to fix their code to support this correctly, otherwise there will be many people having issues with this on webpack5.

For now I am sticking to beta.29.

@duan602728596
Copy link

duan602728596 commented Sep 14, 2020

After configuring like this, there will still be some modules can't resolve.

const path = require('path');

module.exports = {
  mode: 'development',
  entry: { index: path.join(__dirname, 'src/index.js') },
  devtool: 'source-map',
  module: {
    rules: [
      { test: /\.m?js/, type: "javascript/auto" },
      {
        test: /.*\.js$/,
        type: 'javascript/auto',
        exclude: /node_modules/,
        use: [
          {
            loader: 'babel-loader',
            options: {
              presets: [
                [
                  '@babel/preset-env',
                  {
                    targets: {
                      browsers: ['IE 11']
                    },
                    debug: false,
                    modules: false,
                    useBuiltIns: 'usage',
                    bugfixes: true,
                    corejs: 3
                  }
                ]
              ],
              plugins: [
                [
                  '@babel/plugin-transform-runtime',
                  {
                    corejs: { version: 3, proposals: true },
                    helpers: true,
                    regenerator: true,
                    useESModules: true
                  }
                ]
              ]
            }
          }
        ]
      }
    ]
  }
};
import _asyncToGenerator from '@babel/runtime-corejs3/helpers/esm/asyncToGenerator.js';

function main() {
  console.log(_asyncToGenerator);
}

main();

@sokra
Copy link
Member

sokra commented Sep 14, 2020

btw this is not an webpack-only error. If you run import("@babel/runtime-corejs3/helpers/esm/defineProperty.js") in node.js you get an error too:

Error [ERR_MODULE_NOT_FOUND]: Cannot find module '...\node_modules\@babel\runtime-corejs3\core-js\object\define-property' imported from ...\node_modules\@babel\runtime-corejs3\helpers\esm\defineProperty.js

You could disable that with { test: /\.m?js/, type: "javascript/auto" } in module.rules.

Ok I tried that by myself and it doesn't work correctly. Instead you have to do that to change the resolving for these modules:

{
  test: /\.m?js/,
  resolve: {
    fullySpecified: false
  }
}

type: "javascript/auto" might be added to fully disable the different behavior for .mjs files, but that doesn't affect the resolving. It only affects e. g. how interop with non-ESM modules is handled.

@alexander-akait
Copy link
Member

@sokra maybe we can put this option to https://webpack.js.org/configuration/resolve/ (by default true), I'm afraid of too many projects use wrong paths in import, using:

{
  test: /\.m?js/,
  resolve: {
    fullySpecified: false
  }
}

with babel/ts/other loaders will increase the size an complex of configurations

@alexander-akait
Copy link
Member

alexander-akait commented Sep 14, 2020

Also I think we need docs this

/cc @chenxsan , can you open an issue? Maybe we should rewrite all import in docs on using extensions

@vankop
Copy link
Member

vankop commented Sep 14, 2020

@evilebottnawi

@sokra maybe we can put this option to https://webpack.js.org/configuration/resolve/ (by default true), I'm afraid of too many projects use wrong paths in import, using:

thats how Node.js resolves.. Maybe we need to point in docs workaround..

@alexander-akait
Copy link
Member

alexander-akait commented Sep 14, 2020

@vankop yes, I known, in theory we can improve error messages out of box, like:

ERROR in ./node_modules/@babel/runtime-corejs3/helpers/esm/defineProperty.js 1:0-74
Module not found: Error: Can't resolve '../../core-js/object/define-property' in 'xxx\node_modules\@babel\runtime-corejs3\helpers\esm'
 @ ./index.js 1:0-58

You're using ES module syntax, maybe you meant:
import '@babel/runtime-corejs3/helpers/esm/defineProperty.js'
or
import '@babel/runtime-corejs3/helpers/esm/defineProperty.mjs'

Because now you might think something wrong with resolving (not found, etc)

@JamesAlen9352
Copy link

@otakustay
Copy link

I also encounter similar issue but the message is like:

error  in ./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js

Module not found: Error: Can't resolve './iterableToArray' in '/xxx/node_modules/@babel/runtime/helpers/esm'

To what I know this is an error when @babel/runtime is importing its internal module (both inside helpers/esm folder), es module resolution of node should not forbid internal imports, it only affects how other modules import it from external.

@sokra
Copy link
Member

sokra commented Sep 14, 2020

It's not forbidden. The import request need to be fully specified as './iterableToArray.js'.

kodiakhq bot pushed a commit to vercel/next.js that referenced this issue Sep 15, 2020
On the latest beta of webpack 5 resolving fails with the below error and according to webpack/webpack#11467 is due to the imports in this module not being fully specified. This adds the config mentioned in the thread to correct the resolving for this module. 

```sh
Failed to compile.
--
16:33:50.046 | ModuleNotFoundError: Module not found: Error: Can't resolve './assertThisInitialized' in '/vercel/f03cc85/node_modules/@babel/runtime/helpers/esm'
16:33:50.046 | > Build error occurred
16:33:50.047 | Error: > Build failed because of webpack errors
16:33:50.047 | at build (/vercel/f03cc85/node_modules/next/dist/build/index.js:15:918)
16:33:50.099 | error Command failed with exit code 1.
```
@wojtekmaj
Copy link
Contributor

Happening to me as well. Upgrading Webpack from beta.29 to beta.30, not doing literally anything else, breaks the build:

ModuleNotFoundError: Module not found: Error: Can't resolve './assertThisInitialized' in '/node_modules/@babel/runtime/helpers/esm'
    at /node_modules/webpack/lib/Compilation.js:1470:28
    at /node_modules/webpack/lib/NormalModuleFactory.js:647:13
    at eval (eval at create (/node_modules/webpack/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:10:1)
    at /node_modules/webpack/lib/NormalModuleFactory.js:233:22
    at eval (eval at create (/node_modules/webpack/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:9:1)
    at /node_modules/webpack/lib/NormalModuleFactory.js:357:22
    at /node_modules/webpack/lib/NormalModuleFactory.js:116:11
    at /node_modules/webpack/lib/NormalModuleFactory.js:576:24
    at finishWithoutResolve (/node_modules/enhanced-resolve/lib/Resolver.js:284:11)
    at /node_modules/enhanced-resolve/lib/Resolver.js:350:15
    at /node_modules/enhanced-resolve/lib/Resolver.js:398:5
    at eval (eval at create (/node_modules/enhanced-resolve/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:15:1)
    at /node_modules/enhanced-resolve/lib/Resolver.js:398:5
    at eval (eval at create (/node_modules/enhanced-resolve/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:27:1)
    at /node_modules/enhanced-resolve/lib/DescriptionFilePlugin.js:87:43
    at /node_modules/enhanced-resolve/lib/Resolver.js:398:5
    at eval (eval at create (/node_modules/enhanced-resolve/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:16:1)
    at /node_modules/enhanced-resolve/lib/Resolver.js:398:5
    at eval (eval at create (/node_modules/enhanced-resolve/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:27:1)
    at /node_modules/enhanced-resolve/lib/DescriptionFilePlugin.js:87:43
    at /node_modules/enhanced-resolve/lib/Resolver.js:398:5
    at eval (eval at create (/node_modules/enhanced-resolve/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:16:1)
    at /node_modules/enhanced-resolve/lib/ConditionalPlugin.js:39:48
    at _next0 (eval at create (/node_modules/enhanced-resolve/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:8:1)
    at eval (eval at create (/node_modules/enhanced-resolve/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:30:1)
    at /node_modules/enhanced-resolve/lib/Resolver.js:398:5
    at eval (eval at create (/node_modules/enhanced-resolve/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:57:1)
    at /node_modules/enhanced-resolve/lib/ConditionalPlugin.js:52:42
    at /node_modules/enhanced-resolve/lib/Resolver.js:398:5
    at eval (eval at create (/node_modules/enhanced-resolve/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:16:1)
resolve './assertThisInitialized' in '/node_modules/@babel/runtime/helpers/esm'
  using description file: /node_modules/@babel/runtime/helpers/esm/package.json (relative path: .)
    Field 'browser' doesn't contain a valid alias configuration
    using description file: /node_modules/@babel/runtime/helpers/esm/package.json (relative path: ./assertThisInitialized)
      Field 'browser' doesn't contain a valid alias configuration
      /node_modules/@babel/runtime/helpers/esm/assertThisInitialized doesn't exist

@nickbouton
Copy link

nickbouton commented Sep 18, 2020

Also seeing this issue with beta 30->32 as well, 29 still works ok. All of the errors we're getting are coming from Material UI via @babel/runtime. Adding the fullySpecified: false workaround seems to do the trick.

@alexander-akait
Copy link
Member

There is no problems on webpack side

@EvHaus
Copy link

EvHaus commented Sep 22, 2020

I'm not having luck with the fullySpecified: false solution. When I add that to my module rules and try the latest rc.0 build I end up with this failure:

/myproject/client/node_modules/webpack/node_modules/enhanced-resolve/lib/Resolver.js:362
			newStack = new Set(resolveContext.stack);
			           ^

RangeError: Maximum call stack size exceeded
    at new Set (<anonymous>)
    at Resolver.doResolve (/myproject/client/node_modules/webpack/node_modules/enhanced-resolve/lib/Resolver.js:362:15)
    at resolver.getHook.tapAsync (/myproject/client/node_modules/webpack/node_modules/enhanced-resolve/lib/ConditionalPlugin.js:42:14)
    at Hook.eval [as callAsync] (eval at create (/myproject/client/node_modules/webpack/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:37:1)
    at Resolver.doResolve (/myproject/client/node_modules/webpack/node_modules/enhanced-resolve/lib/Resolver.js:394:16)
    at resolver.getHook.tapAsync (/myproject/client/node_modules/webpack/node_modules/enhanced-resolve/lib/NextPlugin.js:30:14)
    at Hook.eval [as callAsync] (eval at create (/myproject/client/node_modules/webpack/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:7:1)
    at Resolver.doResolve (/myproject/client/node_modules/webpack/node_modules/enhanced-resolve/lib/Resolver.js:394:16)
    at DescriptionFileUtils.loadDescriptionFile (/myproject/client/node_modules/webpack/node_modules/enhanced-resolve/lib/DescriptionFilePlugin.js:74:17)
    at forEachBail (/myproject/client/node_modules/webpack/node_modules/enhanced-resolve/lib/DescriptionFileUtils.js:118:13)

And sometimes this one:

/myproject/client/node_modules/webpack/node_modules/enhanced-resolve/lib/DescriptionFileUtils.js:42
	(function findDescriptionFile() {
	                             ^

RangeError: Maximum call stack size exceeded
    at findDescriptionFile (/myproject/client/node_modules/webpack/node_modules/enhanced-resolve/lib/DescriptionFileUtils.js:42:31)
    at forEachBail (/myproject/client/node_modules/webpack/node_modules/enhanced-resolve/lib/DescriptionFileUtils.js:125:14)
    at iterator (/myproject/client/node_modules/webpack/node_modules/enhanced-resolve/lib/forEachBail.js:16:12)
    at resolver.fileSystem.readJson (/myproject/client/node_modules/webpack/node_modules/enhanced-resolve/lib/DescriptionFileUtils.js:58:16)
    at CacheBackend.provide (/myproject/client/node_modules/webpack/node_modules/enhanced-resolve/lib/CachedInputFileSystem.js:174:31)
    at forEachBail (/myproject/client/node_modules/webpack/node_modules/enhanced-resolve/lib/DescriptionFileUtils.js:52:26)
    at next (/myproject/client/node_modules/webpack/node_modules/enhanced-resolve/lib/forEachBail.js:14:3)
    at forEachBail (/myproject/client/node_modules/webpack/node_modules/enhanced-resolve/lib/forEachBail.js:24:9)
    at findDescriptionFile (/myproject/client/node_modules/webpack/node_modules/enhanced-resolve/lib/DescriptionFileUtils.js:47:3)
    at forEachBail (/myproject/client/node_modules/webpack/node_modules/enhanced-resolve/lib/DescriptionFileUtils.js:125:14)

The same issues don't happen on beta.29. Is anyone else seeing similar problems?

@alexander-akait
Copy link
Member

@EvHaus Can you create reproducible test repo?

@alexander-akait
Copy link
Member

/cc @vankop

@mudassir-jmi
Copy link

(webpack-internal:///./node_modules/next/dist/pages/_document.js:16:1)

this error show in next js project

sakitam-fdd added a commit to sakitam-gis/vis-engine that referenced this issue Jan 28, 2023
github-actions bot pushed a commit to sakitam-gis/vis-engine that referenced this issue Jan 30, 2023
# [1.1.0](v1.0.4...v1.1.0) (2023-01-30)

### Bug Fixes

* **math:** Matrix3 subtract method and Matrix4 add/sub/multiply methods ([1f0fb3d](1f0fb3d))
* **math:** Matrix4 fromScale method ([0b6e49c](0b6e49c))
* **no-release:** fix build docs script ([a04dd66](a04dd66))
* **no-release:** plugin docusaurus webpack config to fix js resolve [webpack issues](webpack/webpack#11467) ([ad9dd6a](ad9dd6a))
* **Renderer:** add initialize default width/height ([629c8a8](629c8a8))

### Features

* **core:** add renderer resetState method ([4478e7f](4478e7f))

### Performance Improvements

* **core:** initialize gl parameter with auto ([3d00ffd](3d00ffd))
github-actions bot pushed a commit to sakitam-gis/vis-engine that referenced this issue Feb 7, 2023
# 1.0.0 (2023-02-07)

### Bug Fixes

* **core:** `Resource` subclass missing `removeStats` ([2a0e3f7](2a0e3f7))
* **core:** fix `Program` setStates method and update `Renderer` types def. ([a82fa00](a82fa00))
* **core:** fixed `Texture` magFilter state ([c10e56a](c10e56a))
* fix actions ci build docs dep ([0a428ef](0a428ef))
* **math:** `Matrix` and `Vector`、`Euler`、`Quaternion` toString method ([3eb2433](3eb2433))
* **math:** Matrix3 subtract method and Matrix4 add/sub/multiply methods ([1f0fb3d](1f0fb3d))
* **math:** Matrix4 fromScale method ([0b6e49c](0b6e49c))
* **no-release:** fix build docs script ([a04dd66](a04dd66))
* **no-release:** fix mapbox adapter workspace version and add readme doc ([f608e53](f608e53))
* **no-release:** plugin docusaurus webpack config to fix js resolve [webpack issues](webpack/webpack#11467) ([ad9dd6a](ad9dd6a))
* **patch:** disable adapters test ([04e16ce](04e16ce))
* **patch:** external gl-matrix and fixed docs build ([ce046f3](ce046f3))
* **patch:** fix actions ci build docs and refix external gl-matrix ([5ca130c](5ca130c))
* **patch:** fixed ci [release-adapters] ([eebdf51](eebdf51))
* **patch:** fixed ci [skip-ve-release] [release-adapters] ([34dfdfc](34dfdfc))
* **patch:** try release adapters in action ([1379d00](1379d00))
* **patch:** update mapbox adapter version ([b0c5793](b0c5793))
* **pitch:** Matrix identity and update docs ([382abfd](382abfd))
* **Renderer:** add initialize default width/height ([629c8a8](629c8a8))
* **utils:** gl util `isWebGL` and `isWebGL2` methods support maptalks grouplayer ([435f799](435f799))

### Features

* **adapters:** add maptalks adapter support ([dd62cf5](dd62cf5))
* **animation:** clock impl ([edef1cd](edef1cd))
* **animation:** raf impl ([79ab5c2](79ab5c2))
* **cameras:** base camera ([649b8ec](649b8ec))
* **cameras:** OrthographicCamera ([22a7771](22a7771))
* **cameras:** PerspectiveCamera ([0445307](0445307))
* **core:** `Renderer` resetState support reset `vao` and add `clear` method ([15f3079](15f3079))
* **core:** `Resource` support `swapHandle` and `restoreHandle` method ([cfa3d4d](cfa3d4d))
* **core:** add Program renderState options ([b0fa078](b0fa078))
* **core:** add renderer resetState method ([4478e7f](4478e7f))
* **core:** BufferAttribute ([35b7339](35b7339))
* **core:** Context and Resource and Texture ([ced2dc8](ced2dc8))
* **core:** core base ([ec5b2c4](ec5b2c4))
* **core:** EventEmitter ([96338c8](96338c8))
* **core:** Geometry ([ec0de76](ec0de76))
* **core:** Program ([e19164e](e19164e))
* **core:** Program ([b4554c8](b4554c8))
* **core:** RenderBuffer ([0ed53eb](0ed53eb))
* **core:** Renderer ([cef381f](cef381f))
* **core:** RenderTarget ([eb073d1](eb073d1))
* **core:** Shader class ([8e6da19](8e6da19))
* **core:** support mesh wireframe render and update docs, add Box geometry ([1b3252b](1b3252b))
* **core:** Texture3D support ([acb3b6d](acb3b6d))
* **core:** update Context ([d08ccb9](d08ccb9))
* **core:** update Context to Renderer, update Resource and Texture ([658979b](658979b))
* **core:** webgl renderer state ([2ae446d](2ae446d))
* **map-adapters:** add mapbox-gl adapter support ([45edb33](45edb33))
* **math:** Add `highPrecision` method to solve the problem of floating point calculation_ ([48bd74f](48bd74f))
* **math:** Color implementation ([458af7c](458af7c))
* **math:** Eular and Quaternion and Matrix4 Class ([73c3dda](73c3dda))
* **math:** Matrix Base and Vector Base Class ([a6f7e68](a6f7e68))
* **math:** Matrix3 and Vector2 Class ([ac4c120](ac4c120))
* **math:** Vector3 and Vector4 Class ([50a19e2](50a19e2))
* **object:** Mesh implementation ([1370e7a](1370e7a))
* **object:** Object3D and Scene ([7c64e63](7c64e63))
* **object:** Object3D and Scene ([188cf9e](188cf9e))
* **playground:** add demo and fixed docs ([566f929](566f929))

### Performance Improvements

* **adapters:** mapbox adapter default use high precision ([ff0b007](ff0b007))
* **ci:** update ci script ([b5c3591](b5c3591))
* **core:** initialize gl parameter with auto ([3d00ffd](3d00ffd))
* **core:** program render state update move to state ([6827107](6827107))
* **core:** Renderer request gl context, fixed default option ([7033101](7033101))
* **core:** update `Geometry` computeBoundingBox and computeBoundingSphere method support external `vertices` params ([64d18bb](64d18bb))
* **core:** update `State` reset method support `force` params ([98d0c58](98d0c58))
* **eslint:** format code ([89874ec](89874ec))
ericyhwang added a commit to derbyjs/derby-webpack that referenced this issue Sep 5, 2023
async@3 includes an ESM version dist/async.mjs, which Webpack by default prefers over the CommonJS version dist/async.js. Unfortunately, Webpack fails to compile the mjs version with the following error:

```
ERROR in ./node_modules/sharedb/node_modules/async/dist/async.mjs 61:25-32
Module not found: Error: Can't resolve 'process/browser' in './node_modules/sharedb/node_modules/async/dist'
Did you mean 'browser.js'?
BREAKING CHANGE: The request 'process/browser' failed to resolve only because it was resolved as fully specified
(probably because the origin is strict EcmaScript Module, e. g. a module with javascript mimetype, a '*.mjs' file, or a '*.js' file where the package.json contains '"type": "module"').
The extension in the request is mandatory for it to be fully specified.
Add the extension to the request.
```

This workaround suggested in webpack/webpack#11467 (comment) resolves the error, at least while Webpack supports the `fullySpecified: false` config.
ericyhwang added a commit to derbyjs/derby-webpack that referenced this issue Sep 5, 2023
async@3 includes an ESM version dist/async.mjs, which Webpack by default prefers over the CommonJS version dist/async.js. Unfortunately, Webpack fails to compile the mjs version with the following error:

```
ERROR in ./node_modules/sharedb/node_modules/async/dist/async.mjs 61:25-32
Module not found: Error: Can't resolve 'process/browser' in './node_modules/sharedb/node_modules/async/dist'
Did you mean 'browser.js'?
BREAKING CHANGE: The request 'process/browser' failed to resolve only because it was resolved as fully specified
(probably because the origin is strict EcmaScript Module, e. g. a module with javascript mimetype, a '*.mjs' file, or a '*.js' file where the package.json contains '"type": "module"').
The extension in the request is mandatory for it to be fully specified.
Add the extension to the request.
```

This workaround suggested in webpack/webpack#11467 (comment) resolves the error, at least while Webpack supports the `fullySpecified: false` config.
@tayyab-ash
Copy link

Can anyone solve this please... i am getting it in the browser console :)

Uncaught TypeError: (0 , codecs_data_structures_1.getBytesCodec) is not a function at ./node_modules/@solana/spl-token-metadata/lib/cjs/state.js (state.ts:7:1) at options.factory (react refresh:6:1) at __webpack_require__ (bootstrap:22:1) at fn (hot module replacement:61:1) at ./node_modules/@solana/spl-token-metadata/lib/cjs/index.js (index.ts:4:1) at options.factory (react refresh:6:1) at __webpack_require__ (bootstrap:22:1) at fn (hot module replacement:61:1) at ./node_modules/@metaplex-foundation/mpl-token-metadata/node_modules/@solana/spl-token/lib/cjs/extensions/tokenMetadata/actions.js (actions.ts:4:1) at options.factory (react refresh:6:1)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests