deep-foundation / sdk

https://deep-foundation.github.io/sdk/
The Unlicense
12 stars 10 forks source link

`npm run build`: unhandledRejection Error [ERR_MODULE_NOT_FOUND]: Cannot find module '/home/konard/Archive/Code/Deep/dev/packages/sdk/node_modules/react-focus-lock/dist/es2015/Combination' imported from /home/konard/Archive/Code/Deep/dev/packages/sdk/node_modules/react-focus-lock/dist/es2015/index.js #15

Closed Konard closed 6 months ago

Konard commented 6 months ago
konard@konard-MS-7982:~/Archive/Code/Deep/dev/packages/sdk$ npm run build

> @deep-foundation/sdk@0.0.0-dev.1 build
> rimraf app && next build

 ⚠ Invalid next.config.js options detected: 
 ⚠     Invalid literal value, expected false at "i18n.localeDetection"
 ⚠     Unrecognized key(s) in object: 'requiredNamespaces' at "i18n"
 ⚠     Unrecognized key(s) in object: 'strictMode'
 ⚠ See more info here: https://nextjs.org/docs/messages/invalid-next-config
 ✓ Linting and checking validity of types    
 ⚠ Compiled with warnings

./node_modules/next-i18next/dist/commonjs/serverSideTranslations.js
Critical dependency: the request of a dependency is an expression

Import trace for requested module:
./node_modules/next-i18next/dist/commonjs/serverSideTranslations.js
./node_modules/next-i18next/serverSideTranslations.js
./src/i18n.tsx
./src/provider.tsx

./node_modules/@deep-foundation/deeplinks/imports/client.js
Critical dependency: the request of a dependency is an expression

Import trace for requested module:
./node_modules/@deep-foundation/deeplinks/imports/client.js

./node_modules/@deep-foundation/deeplinks/imports/client.js
Critical dependency: the request of a dependency is an expression

Import trace for requested module:
./node_modules/@deep-foundation/deeplinks/imports/client.js
./pages/index.tsx

unhandledRejection Error [ERR_MODULE_NOT_FOUND]: Cannot find module '/home/konard/Archive/Code/Deep/dev/packages/sdk/node_modules/react-focus-lock/dist/es2015/Combination' imported from /home/konard/Archive/Code/Deep/dev/packages/sdk/node_modules/react-focus-lock/dist/es2015/index.js
    at new NodeError (node:internal/errors:399:5)
    at finalizeResolution (node:internal/modules/esm/resolve:326:11)
    at moduleResolve (node:internal/modules/esm/resolve:945:10)
    at defaultResolve (node:internal/modules/esm/resolve:1153:11)
    at nextResolve (node:internal/modules/esm/loader:163:28)
    at ESMLoader.resolve (node:internal/modules/esm/loader:838:30)
    at ESMLoader.getModuleJob (node:internal/modules/esm/loader:424:18)
    at ModuleWrap.<anonymous> (node:internal/modules/esm/module_job:77:40)
    at link (node:internal/modules/esm/module_job:76:36) {
  type: 'Error',
  code: 'ERR_MODULE_NOT_FOUND'
}
konard@konard-MS-7982:~/Archive/Code/Deep/dev/packages/sdk$ npm list react-focus-lock
@deep-foundation/sdk@0.0.0-dev.1 /home/konard/Archive/Code/Deep/dev/packages/sdk
└─┬ @chakra-ui/react@2.8.2
  └─┬ @chakra-ui/focus-lock@2.1.0
    └── react-focus-lock@2.12.0

Check that file exists:

konard@konard-MS-7982:~/Archive/Code/Deep/dev/packages/sdk$ cat /home/konard/Archive/Code/Deep/dev/packages/sdk/node_modules/react-focus-lock/dist/es2015/Combination
cat: /home/konard/Archive/Code/Deep/dev/packages/sdk/node_modules/react-focus-lock/dist/es2015/Combination: No such file or directory
konard@konard-MS-7982:~/Archive/Code/Deep/dev/packages/sdk$ cat /home/konard/Archive/Code/Deep/dev/packages/sdk/node_modules/react-focus-lock/dist/es2015/Combination.js
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
import _extends from "@babel/runtime/helpers/esm/extends";
import * as React from 'react';
import FocusLockUI from './Lock';
import FocusTrap from './Trap';
var FocusLockCombination = /*#__PURE__*/React.forwardRef(function FocusLockUICombination(props, ref) {
  return /*#__PURE__*/React.createElement(FocusLockUI, _extends({
    sideCar: FocusTrap,
    ref: ref
  }, props));
});
var _ref = FocusLockUI.propTypes || {},
  sideCar = _ref.sideCar,
  propTypes = _objectWithoutPropertiesLoose(_ref, ["sideCar"]);
FocusLockCombination.propTypes = process.env.NODE_ENV !== "production" ? propTypes : {};
export default FocusLockCombination;
Konard commented 6 months ago

Workaround

git checkout 0c4a7a27c6e927fbbe5825dc7af13a58420dc0a9
npm ci
npm run build
ivansglazunov commented 6 months ago
Снимок экрана 2024-04-23 в 14 35 44