NPM和节点更新后找不到模块

时间:2017-08-24 02:50:03

标签: reactjs npm

我有一个工作正常的React应用程序。在尝试解决另一个问题时,我做了NPM,TSC(Typescript)和Node的版本更新。我能够解决我面临的问题但是webpack现在无法压缩。

我试图卸载并重新安装我收到错误的模块,然后为我的web项目执行npm运行,但它再次无法编译。

ERROR in ./app.js
Module not found: Error: Can't resolve 'grommet/utils/Rest' in 'C:\Users\jgora\OneDrive\Documents\BloomSky\PatientTab\app'
resolve 'grommet/utils/Rest' in 'C:\Users\jgora\OneDrive\Documents\BloomSky\PatientTab\app'
  Parsed request is a module
  using description file: C:\Users\jgora\OneDrive\Documents\BloomSky\PatientTab\package.json (relative path: ./app)
    Field 'browser' doesn't contain a valid alias configuration
  after using description file: C:\Users\jgora\OneDrive\Documents\BloomSky\PatientTab\package.json (relative path: ./app)
    resolve as module
      C:\Users\jgora\OneDrive\Documents\BloomSky\PatientTab\app\node_modules doesn't exist or is not a directory
      C:\Users\jgora\OneDrive\Documents\BloomSky\node_modules doesn't exist or is not a directory
      C:\Users\jgora\OneDrive\Documents\node_modules doesn't exist or is not a directory
      C:\Users\jgora\OneDrive\node_modules doesn't exist or is not a directory
      C:\Users\node_modules doesn't exist or is not a directory
      C:\node_modules doesn't exist or is not a directory
      looking for modules in C:\Users\jgora\OneDrive\Documents\BloomSky\PatientTab\node_modules
        using description file: C:\Users\jgora\OneDrive\Documents\BloomSky\PatientTab\package.json (relative path: ./node_modules)
          Field 'browser' doesn't contain a valid alias configuration
        after using description file: C:\Users\jgora\OneDrive\Documents\BloomSky\PatientTab\package.json (relative path: ./node_modules)
          using description file: C:\Users\jgora\OneDrive\Documents\BloomSky\PatientTab\package.json (relative path: ./node_modules/grommet/utils/Rest)
            no extension
              Field 'browser' doesn't contain a valid alias configuration
              C:\Users\jgora\OneDrive\Documents\BloomSky\PatientTab\node_modules\grommet\utils\Rest doesn't exist
            .js
              Field 'browser' doesn't contain a valid alias configuration
              C:\Users\jgora\OneDrive\Documents\BloomSky\PatientTab\node_modules\grommet\utils\Rest.js doesn't exist
            .json
              Field 'browser' doesn't contain a valid alias configuration
              C:\Users\jgora\OneDrive\Documents\BloomSky\PatientTab\node_modules\grommet\utils\Rest.json doesn't exist
            as directory
              C:\Users\jgora\OneDrive\Documents\BloomSky\PatientTab\node_modules\grommet\utils\Rest doesn't exist
      looking for modules in C:\Users\jgora\node_modules
        No description file found
        Field 'browser' doesn't contain a valid alias configuration
        No description file found
        no extension
          Field 'browser' doesn't contain a valid alias configuration
          C:\Users\jgora\node_modules\grommet\utils\Rest doesn't exist
        .js
          Field 'browser' doesn't contain a valid alias configuration
          C:\Users\jgora\node_modules\grommet\utils\Rest.js doesn't exist
       .json
          Field 'browser' doesn't contain a valid alias configuration
          C:\Users\jgora\node_modules\grommet\utils\Rest.json doesn't exist
        as directory
          C:\Users\jgora\node_modules\grommet\utils\Rest doesn't exist

0 个答案:

没有答案