插件汇总核心错误:无法加载/Users/Naseem/AppData/Roaming/npm/node_modules/wpe-lightning-cli/src/alias/wpe-lightning.js

问题描述

如何解决此问题?

$ lng build

√ Removing "E:\workspace\xxx\xxx\build" folder

√ Ensuring "E:\workspace\xxx\xxx\build" folder exists

√ Copying support files to "E:\workspace\xxx\xxx\build"

- Copying static assets to "E:\workspace\xxx\xxx\build"cp: no such file or directory: ./static
√ Copying static assets to "E:\workspace\xxx\xxx\build"

√ Copying settings.json to "E:\workspace\xxx\xxx\build"

√ Copying metadata.json to "E:\workspace\xxx\xxx\build"

× Error while creating ES6 bundle (see log)


E:\workspace\xxx\xxx\src\index.js → build\appBundle.js...
[!] (plugin Rollup Core) Error: Could not load /Users/Naseem/AppData/Roaming/npm/node_modules/wpe-lightning-cli/src/alias/wpe-lightning.js (imported by E:\workspace\xxx\xxx\node_modules\wpe-lightning-sdk\src\Lightning\index.js): ENOENT: no such file or directory,open 'E:\Users\Naseem\AppData\Roaming\npm\node_modules\wpe-lightning-cli\src\alias\wpe-lightning.js'
Error: Could not load /Users/Naseem/AppData/Roaming/npm/node_modules/wpe-lightning-cli/src/alias/wpe-lightning.js (imported by E:\workspace\xxx\xxx\node_modules\wpe-lightning-sdk\src\Lightning\index.js): ENOENT: no such file or directory,open 'E:\Users\Naseem\AppData\Roaming\npm\node_modules\wpe-lightning-cli\src\alias\wpe-lightning.js'

(node:7472) UnhandledPromiseRejectionWarning: Error: Error: Command failed with exit code 1: C:\Users\Naseem\AppData\Roaming\npm\node_modules\wpe-lightning-cli\node_modules\.bin\rollup -c C:\Users\Naseem\AppData\Roaming\npm\node_modules\wpe-lightning-cli\src\configs\rollup.es6.config.js --input E:\workspace\xxx\xxx\src\index.js
--file E:\workspace\xxx\xxx\build\appBundle.js --name APP_com_epam_lgi
    at execa.then.catch.e (C:\Users\Naseem\AppData\Roaming\npm\node_modules\wpe-lightning-cli\src\helpers\build.js:150:13)
    at process._tickCallback (internal/process/next_tick.js:68:7)
(node:7472) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block,or by rejecting a promise which was not handled with .catch(). (rejection id: 3)
(node:7472) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future,promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.


using npm -v > 6.13.4
using node -v > v10.19.0

解决方法

我设法通过将工作区重新定位到同一驱动器(以我的情况从D:到C :)来解决此问题。

之前:


   D:\work\myproj\com.work.Test\src\index.js → build\appBundle.js...
    [!] (plugin Rollup Core) Error: Could not load /Users/myuser/AppData/Roaming/npm/node_modules/wpe-lightning-cli/src/alias/wpe-lightning.js (imported by D:\work\myproj\com.work.Test\node_modules\wpe-lightning-sdk\src\Lightning\index.js): ENOENT: no such file or directory,open 'D:\Users\myuser\AppData\Roaming\npm\node_modules\wpe-lightning-cli\src\alias\wpe-lightning.js'
    Error: Could not load /Users/myuser/AppData/Roaming/npm/node_modules/wpe-lightning-cli/src/alias/wpe-lightning.js (imported by D:\work\myproj\com.work.Test\node_modules\wpe-lightning-sdk\src\Lightning\index.js): ENOENT: no such file or directory,open 'D:\Users\myuser\AppData\Roaming\npm\node_modules\wpe-lightning-cli\src\alias\wpe-lightning.js'
    
    (node:28464) UnhandledPromiseRejectionWarning: Error: Error: Command failed with exit code 1: C:\Users\myuser\AppData\Roaming\npm\node_modules\wpe-lightning-cli\node_modules\.bin\rollup -c C:\Users\myuser\AppData\Roaming\npm\node_modules\wpe-lightning-cli\src\configs\rollup.es6.config.js --input D:\work\myproj\com.work.Test\src\index.js --file D:\work\myproj\com.work.Test\build\appBundle.js --name APP_com_work_Test
    at C:\Users\myuser\AppData\Roaming\npm\node_modules\wpe-lightning-cli\src\helpers\build.js:150:13
    at processTicksAndRejections (internal/process/task_queues.js:97:5)
    (node:28464) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block,or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection,use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 3)
    (node:28464) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future,promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

之后:


    C:\work\proj\com.work.Test>lng build
    √ Testing internet connection..
    √ Verifying if your installation of Lightning-CLI is up to date.
    √ Removing "C:\work\proj\com.work.Test\build" folder
    √ Ensuring "C:\work\proj\com.work.Test\build" folder exists
    √ Copying support files to "C:\work\proj\com.work.Test\build"
    √ Copying static assets to "C:\work\proj\com.work.Test\build"
    √ Copying settings.json to "C:\work\proj\com.work.Test\build"
    √ Copying metadata.json to "C:\work\proj\com.work.Test\build"
    √ Building ES6 appBundle and saving to "C:\work\proj\com.work.Test\build"

相关问答

依赖报错 idea导入项目后依赖报错,解决方案:https://blog....
错误1:代码生成器依赖和mybatis依赖冲突 启动项目时报错如下...
错误1:gradle项目控制台输出为乱码 # 解决方案:https://bl...
错误还原:在查询的过程中,传入的workType为0时,该条件不起...
报错如下,gcc版本太低 ^ server.c:5346:31: 错误:‘struct...