如何解决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 ansi-regex@2.1.1 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 举报,一经查实,本站将立刻删除。