NPM使用create-react-app崩溃-Ubuntu 14.04,以root用户身份

问题描述

我在使用旧版服务器Ubuntu 14.04的远程vServer上,是的。 (我的提供商没有提供任何更新的vServer映像,他们关闭了此类服务器...)

无论如何,在使用命令apt-get install -y nodejs安装nodejs之后,这就是通过npx create-react-app bbstats-primereact在远程服务器上创建新项目的情况。

注意,我正在使用root用户执行所有操作(请参见下面的root @)。该服务器仅用于演示目的,所以我不在乎。

一个失败的消息是npm ERR! cb() never called!

尝试1:

root@vz227:~# cd /projects/
root@vz227:/projects# npx create-react-app bbstats-primereact
npx: installed 98 in 6.464s

Creating a new React app in /projects/bbstats-primereact.

Installing packages. This might take a couple of minutes.
Installing react,react-dom,and react-scripts with cra-template...

npm ERR! cb() never called!

npm ERR! This is an error with npm itself. Please report this error at:
npm ERR!     <https://npm.community>

npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2020-09-08T15_21_03_463Z-debug.log

Aborting installation.
  npm install --save --save-exact --loglevel error react react-dom react-scripts cra-template has Failed.

Deleting generated file... package.json
Deleting bbstats-primereact/ from /projects
Done.
root@vz227:/projects# npm cache clean --force
npm WARN using --force I sure hope you kNow what you are doing.

然后我发现了这一点:https://stackoverflow.com/a/47894787/396732-> npm cache clean --force

尝试2:

root@vz227:/projects# npx create-react-app bbstats-primereact
npx: installed 98 in 7.719s

Creating a new React app in /projects/bbstats-primereact.

Installing packages. This might take a couple of minutes.
Installing react,and react-scripts with cra-template...

[   ...............] / loadDep:fsevents: sill resolveWithNewModule [email protected] checking installable status

#
# Fatal error in,line 0
# Check Failed: Free(aligned_base + size,suffix_size).
#
#
#
#FailureMessage Object: 0x7fffedb35060
 1: 0xa760a1  [npm]
 2: 0x19f5a75 V8_Fatal(char const*,...) [npm]
 3: 0x19fa2c9 v8::base::OS::Allocate(void*,unsigned long,v8::base::OS::MemoryPermission) [npm]
 4: 0x10d26df v8::internal::VirtualMemory::VirtualMemory(v8::PageAllocator*,void*,unsigned long) [npm]
 5: 0xda01dd v8::internal::MemoryAllocator::AllocatealignedMemory(unsigned long,v8::internal::Executability,v8::internal::VirtualMemory*) [npm]
 6: 0xda9085 v8::internal::MemoryAllocator::AllocateChunk(unsigned long,v8::internal::Space*) [npm]
 7: 0xda94f5 v8::internal::Page* v8::internal::MemoryAllocator::AllocatePage<(v8::internal::MemoryAllocator::AllocationMode)0,v8::internal::Pagedspace>(unsigned long,v8::internal::Pagedspace*,v8::internal::Executability) [npm]
 8: 0xda964f v8::internal::Pagedspace::Expand() [npm]
 9: 0xda9860 v8::internal::Pagedspace::RawSlowRefillLinearallocationArea(int,v8::internal::Allocationorigin) [npm]
10: 0xda9912 v8::internal::Pagedspace::SlowRefillLinearallocationArea(int,v8::internal::Allocationorigin) [npm]
11: 0xd23abe  [npm]
12: 0xd37e98 v8::internal::Heap::Allocateraw(int,v8::internal::AllocationType,v8::internal::Allocationorigin,v8::internal::AllocationAlignment) [npm]
13: 0xd41838 v8::internal::Heap::AllocaterawWithRetryOrFail(int,v8::internal::AllocationAlignment) [npm]
14: 0xd0e5ce v8::internal::Factory::NewMap(v8::internal::InstanceType,int,v8::internal::ElementsKind,int) [npm]
15: 0xf0510b v8::internal::Map::Rawcopy(v8::internal::Isolate*,v8::internal::Handle<v8::internal::Map>,int) [npm]
16: 0xf05834 v8::internal::Map::copyDropDescriptors(v8::internal::Isolate*,v8::internal::Handle<v8::internal::Map>) [npm]
17: 0xf058d6 v8::internal::Map::ShareDescriptor(v8::internal::Isolate*,v8::internal::Handle<v8::internal::DescriptorArray>,v8::internal::Descriptor*) [npm]
18: 0xf063ae v8::internal::Map::copyAddDescriptor(v8::internal::Isolate*,v8::internal::Descriptor*,v8::internal::TransitionFlag) [npm]
19: 0xf06529 v8::internal::Map::copyWithField(v8::internal::Isolate*,v8::internal::Handle<v8::internal::Name>,v8::internal::Handle<v8::internal::FieldType>,v8::internal::PropertyAttributes,v8::internal::PropertyConstness,v8::internal::Representation,v8::internal::TransitionFlag) [npm]
20: 0xf07d12 v8::internal::Map::TransitionToDataProperty(v8::internal::Isolate*,v8::internal::Handle<v8::internal::Object>,v8::internal::StoreOrigin) [npm]
21: 0xef83af v8::internal::LookupIterator::PrepareTransitionToDataProperty(v8::internal::Handle<v8::internal::JSReceiver>,v8::internal::StoreOrigin) [npm]
22: 0xf2baf6 v8::internal::Object::AddDataProperty(v8::internal::LookupIterator*,v8::Maybe<v8::internal::ShouldThrow>,v8::internal::StoreOrigin) [npm]
23: 0xed6fa0 v8::internal::JSObject::DefineOwnPropertyIgnoreAttributes(v8::internal::LookupIterator*,v8::internal::JSObject::AccessorInfoHandling) [npm]
24: 0xed71d9 v8::internal::JSObject::DefineOwnPropertyIgnoreAttributes(v8::internal::LookupIterator*,v8::internal::JSObject::AccessorInfoHandling) [npm]
25: 0xe1c6c0 v8::internal::JsonParser<unsigned char>::BuildJsonObject(v8::internal::JsonParser<unsigned char>::JsonContinuation const&,std::vector<v8::internal::JsonProperty,std::allocator<v8::internal::JsonProperty> > const&,v8::internal::Handle<v8::internal::Map>) [npm]
26: 0xe1d34b v8::internal::JsonParser<unsigned char>::ParseJsonValue() [npm]
27: 0xe1e0ff v8::internal::JsonParser<unsigned char>::ParseJson() [npm]
28: 0xc3576d v8::internal::Builtin_JsonParse(int,unsigned long*,v8::internal::Isolate*) [npm]
29: 0x13cf119  [npm]

Aborting installation.
  npm install --save --save-exact --loglevel error react react-dom react-scripts cra-template has Failed.

Deleting generated file... package.json
Deleting bbstats-primereact/ from /projects
Done.
root@vz227:/projects#

问题:

这是一个错误吗?可以以任何方式解决此问题吗?

环境:

  • 操作系统:Ubuntu 14.04
  • 节点:12.18.3
  • npm:6.14.6

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)