Skip to content
This repository was archived by the owner on Dec 18, 2017. It is now read-only.
This repository was archived by the owner on Dec 18, 2017. It is now read-only.

Parsing arrays in scripts section #659

Closed
@rustd

Description

@rustd

If you have the following section with arrays then we throw an error. This is what the templates will have so we should fix it.

    "scripts": {
 "prepack": ["npm install","bower install", "grunt"]

    }

Exception details
Error 1 System.ArgumentException: Can not convert Array to String.
at Newtonsoft.Json.Linq.JToken.op_Explicit(JToken value)
at Newtonsoft.Json.Linq.JToken.ToObject(Type objectType)
at Newtonsoft.Json.Linq.JToken.ToObjectT
at Microsoft.Framework.Runtime.Project.GetProject(String json, String projectName, String projectPath)
at Microsoft.Framework.Runtime.Project.TryGetProject(String path, Project& project)
at Microsoft.Framework.Runtime.ApplicationHostContext.get_Project()
at Microsoft.Framework.Runtime.ApplicationHostContext..ctor(IServiceProvider serviceProvider, String projectDirectory, String packagesDirectory, String configuration, FrameworkName targetFramework, ICache cache, ICacheContextAccessor cacheContextAccessor)
at Microsoft.Framework.DesignTimeHost.ApplicationContext.Initialize(String appPath, FrameworkName targetFramework, String configuration)
at Microsoft.Framework.DesignTimeHost.ApplicationContext.Calculate()
at Microsoft.Framework.DesignTimeHost.ApplicationContext.DoProcessLoop()
at Microsoft.Framework.DesignTimeHost.ApplicationContext.ProcessLoop(Object state) 0 0 WebApplication74

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions