Skip to content
This repository has been archived by the owner on Oct 2, 2022. It is now read-only.

nowa server 命令报错:ERROR in Cannot find module 'babel-core' #54

Open
djming opened this issue Aug 10, 2019 · 1 comment
Open

Comments

@djming
Copy link

djming commented Aug 10, 2019

我在本地一直是使用的Nowa-gui进行编译运行,现在想要把应用发布到服务器上,但是一直找不到相关的文档,就将代码整体上传了。服务器环境是:
Red Hat 4.8.5-28
Nowa 1.2.2

本地运行 nowa server是完全正常的,但是在服务器运行nowa server命令出现了以下错误:

-bash-4.2$ nowa server

  Nowa GUI for all platform is available now!
  You can download it here:
  https://nowa-webpack.github.io/

webpack built 28f0d8edebdfbbdbdfc7 in 317ms
Hash: 28f0d8edebdfbbdbdfc7
Version: webpack 1.15.0
Time: 317ms
    Asset       Size  Chunks       Chunk Names
   app.js     273 kB       0       app
  home.js  411 bytes       1       home
search.js  417 bytes       2       search
upload.js  417 bytes       3       upload

ERROR in Cannot find module 'babel-core'
 @ multi app

ERROR in Cannot find module 'babel-core'
 @ multi home

ERROR in Cannot find module 'babel-core'
 @ multi search

ERROR in Cannot find module 'babel-core'
 @ multi upload
webpack: Failed to compile.

除此之外执行nowa build也会出现

module.js:478
    throw err;
    ^

Error: Cannot find module 'webpack/lib/removeAndDo'
    at Function.Module._resolveFilename (module.js:476:15)
    at Function.Module._load (module.js:424:25)
    at Module.require (module.js:504:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> (/home/cloud/.nowa/install/[email protected]@extract-text-webpack-plugin/ExtractedModule.js:30:42)
    at Module._compile (module.js:577:32)
    at Object.Module._extensions..js (module.js:586:10)
    at Module.load (module.js:494:32)
    at tryModuleLoad (module.js:453:12)
    at Function.Module._load (module.js:445:3)

请问要怎么解决呢?我反复检查了本地和服务器代码应该是没有区别的,甚至将node_modules文件夹一并上传了

@gbk
Copy link
Contributor

gbk commented Aug 12, 2019

参考这个 issue 试下吧
nowa-webpack/nowa#17

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

No branches or pull requests

2 participants